@app-vitals/agent-admin 1.91.1 → 1.92.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/admin-ui-github-identity-pages.ts +4 -4
- package/src/admin-ui-installation-repos-pages.ts +4 -4
- package/src/admin-ui-layout.ts +3 -0
- package/src/admin-ui-layout.unit.test.ts +16 -0
- package/src/admin-ui-pages.ts +111 -110
- package/src/admin-ui-pages.unit.test.ts +5 -3
- package/src/admin-ui-push-test.ts +5 -6
- package/src/admin-ui-styles.ts +113 -113
- package/src/admin-ui-styles.unit.test.ts +5 -40
- package/src/admin-ui-templates-pages.ts +1 -1
- package/src/push-toggle.ts +1 -1
|
@@ -201,7 +201,9 @@ describe("renderLoginPage", () => {
|
|
|
201
201
|
|
|
202
202
|
test("XSS: error string is escaped", () => {
|
|
203
203
|
const html = renderLoginPage({ error: '<script>alert("xss")</script>' });
|
|
204
|
-
|
|
204
|
+
// The page shell carries its own theme script, so assert on the payload.
|
|
205
|
+
expect(html).not.toContain("<script>alert");
|
|
206
|
+
expect(html).not.toContain('alert("xss")');
|
|
205
207
|
expect(html).toContain("<script>");
|
|
206
208
|
});
|
|
207
209
|
|
|
@@ -1885,7 +1887,7 @@ describe("renderAgentDetailPage — tokens", () => {
|
|
|
1885
1887
|
const noLabel: TokenItem = { ...TOKEN_ACTIVE, label: null };
|
|
1886
1888
|
const html = render([noLabel]);
|
|
1887
1889
|
// The template renders a grey dash span when label is null
|
|
1888
|
-
expect(html).toContain("color
|
|
1890
|
+
expect(html).toContain("color:var(--vos-text-faint)");
|
|
1889
1891
|
});
|
|
1890
1892
|
|
|
1891
1893
|
test("XSS: token label is escaped", () => {
|
|
@@ -2770,7 +2772,7 @@ describe("renderChatThreadPage", () => {
|
|
|
2770
2772
|
[ASSISTANT_MSG],
|
|
2771
2773
|
"alice",
|
|
2772
2774
|
);
|
|
2773
|
-
expect(html).toContain("
|
|
2775
|
+
expect(html).toContain("var(--vos-success-bg)");
|
|
2774
2776
|
expect(html).toContain("flex-start");
|
|
2775
2777
|
});
|
|
2776
2778
|
|
|
@@ -53,9 +53,8 @@ export function registerPushTestRoute(
|
|
|
53
53
|
if (!deps.pushEnabled || !deps.pushService) {
|
|
54
54
|
return c.json({ error: "push_disabled" }, 503);
|
|
55
55
|
}
|
|
56
|
-
const result = await deps.pushService.sendToUsers(
|
|
57
|
-
|
|
58
|
-
() => JSON.stringify(PUSH_TEST_PAYLOAD),
|
|
56
|
+
const result = await deps.pushService.sendToUsers([c.var.userEmail], () =>
|
|
57
|
+
JSON.stringify(PUSH_TEST_PAYLOAD),
|
|
59
58
|
);
|
|
60
59
|
const body: PushTestResponse = { ok: true, ...result };
|
|
61
60
|
return c.json(body, 200);
|
|
@@ -70,10 +69,10 @@ export function registerPushTestRoute(
|
|
|
70
69
|
*/
|
|
71
70
|
export function renderPushTestControl(): string {
|
|
72
71
|
return `
|
|
73
|
-
<div style="margin-top:12px;padding-top:12px;border-top:1px solid
|
|
72
|
+
<div style="margin-top:12px;padding-top:12px;border-top:1px solid var(--vos-border)">
|
|
74
73
|
<button type="button" id="push-test-btn" class="btn btn-secondary">Send test notification</button>
|
|
75
|
-
<span id="push-test-status" style="font-size:12px;color
|
|
76
|
-
<p style="font-size:12px;color
|
|
74
|
+
<span id="push-test-status" style="font-size:12px;color:var(--vos-text-muted);margin-left:8px"></span>
|
|
75
|
+
<p style="font-size:12px;color:var(--vos-text-muted);margin:8px 0 0">Following a session does not subscribe this device. Enable notifications above first, then send a test to confirm it reaches this phone.</p>
|
|
77
76
|
</div>
|
|
78
77
|
<script>
|
|
79
78
|
(function() {
|
package/src/admin-ui-styles.ts
CHANGED
|
@@ -28,7 +28,7 @@ export function baseStyles(): string {
|
|
|
28
28
|
.page-title {
|
|
29
29
|
font-size: 22px;
|
|
30
30
|
font-weight: 700;
|
|
31
|
-
color:
|
|
31
|
+
color: var(--vos-text);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/* ─── Buttons ───────────────────────────────────────── */
|
|
@@ -46,28 +46,28 @@ export function baseStyles(): string {
|
|
|
46
46
|
text-decoration: none;
|
|
47
47
|
}
|
|
48
48
|
.btn-primary {
|
|
49
|
-
background:
|
|
50
|
-
color:
|
|
51
|
-
border-color:
|
|
49
|
+
background: var(--vos-primary);
|
|
50
|
+
color: var(--vos-primary-text);
|
|
51
|
+
border-color: var(--vos-primary);
|
|
52
52
|
}
|
|
53
|
-
.btn-primary:hover { background:
|
|
53
|
+
.btn-primary:hover { background: var(--vos-primary-hover); }
|
|
54
54
|
.btn-secondary {
|
|
55
|
-
background:
|
|
56
|
-
color:
|
|
57
|
-
border-color:
|
|
55
|
+
background: var(--vos-surface);
|
|
56
|
+
color: var(--vos-text);
|
|
57
|
+
border-color: var(--vos-border);
|
|
58
58
|
}
|
|
59
|
-
.btn-secondary:hover { background:
|
|
59
|
+
.btn-secondary:hover { background: var(--vos-surface-subtle); }
|
|
60
60
|
.btn-danger {
|
|
61
|
-
background:
|
|
62
|
-
color:
|
|
63
|
-
border-color:
|
|
61
|
+
background: var(--vos-surface);
|
|
62
|
+
color: var(--vos-danger);
|
|
63
|
+
border-color: var(--vos-danger-bg);
|
|
64
64
|
}
|
|
65
|
-
.btn-danger:hover { background:
|
|
65
|
+
.btn-danger:hover { background: var(--vos-danger-bg); }
|
|
66
66
|
|
|
67
67
|
/* ─── Cards / panels ────────────────────────────────── */
|
|
68
68
|
.card {
|
|
69
|
-
background:
|
|
70
|
-
border: 1px solid
|
|
69
|
+
background: var(--vos-surface);
|
|
70
|
+
border: 1px solid var(--vos-border);
|
|
71
71
|
border-radius: 10px;
|
|
72
72
|
padding: 20px 24px;
|
|
73
73
|
margin-bottom: 16px;
|
|
@@ -75,10 +75,10 @@ export function baseStyles(): string {
|
|
|
75
75
|
.card-title {
|
|
76
76
|
font-size: 14px;
|
|
77
77
|
font-weight: 600;
|
|
78
|
-
color:
|
|
78
|
+
color: var(--vos-text);
|
|
79
79
|
margin-bottom: 16px;
|
|
80
80
|
padding-bottom: 12px;
|
|
81
|
-
border-bottom: 1px solid
|
|
81
|
+
border-bottom: 1px solid var(--vos-surface-subtle);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/* ─── Agent detail page — stat strip (AGA-1.2) ──────────── */
|
|
@@ -89,8 +89,8 @@ export function baseStyles(): string {
|
|
|
89
89
|
margin-bottom: 24px;
|
|
90
90
|
}
|
|
91
91
|
.stat-tile {
|
|
92
|
-
background:
|
|
93
|
-
border: 1px solid
|
|
92
|
+
background: var(--vos-surface);
|
|
93
|
+
border: 1px solid var(--vos-border);
|
|
94
94
|
border-radius: 10px;
|
|
95
95
|
padding: 16px;
|
|
96
96
|
text-align: center;
|
|
@@ -98,7 +98,7 @@ export function baseStyles(): string {
|
|
|
98
98
|
.stat-tile-label {
|
|
99
99
|
font-size: 12px;
|
|
100
100
|
font-weight: 600;
|
|
101
|
-
color:
|
|
101
|
+
color: var(--vos-text-muted);
|
|
102
102
|
text-transform: uppercase;
|
|
103
103
|
letter-spacing: 0.5px;
|
|
104
104
|
margin-bottom: 8px;
|
|
@@ -106,20 +106,20 @@ export function baseStyles(): string {
|
|
|
106
106
|
.stat-tile-value {
|
|
107
107
|
font-size: 28px;
|
|
108
108
|
font-weight: 700;
|
|
109
|
-
color:
|
|
109
|
+
color: var(--vos-text);
|
|
110
110
|
}
|
|
111
111
|
.stat-tile-value span {
|
|
112
112
|
display: block;
|
|
113
113
|
}
|
|
114
114
|
.stat-tile-warning {
|
|
115
|
-
background:
|
|
116
|
-
border-color:
|
|
115
|
+
background: var(--vos-warning-bg);
|
|
116
|
+
border-color: var(--vos-warning-border);
|
|
117
117
|
}
|
|
118
118
|
.stat-tile-warning .stat-tile-label {
|
|
119
|
-
color:
|
|
119
|
+
color: var(--vos-warning-text);
|
|
120
120
|
}
|
|
121
121
|
.stat-tile-warning .stat-tile-value {
|
|
122
|
-
color:
|
|
122
|
+
color: var(--vos-warning-text);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
/* ─── Tables ────────────────────────────────────────── */
|
|
@@ -134,27 +134,27 @@ export function baseStyles(): string {
|
|
|
134
134
|
font-weight: 600;
|
|
135
135
|
text-transform: uppercase;
|
|
136
136
|
letter-spacing: 0.5px;
|
|
137
|
-
color:
|
|
137
|
+
color: var(--vos-text-faint);
|
|
138
138
|
padding: 8px 12px;
|
|
139
|
-
border-bottom: 1px solid
|
|
139
|
+
border-bottom: 1px solid var(--vos-surface-subtle);
|
|
140
140
|
}
|
|
141
141
|
.data-table td {
|
|
142
142
|
padding: 10px 12px;
|
|
143
|
-
border-bottom: 1px solid
|
|
144
|
-
color:
|
|
143
|
+
border-bottom: 1px solid var(--vos-surface-subtle);
|
|
144
|
+
color: var(--vos-text-body);
|
|
145
145
|
vertical-align: middle;
|
|
146
146
|
}
|
|
147
147
|
.data-table tr:last-child td {
|
|
148
148
|
border-bottom: none;
|
|
149
149
|
}
|
|
150
150
|
.data-table tr:hover td {
|
|
151
|
-
background:
|
|
151
|
+
background: var(--vos-surface-muted);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
/* ─── Agent list ────────────────────────────────────── */
|
|
155
155
|
.agent-link {
|
|
156
156
|
font-weight: 500;
|
|
157
|
-
color:
|
|
157
|
+
color: var(--vos-text);
|
|
158
158
|
text-decoration: none;
|
|
159
159
|
}
|
|
160
160
|
.agent-link:hover { text-decoration: underline; }
|
|
@@ -167,7 +167,7 @@ export function baseStyles(): string {
|
|
|
167
167
|
display: block;
|
|
168
168
|
font-size: 13px;
|
|
169
169
|
font-weight: 500;
|
|
170
|
-
color:
|
|
170
|
+
color: var(--vos-text-body);
|
|
171
171
|
margin-bottom: 6px;
|
|
172
172
|
}
|
|
173
173
|
.form-input {
|
|
@@ -175,14 +175,14 @@ export function baseStyles(): string {
|
|
|
175
175
|
padding: 8px 12px;
|
|
176
176
|
font-size: 14px;
|
|
177
177
|
font-family: inherit;
|
|
178
|
-
border: 1px solid
|
|
178
|
+
border: 1px solid var(--vos-border);
|
|
179
179
|
border-radius: 6px;
|
|
180
|
-
background:
|
|
181
|
-
color:
|
|
180
|
+
background: var(--vos-surface);
|
|
181
|
+
color: var(--vos-text);
|
|
182
182
|
}
|
|
183
183
|
.form-input:focus {
|
|
184
184
|
outline: none;
|
|
185
|
-
border-color:
|
|
185
|
+
border-color: var(--vos-primary);
|
|
186
186
|
}
|
|
187
187
|
.form-row {
|
|
188
188
|
display: flex;
|
|
@@ -202,8 +202,8 @@ export function baseStyles(): string {
|
|
|
202
202
|
justify-content: center;
|
|
203
203
|
}
|
|
204
204
|
.login-card {
|
|
205
|
-
background:
|
|
206
|
-
border: 1px solid
|
|
205
|
+
background: var(--vos-surface);
|
|
206
|
+
border: 1px solid var(--vos-border);
|
|
207
207
|
border-radius: 12px;
|
|
208
208
|
padding: 40px;
|
|
209
209
|
width: 100%;
|
|
@@ -216,7 +216,7 @@ export function baseStyles(): string {
|
|
|
216
216
|
}
|
|
217
217
|
.login-subtitle {
|
|
218
218
|
font-size: 13px;
|
|
219
|
-
color:
|
|
219
|
+
color: var(--vos-text-muted);
|
|
220
220
|
margin-bottom: 28px;
|
|
221
221
|
}
|
|
222
222
|
|
|
@@ -228,19 +228,19 @@ export function baseStyles(): string {
|
|
|
228
228
|
margin-bottom: 16px;
|
|
229
229
|
}
|
|
230
230
|
.alert-error {
|
|
231
|
-
background:
|
|
232
|
-
color:
|
|
233
|
-
border: 1px solid
|
|
231
|
+
background: var(--vos-danger-bg);
|
|
232
|
+
color: var(--vos-danger);
|
|
233
|
+
border: 1px solid var(--vos-danger-border);
|
|
234
234
|
}
|
|
235
235
|
.alert-success {
|
|
236
|
-
background:
|
|
237
|
-
color:
|
|
238
|
-
border: 1px solid
|
|
236
|
+
background: var(--vos-success-bg);
|
|
237
|
+
color: var(--vos-success-text);
|
|
238
|
+
border: 1px solid var(--vos-success-border);
|
|
239
239
|
}
|
|
240
240
|
.alert-warning {
|
|
241
|
-
background:
|
|
242
|
-
color:
|
|
243
|
-
border: 1px solid
|
|
241
|
+
background: var(--vos-warning-bg);
|
|
242
|
+
color: var(--vos-warning-text);
|
|
243
|
+
border: 1px solid var(--vos-warning-border);
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
/* ─── Badges ────────────────────────────────────────── */
|
|
@@ -253,24 +253,24 @@ export function baseStyles(): string {
|
|
|
253
253
|
border-radius: 9999px;
|
|
254
254
|
}
|
|
255
255
|
.badge-green {
|
|
256
|
-
background:
|
|
257
|
-
color:
|
|
256
|
+
background: var(--vos-success-bg);
|
|
257
|
+
color: var(--vos-success-text);
|
|
258
258
|
}
|
|
259
259
|
.badge-gray {
|
|
260
|
-
background:
|
|
261
|
-
color:
|
|
260
|
+
background: var(--vos-surface-subtle);
|
|
261
|
+
color: var(--vos-text-muted);
|
|
262
262
|
}
|
|
263
263
|
.badge-warning {
|
|
264
|
-
background:
|
|
265
|
-
color:
|
|
264
|
+
background: var(--vos-warning-border);
|
|
265
|
+
color: var(--vos-warning-text);
|
|
266
266
|
}
|
|
267
267
|
.badge-template {
|
|
268
|
-
background:
|
|
269
|
-
color:
|
|
268
|
+
background: var(--vos-info-bg);
|
|
269
|
+
color: var(--vos-info-text);
|
|
270
270
|
}
|
|
271
271
|
.badge-custom {
|
|
272
|
-
background:
|
|
273
|
-
color:
|
|
272
|
+
background: var(--vos-violet-bg);
|
|
273
|
+
color: var(--vos-violet-text);
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
/* ─── Scope pills (filter chips) ────────────────────── */
|
|
@@ -282,22 +282,22 @@ export function baseStyles(): string {
|
|
|
282
282
|
font-weight: 500;
|
|
283
283
|
padding: 3px 10px;
|
|
284
284
|
border-radius: 9999px;
|
|
285
|
-
background:
|
|
286
|
-
color:
|
|
287
|
-
border: 1px solid
|
|
285
|
+
background: var(--vos-surface-subtle);
|
|
286
|
+
color: var(--vos-text-body);
|
|
287
|
+
border: 1px solid var(--vos-border);
|
|
288
288
|
}
|
|
289
289
|
.scope-pill.active {
|
|
290
|
-
background:
|
|
291
|
-
color:
|
|
292
|
-
border-color:
|
|
290
|
+
background: var(--vos-brand-bg);
|
|
291
|
+
color: var(--vos-brand-strong);
|
|
292
|
+
border-color: var(--vos-brand-border);
|
|
293
293
|
}
|
|
294
294
|
.scope-pill-remove {
|
|
295
295
|
cursor: pointer;
|
|
296
|
-
color:
|
|
296
|
+
color: var(--vos-text-faint);
|
|
297
297
|
font-weight: 700;
|
|
298
298
|
line-height: 1;
|
|
299
299
|
}
|
|
300
|
-
.scope-pill-remove:hover { color:
|
|
300
|
+
.scope-pill-remove:hover { color: var(--vos-text-body); }
|
|
301
301
|
|
|
302
302
|
/* Org/Repo multiselect filters (renderRepoOrgFilterFields) restyled as
|
|
303
303
|
pill/tag-style fields (AXR-1.1). These stay two independent
|
|
@@ -309,11 +309,11 @@ export function baseStyles(): string {
|
|
|
309
309
|
}
|
|
310
310
|
.scope-select {
|
|
311
311
|
border-radius: 10px;
|
|
312
|
-
background:
|
|
312
|
+
background: var(--vos-surface-muted);
|
|
313
313
|
}
|
|
314
314
|
.scope-select option:checked {
|
|
315
|
-
background:
|
|
316
|
-
color:
|
|
315
|
+
background: var(--vos-brand-bg);
|
|
316
|
+
color: var(--vos-brand-strong);
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
/* ─── Board / column / card layout ──────────────────── */
|
|
@@ -329,8 +329,8 @@ export function baseStyles(): string {
|
|
|
329
329
|
display: flex;
|
|
330
330
|
flex-direction: column;
|
|
331
331
|
gap: 10px;
|
|
332
|
-
background:
|
|
333
|
-
border: 1px solid
|
|
332
|
+
background: var(--vos-surface-muted);
|
|
333
|
+
border: 1px solid var(--vos-border);
|
|
334
334
|
border-radius: 10px;
|
|
335
335
|
padding: 12px;
|
|
336
336
|
}
|
|
@@ -340,7 +340,7 @@ export function baseStyles(): string {
|
|
|
340
340
|
justify-content: space-between;
|
|
341
341
|
font-size: 12px;
|
|
342
342
|
font-weight: 600;
|
|
343
|
-
color:
|
|
343
|
+
color: var(--vos-text-muted);
|
|
344
344
|
text-transform: uppercase;
|
|
345
345
|
letter-spacing: 0.5px;
|
|
346
346
|
margin-bottom: 4px;
|
|
@@ -348,9 +348,9 @@ export function baseStyles(): string {
|
|
|
348
348
|
.column-count {
|
|
349
349
|
font-size: 11px;
|
|
350
350
|
font-weight: 600;
|
|
351
|
-
color:
|
|
352
|
-
background:
|
|
353
|
-
border: 1px solid
|
|
351
|
+
color: var(--vos-text-faint);
|
|
352
|
+
background: var(--vos-surface);
|
|
353
|
+
border: 1px solid var(--vos-border);
|
|
354
354
|
border-radius: 9999px;
|
|
355
355
|
padding: 1px 8px;
|
|
356
356
|
}
|
|
@@ -363,19 +363,19 @@ export function baseStyles(): string {
|
|
|
363
363
|
|
|
364
364
|
/* ─── Additional badge variants (beyond badge-hitl/badge-dep) ───────── */
|
|
365
365
|
.badge-purple {
|
|
366
|
-
background:
|
|
367
|
-
color:
|
|
366
|
+
background: var(--vos-violet-bg);
|
|
367
|
+
color: var(--vos-violet-text);
|
|
368
368
|
}
|
|
369
369
|
.badge-teal {
|
|
370
|
-
background:
|
|
371
|
-
color:
|
|
370
|
+
background: var(--vos-teal-bg);
|
|
371
|
+
color: var(--vos-teal-text);
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
/* ─── Header tooltip (hover, data-tip attribute) ────── */
|
|
375
375
|
.header-tooltip {
|
|
376
376
|
position: relative;
|
|
377
377
|
cursor: help;
|
|
378
|
-
border-bottom: 1px dotted
|
|
378
|
+
border-bottom: 1px dotted var(--vos-text-faint);
|
|
379
379
|
}
|
|
380
380
|
.header-tooltip[data-tip]:hover::after {
|
|
381
381
|
content: attr(data-tip);
|
|
@@ -384,8 +384,8 @@ export function baseStyles(): string {
|
|
|
384
384
|
left: 50%;
|
|
385
385
|
transform: translateX(-50%);
|
|
386
386
|
white-space: nowrap;
|
|
387
|
-
background:
|
|
388
|
-
color:
|
|
387
|
+
background: var(--vos-primary);
|
|
388
|
+
color: var(--vos-primary-text);
|
|
389
389
|
font-size: 11px;
|
|
390
390
|
font-weight: 500;
|
|
391
391
|
padding: 4px 8px;
|
|
@@ -400,7 +400,7 @@ export function baseStyles(): string {
|
|
|
400
400
|
width: 8px;
|
|
401
401
|
height: 8px;
|
|
402
402
|
border-radius: 9999px;
|
|
403
|
-
background:
|
|
403
|
+
background: var(--vos-border-strong);
|
|
404
404
|
}
|
|
405
405
|
.heartbeat-dot.fresh { background: #22c55e; }
|
|
406
406
|
.heartbeat-dot.aging { background: #f59e0b; }
|
|
@@ -414,7 +414,7 @@ export function baseStyles(): string {
|
|
|
414
414
|
cursor: pointer;
|
|
415
415
|
font-size: 12px;
|
|
416
416
|
font-weight: 500;
|
|
417
|
-
color:
|
|
417
|
+
color: var(--vos-text-muted);
|
|
418
418
|
list-style: none;
|
|
419
419
|
}
|
|
420
420
|
.more-filters summary::-webkit-details-marker { display: none; }
|
|
@@ -428,7 +428,7 @@ export function baseStyles(): string {
|
|
|
428
428
|
transform: rotate(90deg);
|
|
429
429
|
}
|
|
430
430
|
.more-filters[open] summary {
|
|
431
|
-
color:
|
|
431
|
+
color: var(--vos-text);
|
|
432
432
|
}
|
|
433
433
|
/* Active-filter count badge — visible whether collapsed or open. */
|
|
434
434
|
.more-filters summary .badge {
|
|
@@ -451,19 +451,19 @@ export function baseStyles(): string {
|
|
|
451
451
|
.provision-step {
|
|
452
452
|
font-size: 12px;
|
|
453
453
|
font-weight: 500;
|
|
454
|
-
color:
|
|
454
|
+
color: var(--vos-text-faint);
|
|
455
455
|
padding: 4px 10px;
|
|
456
456
|
border-radius: 4px;
|
|
457
|
-
background:
|
|
457
|
+
background: var(--vos-surface-subtle);
|
|
458
458
|
}
|
|
459
459
|
.provision-step.active {
|
|
460
|
-
background:
|
|
461
|
-
color:
|
|
460
|
+
background: var(--vos-primary);
|
|
461
|
+
color: var(--vos-primary-text);
|
|
462
462
|
}
|
|
463
463
|
.oauth-url-box {
|
|
464
464
|
word-break: break-all;
|
|
465
|
-
background:
|
|
466
|
-
border: 1px solid
|
|
465
|
+
background: var(--vos-surface-muted);
|
|
466
|
+
border: 1px solid var(--vos-border);
|
|
467
467
|
border-radius: 6px;
|
|
468
468
|
padding: 12px 14px;
|
|
469
469
|
font-size: 13px;
|
|
@@ -475,7 +475,7 @@ export function baseStyles(): string {
|
|
|
475
475
|
.empty-state {
|
|
476
476
|
text-align: center;
|
|
477
477
|
padding: 32px;
|
|
478
|
-
color:
|
|
478
|
+
color: var(--vos-text-faint);
|
|
479
479
|
font-size: 13px;
|
|
480
480
|
}
|
|
481
481
|
|
|
@@ -494,11 +494,11 @@ export function baseStyles(): string {
|
|
|
494
494
|
overflow-x: auto;
|
|
495
495
|
-webkit-overflow-scrolling: touch;
|
|
496
496
|
/* Scroll-shadow: fades appear at edges when content overflows */
|
|
497
|
-
background-color:
|
|
497
|
+
background-color: var(--vos-surface);
|
|
498
498
|
background-image:
|
|
499
|
-
linear-gradient(to right,
|
|
499
|
+
linear-gradient(to right, var(--vos-surface), var(--vos-surface)),
|
|
500
500
|
linear-gradient(to right, rgba(0,0,0,0.05), transparent),
|
|
501
|
-
linear-gradient(to left,
|
|
501
|
+
linear-gradient(to left, var(--vos-surface), var(--vos-surface)),
|
|
502
502
|
linear-gradient(to left, rgba(0,0,0,0.05), transparent);
|
|
503
503
|
background-position: left, left, right, right;
|
|
504
504
|
background-size: 20px 100%, 20px 100%, 24px 100%, 24px 100%;
|
|
@@ -586,32 +586,32 @@ export function baseStyles(): string {
|
|
|
586
586
|
flex: 0 0 260px;
|
|
587
587
|
width: 260px;
|
|
588
588
|
padding-right: 16px;
|
|
589
|
-
border-right: 1px solid
|
|
589
|
+
border-right: 1px solid var(--vos-border);
|
|
590
590
|
}
|
|
591
591
|
.settings-nav-mobile { display: none; }
|
|
592
592
|
.settings-nav-section { margin-bottom: 16px; }
|
|
593
593
|
.settings-nav-label {
|
|
594
594
|
font-size: 12px;
|
|
595
595
|
font-weight: 600;
|
|
596
|
-
color:
|
|
596
|
+
color: var(--vos-text-muted);
|
|
597
597
|
text-transform: uppercase;
|
|
598
598
|
letter-spacing: 0.04em;
|
|
599
599
|
padding: 0 12px 6px;
|
|
600
600
|
margin-bottom: 6px;
|
|
601
|
-
border-bottom: 1px solid
|
|
601
|
+
border-bottom: 1px solid var(--vos-border);
|
|
602
602
|
}
|
|
603
603
|
.settings-nav-link {
|
|
604
604
|
display: block;
|
|
605
605
|
padding: 6px 12px;
|
|
606
606
|
border-radius: 6px;
|
|
607
607
|
font-size: 14px;
|
|
608
|
-
color:
|
|
608
|
+
color: var(--vos-text);
|
|
609
609
|
text-decoration: none;
|
|
610
610
|
}
|
|
611
|
-
.settings-nav-link:hover { background:
|
|
611
|
+
.settings-nav-link:hover { background: var(--vos-bg); }
|
|
612
612
|
.settings-nav-link[aria-current="page"] {
|
|
613
|
-
background:
|
|
614
|
-
color:
|
|
613
|
+
background: var(--vos-brand-bg);
|
|
614
|
+
color: var(--vos-brand);
|
|
615
615
|
font-weight: 600;
|
|
616
616
|
}
|
|
617
617
|
.settings-content { flex: 1 1 auto; min-width: 0; }
|
|
@@ -624,30 +624,30 @@ export function baseStyles(): string {
|
|
|
624
624
|
.settings-content h1 {
|
|
625
625
|
font-size: 24px;
|
|
626
626
|
font-weight: 600;
|
|
627
|
-
color:
|
|
627
|
+
color: var(--vos-text);
|
|
628
628
|
margin: 0 0 24px;
|
|
629
629
|
padding-bottom: 12px;
|
|
630
|
-
border-bottom: 1px solid
|
|
630
|
+
border-bottom: 1px solid var(--vos-border);
|
|
631
631
|
}
|
|
632
632
|
.settings-section-title {
|
|
633
633
|
font-size: 18px;
|
|
634
634
|
font-weight: 600;
|
|
635
|
-
color:
|
|
635
|
+
color: var(--vos-text);
|
|
636
636
|
margin: 32px 0 16px;
|
|
637
637
|
padding-bottom: 8px;
|
|
638
|
-
border-bottom: 1px solid
|
|
638
|
+
border-bottom: 1px solid var(--vos-border);
|
|
639
639
|
}
|
|
640
640
|
.settings-danger-zone {
|
|
641
|
-
border: 1px solid
|
|
642
|
-
background:
|
|
641
|
+
border: 1px solid var(--vos-danger);
|
|
642
|
+
background: var(--vos-surface);
|
|
643
643
|
border-radius: 8px;
|
|
644
644
|
padding: 16px 20px;
|
|
645
645
|
margin-top: 16px;
|
|
646
646
|
}
|
|
647
647
|
.settings-danger-zone > .settings-section-title {
|
|
648
|
-
color:
|
|
648
|
+
color: var(--vos-danger);
|
|
649
649
|
margin-top: 0;
|
|
650
|
-
border-bottom-color:
|
|
650
|
+
border-bottom-color: var(--vos-danger-bg);
|
|
651
651
|
}
|
|
652
652
|
@media (max-width: ${BREAKPOINT_MOBILE_MAX}px) {
|
|
653
653
|
.settings-layout { flex-direction: column; gap: 16px; }
|
|
@@ -655,9 +655,9 @@ export function baseStyles(): string {
|
|
|
655
655
|
.settings-nav-mobile {
|
|
656
656
|
display: block;
|
|
657
657
|
width: 100%;
|
|
658
|
-
border: 1px solid
|
|
658
|
+
border: 1px solid var(--vos-border);
|
|
659
659
|
border-radius: 8px;
|
|
660
|
-
background:
|
|
660
|
+
background: var(--vos-surface);
|
|
661
661
|
}
|
|
662
662
|
.settings-nav-mobile summary {
|
|
663
663
|
padding: 12px;
|
|
@@ -665,7 +665,7 @@ export function baseStyles(): string {
|
|
|
665
665
|
box-sizing: border-box;
|
|
666
666
|
cursor: pointer;
|
|
667
667
|
font-weight: 600;
|
|
668
|
-
color:
|
|
668
|
+
color: var(--vos-brand);
|
|
669
669
|
}
|
|
670
670
|
.settings-nav-mobile .settings-nav-link { padding: 12px; }
|
|
671
671
|
}
|
|
@@ -138,46 +138,11 @@ describe("baseStyles — SGL-1.1 settings layout", () => {
|
|
|
138
138
|
expect(media).toContain(".settings-nav-mobile");
|
|
139
139
|
});
|
|
140
140
|
|
|
141
|
-
test("
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
"#1a1a2e",
|
|
145
|
-
"#4f46e5",
|
|
146
|
-
"#eef2ff",
|
|
147
|
-
"#e8e8ee",
|
|
148
|
-
"#f7f7fb",
|
|
149
|
-
"#dc2626",
|
|
150
|
-
"#fee2e2",
|
|
151
|
-
"#6b7280",
|
|
152
|
-
"#fff",
|
|
153
|
-
"#f3f4f6",
|
|
154
|
-
"#065f46",
|
|
155
|
-
"#0f766e",
|
|
156
|
-
"#22c55e",
|
|
157
|
-
"#2d2d4e",
|
|
158
|
-
"#374151",
|
|
159
|
-
"#4338ca",
|
|
160
|
-
"#5b21b6",
|
|
161
|
-
"#92400e",
|
|
162
|
-
"#9ca3af",
|
|
163
|
-
"#a7f3d0",
|
|
164
|
-
"#c7d2fe",
|
|
165
|
-
"#ccfbf1",
|
|
166
|
-
"#d1d5db",
|
|
167
|
-
"#d1fae5",
|
|
168
|
-
"#e5e7eb",
|
|
169
|
-
"#ede9fe",
|
|
170
|
-
"#ef4444",
|
|
171
|
-
"#f59e0b",
|
|
172
|
-
"#f9fafb",
|
|
173
|
-
"#fafafa",
|
|
174
|
-
"#fde68a",
|
|
175
|
-
"#fecaca",
|
|
176
|
-
"#fef3c7",
|
|
177
|
-
].map((c) => c.toLowerCase()),
|
|
178
|
-
);
|
|
141
|
+
test("takes every colour from a theme variable, bar the fixed status dots", () => {
|
|
142
|
+
// Heartbeat dots are solid mid-tones that read on both themes.
|
|
143
|
+
const allowed = new Set(["#22c55e", "#f59e0b", "#ef4444"]);
|
|
179
144
|
const found = block.match(/#[0-9a-fA-F]{3,8}\b/g) ?? [];
|
|
180
|
-
expect(
|
|
181
|
-
|
|
145
|
+
for (const c of found) expect(allowed.has(c.toLowerCase()), c).toBe(true);
|
|
146
|
+
expect(block).toContain("var(--vos-");
|
|
182
147
|
});
|
|
183
148
|
});
|
|
@@ -137,7 +137,7 @@ function kindCard(o: TemplatesPageOpts, kind: TemplateItemRow["kind"]): string {
|
|
|
137
137
|
.map(
|
|
138
138
|
(
|
|
139
139
|
i,
|
|
140
|
-
) => `<form method="POST" action="${BASE}/items" class="template-item" data-kind="${kind}" data-key="${escapeHtml(i.key)}" style="display:grid;gap:6px;padding:8px 0;border-bottom:1px solid
|
|
140
|
+
) => `<form method="POST" action="${BASE}/items" class="template-item" data-kind="${kind}" data-key="${escapeHtml(i.key)}" style="display:grid;gap:6px;padding:8px 0;border-bottom:1px solid var(--vos-border)">
|
|
141
141
|
${scopeFields(o)}<input type="hidden" name="kind" value="${kind}" /><input type="hidden" name="key" value="${escapeHtml(i.key)}" />
|
|
142
142
|
<strong>${escapeHtml(i.key)}${managedByBadge(i)}</strong>
|
|
143
143
|
${itemFields(kind, i.payload)}
|
package/src/push-toggle.ts
CHANGED
|
@@ -41,7 +41,7 @@ export function renderPushToggle(args: PushToggleArgs): string {
|
|
|
41
41
|
return `
|
|
42
42
|
<div class="push-toggle" id="push-toggle" style="margin:8px 0;font-size:13px">
|
|
43
43
|
<button type="button" id="push-toggle-btn" class="btn btn-secondary" style="display:none">Enable notifications</button>
|
|
44
|
-
<span id="push-toggle-status" style="color
|
|
44
|
+
<span id="push-toggle-status" style="color:var(--vos-text-muted)"></span>
|
|
45
45
|
</div>
|
|
46
46
|
<script>
|
|
47
47
|
(function() {
|