-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
67 lines (67 loc) · 1.9 KB
/
index.html
File metadata and controls
67 lines (67 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="/favicon.png" />
<title>MX Admin</title>
<script>
;(function () {
var STORE_KEY = 'mx-admin:ui'
var LEGACY_KEY = 'theme-mode'
try {
var mode = null
var raw = localStorage.getItem(STORE_KEY)
if (raw) {
try {
var parsed = JSON.parse(raw)
mode = parsed && parsed.state && parsed.state.themeMode
} catch (_) {}
}
if (!mode) {
var legacy = localStorage.getItem(LEGACY_KEY)
if (legacy) {
mode = legacy
try {
localStorage.setItem(
STORE_KEY,
JSON.stringify({
state: { themeMode: legacy, sidebarCollapsed: false },
version: 1,
}),
)
} catch (_) {}
}
}
if (!mode) mode = 'system'
var isDark =
mode === 'dark' ||
(mode === 'system' &&
window.matchMedia('(prefers-color-scheme: dark)').matches)
if (isDark) document.documentElement.classList.add('dark')
} catch (e) {}
})()
</script>
<style>
#initial-loader {
position: fixed;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
color: #999;
font: 14px/1.4 -apple-system, BlinkMacSystemFont, sans-serif;
}
html.dark #initial-loader {
background: #0a0a0a;
color: #666;
}
</style>
</head>
<body>
<div id="initial-loader">Loading…</div>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>