mirror of
https://github.com/sussy-code/smov.git
synced 2025-01-04 16:47:40 +01:00
Advertise admin panel on settings page
This commit is contained in:
parent
9f15be43c0
commit
aa39f42cd2
3 changed files with 37 additions and 0 deletions
|
@ -490,6 +490,11 @@
|
||||||
"editProfile": "Edit",
|
"editProfile": "Edit",
|
||||||
"logoutButton": "Log out"
|
"logoutButton": "Log out"
|
||||||
},
|
},
|
||||||
|
"admin": {
|
||||||
|
"title": "Admin panel",
|
||||||
|
"text": "See and use tools used to test sudo-flix's condition.",
|
||||||
|
"button": "Check it out"
|
||||||
|
},
|
||||||
"actions": {
|
"actions": {
|
||||||
"delete": {
|
"delete": {
|
||||||
"button": "Delete account",
|
"button": "Delete account",
|
||||||
|
|
|
@ -36,6 +36,7 @@ import { useSubtitleStore } from "@/stores/subtitles";
|
||||||
import { usePreviewThemeStore, useThemeStore } from "@/stores/theme";
|
import { usePreviewThemeStore, useThemeStore } from "@/stores/theme";
|
||||||
|
|
||||||
import { SubPageLayout } from "./layouts/SubPageLayout";
|
import { SubPageLayout } from "./layouts/SubPageLayout";
|
||||||
|
import { AdminPanelPart } from "./parts/settings/AdminPanel";
|
||||||
import { PreferencesPart } from "./parts/settings/PreferencesPart";
|
import { PreferencesPart } from "./parts/settings/PreferencesPart";
|
||||||
|
|
||||||
function SettingsLayout(props: { children: React.ReactNode }) {
|
function SettingsLayout(props: { children: React.ReactNode }) {
|
||||||
|
@ -260,6 +261,7 @@ export function SettingsPage() {
|
||||||
<RegisterCalloutPart />
|
<RegisterCalloutPart />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
<AdminPanelPart />
|
||||||
<div id="settings-preferences" className="mt-48">
|
<div id="settings-preferences" className="mt-48">
|
||||||
<PreferencesPart
|
<PreferencesPart
|
||||||
language={state.appLanguage.state}
|
language={state.appLanguage.state}
|
||||||
|
|
30
src/pages/parts/settings/AdminPanel.tsx
Normal file
30
src/pages/parts/settings/AdminPanel.tsx
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
|
import { Button } from "@/components/buttons/Button";
|
||||||
|
import { SolidSettingsCard } from "@/components/layout/SettingsCard";
|
||||||
|
import { Heading3 } from "@/components/utils/Text";
|
||||||
|
|
||||||
|
export function AdminPanelPart() {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<SolidSettingsCard
|
||||||
|
paddingClass="px-6 py-12"
|
||||||
|
className="grid grid-cols-2 gap-12 mt-5"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<Heading3>{t("settings.account.admin.title")}</Heading3>
|
||||||
|
<p className="text-type-text">{t("settings.account.admin.text")}</p>
|
||||||
|
</div>
|
||||||
|
<div className="flex justify-end items-center">
|
||||||
|
<Button theme="purple" onClick={() => navigate("/admin")}>
|
||||||
|
{t("settings.account.admin.button")}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</SolidSettingsCard>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
Loading…
Reference in a new issue