-
Notifications
You must be signed in to change notification settings - Fork 177
Expand file tree
/
Copy pathindex.html
More file actions
222 lines (220 loc) · 8.07 KB
/
Copy pathindex.html
File metadata and controls
222 lines (220 loc) · 8.07 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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!doctype html>
<html lang="en" style="background:transparent;color-scheme:dark">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="dark" />
<title>Atlas</title>
<style>
/* html / body / #root are transparent so the NSVisualEffectView blur
applied in `src-tauri/src/lib.rs` is visible during the brief
window between the OS showing the window and React's first paint.
Without this the WKWebView's default opaque-white background sits
on top of our blurred window and we see a white flash.
The boot skeleton (`.atlas-boot`) is opaque #050505 and the real
app's `AppLayout` is opaque `bg-bg-base`, so the vibrancy is
only ever visible for that brief pre-paint moment. */
html, body, #root {
background: transparent;
margin: 0;
padding: 0;
height: 100%;
width: 100%;
overflow: hidden;
color-scheme: dark;
}
/* ── Boot skeleton ────────────────────────────────────────────────
Mirrors the default Atlas layout (titlebar + 220px chat sidebar +
chat content + bottom input bar) so cold-start feels like the
app is already there. Replaced atomically when ReactDOM.createRoot
commits its first render.
*/
.atlas-boot {
position: fixed;
inset: 0;
display: flex;
flex-direction: column;
background: #050505;
color: rgba(255, 255, 255, 0.3);
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
font-size: 11px;
user-select: none;
-webkit-user-select: none;
}
.atlas-boot-titlebar {
height: 29px;
flex-shrink: 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
background: #0a0a0a;
}
.atlas-boot-body {
flex: 1;
display: flex;
min-height: 0;
}
.atlas-boot-sidebar {
width: 220px;
flex-shrink: 0;
border-right: 1px solid rgba(255, 255, 255, 0.05);
background: #080808;
padding: 8px 12px;
display: flex;
flex-direction: column;
gap: 8px;
}
.atlas-boot-search {
height: 24px;
border-radius: 6px;
background: rgba(255, 255, 255, 0.03);
}
.atlas-boot-row {
height: 14px;
border-radius: 4px;
background: rgba(255, 255, 255, 0.04);
}
.atlas-boot-row.atlas-boot-row-tall { height: 24px; }
.atlas-boot-row.atlas-boot-row-narrow { width: 55%; }
.atlas-boot-row.atlas-boot-row-mid { width: 75%; }
.atlas-boot-row.atlas-boot-row-wide { width: 90%; }
.atlas-boot-main {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
}
.atlas-boot-content {
flex: 1;
display: flex;
flex-direction: column;
gap: 24px;
padding: 32px 96px;
overflow: hidden;
}
.atlas-boot-msg {
max-width: 760px;
margin: 0 auto;
width: 100%;
display: flex;
gap: 16px;
}
.atlas-boot-avatar {
width: 32px;
height: 32px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.04);
flex-shrink: 0;
}
.atlas-boot-bubble {
flex: 1;
display: flex;
flex-direction: column;
gap: 6px;
padding-top: 4px;
}
.atlas-boot-bubble > div {
height: 12px;
border-radius: 4px;
background: rgba(255, 255, 255, 0.04);
}
.atlas-boot-input {
margin: 0 auto 16px;
width: calc(100% - 32px);
max-width: 760px;
height: 86px;
border-radius: 14px;
background: #0c0c0c;
border: 1px solid rgba(255, 255, 255, 0.05);
flex-shrink: 0;
}
.atlas-boot-search,
.atlas-boot-row,
.atlas-boot-avatar,
.atlas-boot-bubble > div {
animation: atlas-boot-pulse 1.6s ease-in-out infinite;
}
@keyframes atlas-boot-pulse {
0%, 100% { opacity: 0.5; }
50% { opacity: 1; }
}
/* Native-macOS hairline border around the window.
Native apps like Zed and Chrome have a subtle 1px gray line
around the entire window frame; ours only had it on top
because the macOS titlebar provides that edge for free and
everything else paints to the WKWebView edge with no border.
A pointer-events:none overlay floats above the entire UI
(including the titlebar) and paints the inset shadow at the
WebView edge — macOS clips it to the window's rounded corners
the same way it clips our content. */
/* macOS already paints the top hairline as part of the titlebar,
so stacking our own on top of it doubles the line and looks
darker than the sides. Paint only left / right / bottom. */
/* Match macOS window corner radius (~10px on Sonoma/Sequoia) so
the border follows the rounded corner instead of getting clipped
by it — straight inset lines into a rounded corner read as a
faded/missing corner. We use `border` (not box-shadow) because
border honors border-radius cleanly on all four sides. The top
segment is hidden by the titlebar, which provides its own
hairline. */
.atlas-window-border {
position: fixed;
inset: 0;
pointer-events: none;
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 10px;
z-index: 99999;
}
</style>
</head>
<body style="background:transparent">
<div id="root">
<div class="atlas-boot" aria-hidden="true">
<div class="atlas-boot-titlebar"></div>
<div class="atlas-boot-body">
<div class="atlas-boot-sidebar">
<div class="atlas-boot-search"></div>
<div class="atlas-boot-row atlas-boot-row-tall atlas-boot-row-wide"></div>
<div class="atlas-boot-row atlas-boot-row-tall atlas-boot-row-mid"></div>
<div class="atlas-boot-row atlas-boot-row-tall atlas-boot-row-narrow"></div>
<div class="atlas-boot-row atlas-boot-row-tall atlas-boot-row-wide"></div>
<div class="atlas-boot-row atlas-boot-row-tall atlas-boot-row-mid"></div>
<div class="atlas-boot-row atlas-boot-row-tall atlas-boot-row-narrow"></div>
</div>
<div class="atlas-boot-main">
<div class="atlas-boot-content">
<div class="atlas-boot-msg">
<div class="atlas-boot-avatar"></div>
<div class="atlas-boot-bubble">
<div style="width:70%"></div>
<div style="width:90%"></div>
<div style="width:55%"></div>
</div>
</div>
<div class="atlas-boot-msg">
<div class="atlas-boot-avatar"></div>
<div class="atlas-boot-bubble">
<div style="width:85%"></div>
<div style="width:60%"></div>
<div style="width:75%"></div>
<div style="width:40%"></div>
</div>
</div>
</div>
<div class="atlas-boot-input"></div>
</div>
</div>
</div>
</div>
<div class="atlas-window-border" aria-hidden="true"></div>
<script>
// Defer boot-skeleton removal until React dispatches `atlas:app-ready`.
// The skeleton stays visible across React's first commit + the Rust
// bootstrap IPC so the user never sees an empty white flash between
// them.
window.addEventListener("atlas:app-ready", function () {
var skel = document.querySelector(".atlas-boot");
if (skel && skel.parentNode) skel.parentNode.removeChild(skel);
}, { once: true });
</script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>