Changeset 800779d


Ignore:
Timestamp:
08/07/22 18:55:02 (2 years ago)
Author:
unknown <mlviktor23@…>
Branches:
main
Children:
6eba109
Parents:
3e98cea
Message:

created login page

Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • reactapp/package-lock.json

    r3e98cea r800779d  
    1616        "@testing-library/react": "^13.3.0",
    1717        "@testing-library/user-event": "^13.5.0",
     18        "axios": "^0.27.2",
    1819        "babel": "^6.23.0",
    1920        "babel-plugin-macros": "^3.1.0",
     21        "js-cookie": "^3.0.1",
    2022        "jsog": "^1.0.7",
    2123        "react": "^18.2.0",
     
    48724874      }
    48734875    },
     4876    "node_modules/axios": {
     4877      "version": "0.27.2",
     4878      "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
     4879      "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
     4880      "dependencies": {
     4881        "follow-redirects": "^1.14.9",
     4882        "form-data": "^4.0.0"
     4883      }
     4884    },
     4885    "node_modules/axios/node_modules/form-data": {
     4886      "version": "4.0.0",
     4887      "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
     4888      "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
     4889      "dependencies": {
     4890        "asynckit": "^0.4.0",
     4891        "combined-stream": "^1.0.8",
     4892        "mime-types": "^2.1.12"
     4893      },
     4894      "engines": {
     4895        "node": ">= 6"
     4896      }
     4897    },
    48744898    "node_modules/axobject-query": {
    48754899      "version": "2.2.0",
     
    1130711331      "funding": {
    1130811332        "url": "https://github.com/chalk/supports-color?sponsor=1"
     11333      }
     11334    },
     11335    "node_modules/js-cookie": {
     11336      "version": "3.0.1",
     11337      "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz",
     11338      "integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==",
     11339      "engines": {
     11340        "node": ">=12"
    1130911341      }
    1131011342    },
     
    2036020392      "integrity": "sha512-32+ub6kkdhhWick/UjvEwRchgoetXqTK14INLqbGm5U2TzBkBNF3nQtLYm8ovxSkQWArjEQvftCKryjZaATu3w=="
    2036120393    },
     20394    "axios": {
     20395      "version": "0.27.2",
     20396      "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
     20397      "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
     20398      "requires": {
     20399        "follow-redirects": "^1.14.9",
     20400        "form-data": "^4.0.0"
     20401      },
     20402      "dependencies": {
     20403        "form-data": {
     20404          "version": "4.0.0",
     20405          "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
     20406          "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
     20407          "requires": {
     20408            "asynckit": "^0.4.0",
     20409            "combined-stream": "^1.0.8",
     20410            "mime-types": "^2.1.12"
     20411          }
     20412        }
     20413      }
     20414    },
    2036220415    "axobject-query": {
    2036320416      "version": "2.2.0",
     
    2503325086        }
    2503425087      }
     25088    },
     25089    "js-cookie": {
     25090      "version": "3.0.1",
     25091      "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz",
     25092      "integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw=="
    2503525093    },
    2503625094    "js-tokens": {
  • reactapp/package.json

    r3e98cea r800779d  
    1111    "@testing-library/react": "^13.3.0",
    1212    "@testing-library/user-event": "^13.5.0",
     13    "axios": "^0.27.2",
    1314    "babel": "^6.23.0",
    1415    "babel-plugin-macros": "^3.1.0",
     16    "js-cookie": "^3.0.1",
    1517    "jsog": "^1.0.7",
    1618    "react": "^18.2.0",
  • reactapp/src/App.js

    r3e98cea r800779d  
    1 import { Outlet } from "react-router-dom";
    2 import { MainWrapper, MainTitle } from "./Components/Styled/Main.style";
    3 import Search from "./Components/Search.js";
     1import Professor from "./Pages/Professor";
     2import SearchResults from "./Pages/SearchResults";
     3import Login from "./Pages/Login";
     4import { BrowserRouter, Routes, Route } from "react-router-dom";
     5import Home from "./Pages/Home";
    46
    57export default function App() {
    6   //document.body.style = "background: red;";
    78  return (
    8     <MainWrapper>
    9       <style>
    10         @import
    11         url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap');
    12       </style>
    13       <style>
    14         {
    15           "body { background-color: papayawhip;} * {margin: 0; padding: 0; box-sizing: border-box;}"
    16         }
    17       </style>
    18       <a href="/">
    19         <MainTitle>profesori.mk</MainTitle>
    20       </a>{" "}
    21       <Search />
    22       <Outlet />
    23     </MainWrapper>
     9    <BrowserRouter>
     10      <Routes>
     11        <Route path="/" element={<Home />}>
     12          <Route path="login" element={<Login />}></Route>
     13          <Route path="professor">
     14            <Route path=":professorId" element={<Professor />} />
     15          </Route>
     16          <Route path="search" element={<SearchResults />}></Route>
     17        </Route>
     18      </Routes>
     19    </BrowserRouter>
    2420  );
    2521}
  • reactapp/src/index.js

    r3e98cea r800779d  
    11import ReactDOM from "react-dom/client";
    2 import { BrowserRouter, Routes, Route } from "react-router-dom";
    32import App from "./App";
    4 import Professor from "./Pages/Professor";
    5 import SearchResults from "./Pages/SearchResults";
    63
    74const root = ReactDOM.createRoot(document.getElementById("root"));
    8 root.render(
    9   <BrowserRouter>
    10     <Routes>
    11       <Route path="/" element={<App />}>
    12         <Route path="professor">
    13           <Route path=":professorId" element={<Professor />} />
    14         </Route>
    15         <Route path="search" element={<SearchResults />}></Route>
    16       </Route>
    17     </Routes>
    18   </BrowserRouter>
    19 );
     5root.render(<App />);
  • springapp/src/main/java/mk/profesori/springapp/Security/SecurityConfiguration.java

    r3e98cea r800779d  
    1010import org.springframework.security.crypto.password.PasswordEncoder;
    1111import org.springframework.security.web.SecurityFilterChain;
     12import org.springframework.web.servlet.config.annotation.CorsRegistry;
     13import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
    1214
    1315import lombok.RequiredArgsConstructor;
     
    3032
    3133    @Bean
     34    public WebMvcConfigurer corsConfigurer() {
     35        return new WebMvcConfigurer() {
     36            @Override
     37            public void addCorsMappings(CorsRegistry registry) {
     38                registry.addMapping("/**").allowedOrigins("http://192.168.0.17:3000", "http://192.168.0.24:3000");
     39            }
     40        };
     41    }
     42
     43    @Bean
    3244    protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
    3345        http
Note: See TracChangeset for help on using the changeset viewer.