From d7cf29183687bc040fb12bb183f96a309f742343 Mon Sep 17 00:00:00 2001 From: Peter KW Date: Thu, 7 Mar 2024 17:48:43 +0100 Subject: [PATCH 1/4] added new page for admin and path in main --- .../src/Pages/AdminPages/AdminMenuPage.tsx | 27 +++++++++++++++++++ frontend/src/main.tsx | 5 ++++ 2 files changed, 32 insertions(+) create mode 100644 frontend/src/Pages/AdminPages/AdminMenuPage.tsx diff --git a/frontend/src/Pages/AdminPages/AdminMenuPage.tsx b/frontend/src/Pages/AdminPages/AdminMenuPage.tsx new file mode 100644 index 0000000..1b32ed4 --- /dev/null +++ b/frontend/src/Pages/AdminPages/AdminMenuPage.tsx @@ -0,0 +1,27 @@ +import { Link } from "react-router-dom"; +import BasicWindow from "../../Components/BasicWindow"; + +function AdminMenuPage(): JSX.Element { + const content = ( + <> +

Administrator Menu

+
+ +

+ Manage Users +

+ + +

+ Manage Projects +

+ +
+ + ); + + const buttons = <>; + + return ; +} +export default AdminMenuPage; diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index d5616c7..03091a2 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -5,6 +5,7 @@ import { createBrowserRouter, RouterProvider } from "react-router-dom"; import LoginPage from "./Pages/LoginPage.tsx"; import YourProjectsPage from "./Pages/YourProjectsPage.tsx"; import UserProjectPage from "./Pages/UserPages/UserProjectPage.tsx"; +import AdminMenuPage from "./Pages/AdminPages/AdminMenuPage.tsx"; // This is where the routes are mounted const router = createBrowserRouter([ @@ -20,6 +21,10 @@ const router = createBrowserRouter([ path: "/project", element: , }, + { + path: "/admin-menu", + element: , + }, ]); // Semi-hacky way to get the root element From ac6638b344b9d39a508c7fea77234e62b8919c35 Mon Sep 17 00:00:00 2001 From: Mattias Date: Fri, 8 Mar 2024 11:36:36 +0100 Subject: [PATCH 2/4] Removed example pages Home and Settings aswell as the react-logo --- frontend/src/Pages/Home.tsx | 36 --------------------------------- frontend/src/Pages/Settings.tsx | 17 ---------------- frontend/src/assets/react.svg | 1 - 3 files changed, 54 deletions(-) delete mode 100644 frontend/src/Pages/Home.tsx delete mode 100644 frontend/src/Pages/Settings.tsx delete mode 100644 frontend/src/assets/react.svg diff --git a/frontend/src/Pages/Home.tsx b/frontend/src/Pages/Home.tsx deleted file mode 100644 index 7ce73a6..0000000 --- a/frontend/src/Pages/Home.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import reactLogo from "../assets/react.svg"; -import viteLogo from "/vite.svg"; -import "../index.css"; -import { CountButton } from "../Components/CountButton"; -import { Link } from "react-router-dom"; - -/** - * The home page of the application - * @returns {JSX.Element} The home page - */ -export default function HomePage(): JSX.Element { - return ( - <> - -

Vite + React

-
- - To Settings -
-

- Click on the Vite and React logos to learn more -

- - ); -} diff --git a/frontend/src/Pages/Settings.tsx b/frontend/src/Pages/Settings.tsx deleted file mode 100644 index b5bf81c..0000000 --- a/frontend/src/Pages/Settings.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import "../index.css"; -import { Link } from "react-router-dom"; - -/** - * The settings page of the application - * @returns {JSX.Element} The settings page - */ -export default function SettingsPage(): JSX.Element { - return ( - <> -

Very Fancy Settings Page

-
- To Home -
- - ); -} diff --git a/frontend/src/assets/react.svg b/frontend/src/assets/react.svg deleted file mode 100644 index 6c87de9..0000000 --- a/frontend/src/assets/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From 1672b100d91dc83105a1a62cc3b23d10a5bc1c7b Mon Sep 17 00:00:00 2001 From: Peter KW Date: Thu, 7 Mar 2024 17:48:43 +0100 Subject: [PATCH 3/4] added new page for admin and path in main --- .../src/Pages/AdminPages/AdminMenuPage.tsx | 27 +++++++++++++++++++ frontend/src/main.tsx | 5 ++++ 2 files changed, 32 insertions(+) create mode 100644 frontend/src/Pages/AdminPages/AdminMenuPage.tsx diff --git a/frontend/src/Pages/AdminPages/AdminMenuPage.tsx b/frontend/src/Pages/AdminPages/AdminMenuPage.tsx new file mode 100644 index 0000000..1b32ed4 --- /dev/null +++ b/frontend/src/Pages/AdminPages/AdminMenuPage.tsx @@ -0,0 +1,27 @@ +import { Link } from "react-router-dom"; +import BasicWindow from "../../Components/BasicWindow"; + +function AdminMenuPage(): JSX.Element { + const content = ( + <> +

Administrator Menu

+
+ +

+ Manage Users +

+ + +

+ Manage Projects +

+ +
+ + ); + + const buttons = <>; + + return ; +} +export default AdminMenuPage; diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index d5616c7..03091a2 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -5,6 +5,7 @@ import { createBrowserRouter, RouterProvider } from "react-router-dom"; import LoginPage from "./Pages/LoginPage.tsx"; import YourProjectsPage from "./Pages/YourProjectsPage.tsx"; import UserProjectPage from "./Pages/UserPages/UserProjectPage.tsx"; +import AdminMenuPage from "./Pages/AdminPages/AdminMenuPage.tsx"; // This is where the routes are mounted const router = createBrowserRouter([ @@ -20,6 +21,10 @@ const router = createBrowserRouter([ path: "/project", element: , }, + { + path: "/admin-menu", + element: , + }, ]); // Semi-hacky way to get the root element From 41674c39695adae637d095df53c7808f1cd5d3be Mon Sep 17 00:00:00 2001 From: Mattias Date: Fri, 8 Mar 2024 11:36:36 +0100 Subject: [PATCH 4/4] Removed example pages Home and Settings aswell as the react-logo --- frontend/src/Pages/Home.tsx | 36 --------------------------------- frontend/src/Pages/Settings.tsx | 17 ---------------- frontend/src/assets/react.svg | 1 - 3 files changed, 54 deletions(-) delete mode 100644 frontend/src/Pages/Home.tsx delete mode 100644 frontend/src/Pages/Settings.tsx delete mode 100644 frontend/src/assets/react.svg diff --git a/frontend/src/Pages/Home.tsx b/frontend/src/Pages/Home.tsx deleted file mode 100644 index 7ce73a6..0000000 --- a/frontend/src/Pages/Home.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import reactLogo from "../assets/react.svg"; -import viteLogo from "/vite.svg"; -import "../index.css"; -import { CountButton } from "../Components/CountButton"; -import { Link } from "react-router-dom"; - -/** - * The home page of the application - * @returns {JSX.Element} The home page - */ -export default function HomePage(): JSX.Element { - return ( - <> - -

Vite + React

-
- - To Settings -
-

- Click on the Vite and React logos to learn more -

- - ); -} diff --git a/frontend/src/Pages/Settings.tsx b/frontend/src/Pages/Settings.tsx deleted file mode 100644 index b5bf81c..0000000 --- a/frontend/src/Pages/Settings.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import "../index.css"; -import { Link } from "react-router-dom"; - -/** - * The settings page of the application - * @returns {JSX.Element} The settings page - */ -export default function SettingsPage(): JSX.Element { - return ( - <> -

Very Fancy Settings Page

-
- To Home -
- - ); -} diff --git a/frontend/src/assets/react.svg b/frontend/src/assets/react.svg deleted file mode 100644 index 6c87de9..0000000 --- a/frontend/src/assets/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file