feat(panel): light/dark theme

This commit is contained in:
Lemon-miaow committed 2026-06-27 18:48:12 +08:00
1 parent dd2fc6fa82
commit 7b458daf77
7 files changed
+162 -12

No files matched your search

+12 -1
View File
@@ -1,9 +1,20 @@
<!doctype html>
<html lang="en" class="dark">
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<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);
if (dark) {
document.documentElement.classList.add("dark");
} else {
document.documentElement.classList.remove("dark");
}
} catch (_) {}
</script>
</head>
<body>
<div id="root"></div>