From d418e2f1f860b1a0428bc5b5e6188ba683595762 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Fri, 27 Sep 2024 12:22:50 +0800 Subject: [PATCH] Add remainder of settings --- Client/src/Pages/AdvancedSettings/index.jsx | 78 ++++++++++++++++++--- 1 file changed, 68 insertions(+), 10 deletions(-) diff --git a/Client/src/Pages/AdvancedSettings/index.jsx b/Client/src/Pages/AdvancedSettings/index.jsx index 61cdd86a9..59e677138 100644 --- a/Client/src/Pages/AdvancedSettings/index.jsx +++ b/Client/src/Pages/AdvancedSettings/index.jsx @@ -1,8 +1,7 @@ import { useTheme } from "@emotion/react"; -import { Box, Stack, Typography, Button } from "@mui/material"; +import { Box, Stack, Typography } from "@mui/material"; import Field from "../../Components/Inputs/Field"; import Link from "../../Components/Link"; -import { logger } from "../../Utils/Logger"; import "./index.css"; import { useDispatch, useSelector } from "react-redux"; import { createToast } from "../../Utils/toastUtils"; @@ -10,18 +9,19 @@ import PropTypes from "prop-types"; import LoadingButton from "@mui/lab/LoadingButton"; import { ConfigBox } from "../Settings/styled"; import { useNavigate } from "react-router"; -import { - getAppSettings, - updateAppSettings, -} from "../../Features/Settings/settingsSlice"; -import { useEffect, useState } from "react"; +import { updateAppSettings } from "../../Features/Settings/settingsSlice"; +import { useState } from "react"; import Select from "../../Components/Inputs/Select"; const AdvancedSettings = ({ isAdmin }) => { - const theme = useTheme(); - const { user, authToken } = useSelector((state) => state.auth); - const dispatch = useDispatch(); const navigate = useNavigate(); + if (!isAdmin) { + navigate("/"); + } + + const theme = useTheme(); + const { authToken } = useSelector((state) => state.auth); + const dispatch = useDispatch(); const settings = useSelector((state) => state.settings); const [localSettings, setLocalSettings] = useState(settings); const logItems = [ @@ -143,6 +143,64 @@ const AdvancedSettings = ({ isAdmin }) => { /> + + + Server Settings + + Modify server settings here + + + + + + + + + + + About