fix(panel): reactive system theme detection

This commit is contained in:
Lemon-miaow committed 2026-06-28 03:41:50 +08:00
1 parent f5d00f389e
commit 832b200d55
5 files changed
+86 -92

No files matched your search

+1 -2
View File
@@ -6,8 +6,7 @@
<title>Felis · Control Panel</title>
<script>
try {
const theme = localStorage.getItem("felis-theme") || "system";
const dark = theme === "dark" || (theme === "system" && window.matchMedia("(prefers-color-scheme: dark)").matches);
const dark = window.matchMedia("(prefers-color-scheme: dark)").matches;
if (dark) {
document.documentElement.classList.add("dark");
} else {