diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index 0e280b55..afc3dc9b 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -891,8 +891,7 @@ }, "admin": { "title": "Admin panel", - "text": "Utilize tools made for testing P-Stream's condition.", - "button": "Check it out" + "text": "Test P-Stream's condition." }, "actions": { "delete": { diff --git a/src/pages/Settings.tsx b/src/pages/Settings.tsx index 67589f00..c0ad1750 100644 --- a/src/pages/Settings.tsx +++ b/src/pages/Settings.tsx @@ -37,7 +37,6 @@ import { useSubtitleStore } from "@/stores/subtitles"; import { usePreviewThemeStore, useThemeStore } from "@/stores/theme"; import { SubPageLayout } from "./layouts/SubPageLayout"; -import { AdminPanelPart } from "./parts/settings/AdminPanel"; import { PreferencesPart } from "./parts/settings/PreferencesPart"; function SettingsLayout(props: { children: React.ReactNode }) { @@ -504,9 +503,6 @@ export function SettingsPage() { )} -
- -
- -
- {t("settings.account.admin.title")} -

{t("settings.account.admin.text")}

-
-
- -
-
-
- ); -} diff --git a/src/pages/parts/settings/SidebarPart.tsx b/src/pages/parts/settings/SidebarPart.tsx index 98404c84..36b496a6 100644 --- a/src/pages/parts/settings/SidebarPart.tsx +++ b/src/pages/parts/settings/SidebarPart.tsx @@ -1,9 +1,11 @@ import { useCallback, useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; +import { useNavigate } from "react-router-dom"; import Sticky from "react-sticky-el"; import { useAsync } from "react-use"; import { getBackendMeta } from "@/backend/accounts/meta"; +import { Button } from "@/components/buttons/Button"; import { Icon, Icons } from "@/components/Icon"; import { SidebarLink, SidebarSection } from "@/components/layout/Sidebar"; import { Divider } from "@/components/utils/Divider"; @@ -36,6 +38,7 @@ export function SidebarPart() { // eslint-disable-next-line no-restricted-globals const hostname = location.hostname; const [activeLink, setActiveLink] = useState(""); + const navigate = useNavigate(); const settingLinks = [ { @@ -204,6 +207,19 @@ export function SidebarPart() { )}

+ +
+

+ {t("settings.account.admin.title")} +

+ +