From 362bb44aad3d4d5eaed5e68523f410e0f08c3fc2 Mon Sep 17 00:00:00 2001
From: Aurora Lahtela <24460436+AuroraLS3@users.noreply.github.com>
Date: Thu, 26 Jan 2023 14:18:51 +0200
Subject: [PATCH] Implement a page navigation button
Improve page loading and theme system
- The sidebar is visible while loading with css
There was an apparent problem when switching pages with the new switcher
- css variables are now used
- Theme color is applied to several buttons and texts
where previously Plan color was used
Affects issues:
- Implements #2357
---
Plan/react/dashboard/src/App.js | 4 +-
.../cards/query/QueryOptionsCard.js | 2 +-
.../components/modal/ColorSelectorModal.js | 6 +-
.../modal/PluginInformationModal.js | 20 +-
.../modal/VersionInformationModal.js | 8 +-
.../navigation/PageNavigationItem.js | 89 +++++
.../src/components/navigation/Sidebar.js | 19 +-
Plan/react/dashboard/src/hooks/themeHook.js | 39 +-
Plan/react/dashboard/src/style/sb-admin-2.css | 245 ++++++-------
Plan/react/dashboard/src/style/style.css | 341 +++++++++++-------
Plan/react/dashboard/src/util/colors.js | 43 +--
.../dashboard/src/views/layout/ErrorPage.js | 4 +-
.../dashboard/src/views/layout/ErrorsPage.js | 6 +-
.../dashboard/src/views/layout/LoginPage.js | 12 +-
.../dashboard/src/views/layout/NetworkPage.js | 23 +-
.../dashboard/src/views/layout/PlayerPage.js | 9 +-
.../dashboard/src/views/layout/PlayersPage.js | 15 +-
.../dashboard/src/views/layout/QueryPage.js | 10 +-
.../src/views/layout/RegisterPage.js | 10 +-
.../dashboard/src/views/layout/ServerPage.js | 14 +-
20 files changed, 522 insertions(+), 397 deletions(-)
create mode 100644 Plan/react/dashboard/src/components/navigation/PageNavigationItem.js
diff --git a/Plan/react/dashboard/src/App.js b/Plan/react/dashboard/src/App.js
index 707f25aae..8a529ab06 100644
--- a/Plan/react/dashboard/src/App.js
+++ b/Plan/react/dashboard/src/App.js
@@ -4,7 +4,7 @@ import './style/style.css';
import {BrowserRouter, Navigate, Route, Routes} from "react-router-dom";
import React from "react";
-import {ThemeContextProvider} from "./hooks/themeHook";
+import {NightModeCss, ThemeContextProvider, ThemeCss} from "./hooks/themeHook";
import axios from "axios";
import ErrorView from "./views/ErrorView";
import {faMapSigns} from "@fortawesome/free-solid-svg-icons";
@@ -99,8 +99,10 @@ function App() {
return (
+
+
}/>
}/>
diff --git a/Plan/react/dashboard/src/components/cards/query/QueryOptionsCard.js b/Plan/react/dashboard/src/components/cards/query/QueryOptionsCard.js
index 89c45453f..040f7cdf1 100644
--- a/Plan/react/dashboard/src/components/cards/query/QueryOptionsCard.js
+++ b/Plan/react/dashboard/src/components/cards/query/QueryOptionsCard.js
@@ -227,7 +227,7 @@ const QueryOptionsCard = () => {