mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-04 04:30:07 +00:00
feat: server group
This commit is contained in:
15
index.html
15
index.html
@@ -5,13 +5,16 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script>
|
||||
(function() {
|
||||
const storageKey = 'vite-ui-theme';
|
||||
const theme = localStorage.getItem(storageKey) || 'system';
|
||||
(function () {
|
||||
const storageKey = "vite-ui-theme";
|
||||
const theme = localStorage.getItem(storageKey) || "system";
|
||||
const root = document.documentElement;
|
||||
|
||||
if (theme === 'system') {
|
||||
const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
||||
|
||||
if (theme === "system") {
|
||||
const systemTheme = window.matchMedia("(prefers-color-scheme: dark)")
|
||||
.matches
|
||||
? "dark"
|
||||
: "light";
|
||||
root.classList.add(systemTheme);
|
||||
} else {
|
||||
root.classList.add(theme);
|
||||
|
||||
Reference in New Issue
Block a user