diff --git a/index.html b/index.html index 3828d8b..f122d23 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,7 @@ name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> + NEZHA diff --git a/src/components/ThemeProvider.tsx b/src/components/ThemeProvider.tsx index 9e6cc0e..9beaffa 100644 --- a/src/components/ThemeProvider.tsx +++ b/src/components/ThemeProvider.tsx @@ -40,10 +40,18 @@ export function ThemeProvider({ : "light"; root.classList.add(systemTheme); + const themeColor = systemTheme === "dark" ? "#242424" : "#fafafa"; + document + .querySelector('meta[name="theme-color"]') + ?.setAttribute("content", themeColor); return; } root.classList.add(theme); + const themeColor = theme === "dark" ? "#242424" : "#fafafa"; + document + .querySelector('meta[name="theme-color"]') + ?.setAttribute("content", themeColor); }, [theme]); const value = { diff --git a/vite.config.ts b/vite.config.ts index cbbfea0..c487293 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -15,7 +15,7 @@ export default defineConfig({ name: "哪吒面板", short_name: "哪吒", description: "哪吒监控面板", - theme_color: "#ffffff", + theme_color: "#242424", icons: [ { src: "pwa-192x192.png",