fix: improve theme management and styling for better user experience

This commit is contained in:
hamster1963
2026-06-04 11:11:49 +08:00
parent c8b7dcc8a8
commit 70532eb44d
4 changed files with 77 additions and 102 deletions
+6 -1
View File
@@ -8,7 +8,12 @@ export function ThemeColorManager() {
useEffect(() => {
const updateThemeColor = () => {
const currentTheme = theme;
const currentTheme =
theme === "system"
? window.matchMedia("(prefers-color-scheme: dark)").matches
? "dark"
: "light"
: theme;
const meta = document.querySelector('meta[name="theme-color"]');
if (!meta) {