-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
188 lines (168 loc) · 5.4 KB
/
index.html
File metadata and controls
188 lines (168 loc) · 5.4 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover, interactive-widget=resizes-content"
/>
<meta name="description" content="Parallel agentic development with Electron + React" />
<meta name="theme-color" content="#1e1e1e" />
<link rel="manifest" href="/manifest.json" crossorigin="use-credentials" vite-ignore />
<link rel="icon" href="/favicon.ico" data-theme-icon vite-ignore />
<link rel="apple-touch-icon" href="/icon.png" vite-ignore />
<title>mux - coder multiplexer</title>
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
background: var(--color-background, #1e1e1e);
color: var(--color-foreground, #d4d4d4);
font-family: var(
--font-primary,
-apple-system,
BlinkMacSystemFont,
"Geist",
system-ui,
"Segoe UI",
"Roboto",
"Helvetica Neue",
Arial,
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol"
);
font-size: 14px;
}
:root[data-theme="light"] body {
background: #f5f6f8;
}
#root {
height: 100vh; /* fallback for older browsers */
height: 100dvh;
overflow: hidden;
}
/* Pre-JS placeholder to avoid a blank screen on cold start. */
.boot-loader {
height: 100vh; /* fallback for older browsers */
height: 100dvh;
width: 100vw;
display: flex;
align-items: center;
justify-content: center;
}
.boot-loader__inner {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.boot-loader__spinner {
height: 48px;
width: 48px;
box-sizing: border-box;
border-radius: 9999px;
border: 4px solid var(--color-border-light, #262626);
border-top-color: transparent;
animation: boot-loader-spin 1s linear infinite;
}
:root[data-theme="light"] .boot-loader__spinner,
:root[data-theme$="-light"] .boot-loader__spinner {
border-color: var(--color-border-light, #d0d7de);
border-top-color: transparent;
}
.boot-loader__text {
margin: 0;
font-size: 14px;
color: var(--color-text-secondary, #6b6b6b);
}
:root[data-theme="light"] .boot-loader__text,
:root[data-theme$="-light"] .boot-loader__text {
color: var(--color-text-secondary, #607081);
}
@media (prefers-reduced-motion: reduce) {
.boot-loader__spinner {
animation: none;
}
}
@keyframes boot-loader-spin {
to {
transform: rotate(360deg);
}
}
</style>
<script>
(function () {
const THEME_KEY = "uiTheme";
const VALID_THEMES = new Set([
"light",
"dark",
"flexoki-light",
"flexoki-dark",
]);
const THEME_COLORS = {
dark: "#1e1e1e",
light: "#f5f6f8",
"flexoki-light": "#fffcf0",
"flexoki-dark": "#100f0f",
};
function getColorScheme(theme) {
return theme === "light" || theme.endsWith("-light") ? "light" : "dark";
}
try {
const stored = window.localStorage.getItem(THEME_KEY);
let parsed = null;
// Tolerate legacy values that were written as raw strings (not JSON).
if (stored) {
try {
parsed = JSON.parse(stored);
} catch {
parsed = stored;
}
}
const prefersLight = window.matchMedia
? window.matchMedia("(prefers-color-scheme: light)").matches
: false;
const fallbackTheme = prefersLight ? "light" : "dark";
let theme = fallbackTheme;
if (typeof parsed === "string") {
if (VALID_THEMES.has(parsed)) {
theme = parsed;
} else if (parsed.endsWith("-light")) {
theme = "light";
} else if (parsed.endsWith("-dark")) {
theme = "dark";
}
}
const colorScheme = getColorScheme(theme);
document.documentElement.dataset.theme = theme;
document.documentElement.style.colorScheme = colorScheme;
const metaThemeColor = document.querySelector('meta[name="theme-color"]');
if (metaThemeColor) {
metaThemeColor.setAttribute(
"content",
THEME_COLORS[theme] ?? THEME_COLORS[colorScheme] ?? "#1e1e1e"
);
}
} catch (error) {
console.warn("Failed to apply preferred theme early", error);
document.documentElement.dataset.theme = "dark";
document.documentElement.style.colorScheme = "dark";
}
})();
</script>
</head>
<body>
<div id="root">
<div class="boot-loader" role="status" aria-live="polite" aria-busy="true">
<div class="boot-loader__inner">
<div class="boot-loader__spinner" aria-hidden="true"></div>
<p class="boot-loader__text">Loading workspaces...</p>
</div>
</div>
</div>
<script type="module" src="/src/browser/main.tsx"></script>
</body>
</html>