add dev settings

This commit is contained in:
Alex Holliday
2025-06-20 14:28:20 +08:00
parent e610acb9c7
commit 6c51fc91b4
2 changed files with 42 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
import ConfigBox from "../../Components/ConfigBox";
// Utils
import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import Link from "../../Components/Link";
const SettingsDev = (isAdmin, HEADER_SX) => {
const { t } = useTranslation();
if (!isAdmin) return null;
return (
<ConfigBox>
<Box>
<Typography
component="h1"
variant="h2"
>
{t("settingsDev")}
</Typography>
<Typography sx={HEADER_SX}>{t("settingsDevDescription")}</Typography>
</Box>
<Box>
<Link
level="secondary"
label={t("settingsDevViewJobQueueDetails")}
url="/queue"
external={false}
/>
</Box>
</ConfigBox>
);
};
export default SettingsDev;
+5
View File
@@ -8,6 +8,7 @@ import SettingsPagespeed from "./SettingsPagespeed";
import SettingsDemoMonitors from "./SettingsDemoMonitors";
import SettingsAbout from "./SettingsAbout";
import SettingsEmail from "./SettingsEmail";
import SettingsDev from "./SettingsDev";
import Button from "@mui/material/Button";
// Utils
import { settingsValidation } from "../../Validation/validation";
@@ -208,6 +209,10 @@ const Settings = () => {
emailPasswordHasBeenReset={emailPasswordHasBeenReset}
setEmailPasswordHasBeenReset={setEmailPasswordHasBeenReset}
/>
<SettingsDev
isAdmin={isAdmin}
HEADER_SX={HEADING_SX}
/>
<SettingsAbout />
<Stack
direction="row"