mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-02-04 20:50:07 +00:00
fix: missing notification group input in settings (#24)
* fix: missing notification group input in settings * change script name * license * update settings api * improve: cell width * feat: site name
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Outlet } from "react-router-dom";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { Card } from "@/components/ui/card";
|
||||
import { ThemeProvider } from "@/components/theme-provider";
|
||||
@@ -6,9 +7,16 @@ import Header from "@/components/header";
|
||||
import { Toaster } from "@/components/ui/sonner";
|
||||
|
||||
import { useTranslation } from "react-i18next";
|
||||
import useSetting from "@/hooks/useSetting";
|
||||
|
||||
export default function Root() {
|
||||
const { t } = useTranslation();
|
||||
const settings = useSetting();
|
||||
|
||||
useEffect(() => {
|
||||
document.title = settings?.site_name || "哪吒监控 Nezha Monitoring";
|
||||
}, [settings]);
|
||||
|
||||
return (
|
||||
<ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">
|
||||
<Card className="text-sm max-w-7xl mx-auto mt-5 min-h-[90%] flex flex-col justify-between">
|
||||
@@ -17,7 +25,7 @@ export default function Root() {
|
||||
<Outlet />
|
||||
</div>
|
||||
<footer className="mx-5 pb-5 text-foreground/60 font-thin text-center">
|
||||
© 2019-2024 {t('nezha')}
|
||||
© 2019-2024 {t('nezha')} {settings?.version}
|
||||
</footer>
|
||||
</Card>
|
||||
<Toaster />
|
||||
|
||||
Reference in New Issue
Block a user