Skip to content

Commit 6ac3471

Browse files
committed
fix: ui design
1 parent 46f9996 commit 6ac3471

7 files changed

Lines changed: 243 additions & 371 deletions

File tree

src/web/src/App.css

Lines changed: 139 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,70 @@
1+
.visually-hidden { position:absolute !important; height:1px; width:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); white-space:nowrap; }
2+
3+
/* =============== Design tokens & utilities =============== */
4+
:root {
5+
--radius: 10px;
6+
--radius-sm: 8px;
7+
--radius-lg: 14px;
8+
--shadow-1: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
9+
--shadow-2: 0 2px 8px rgba(0,0,0,.08), 0 12px 28px rgba(0,0,0,.12);
10+
--surface-1: color-mix(in oklab, Canvas 96%, transparent);
11+
--surface-2: color-mix(in oklab, Canvas 92%, transparent);
12+
--border-col: color-mix(in hsl, currentColor 18%, transparent);
13+
--ring: #646cff;
14+
--primary: #646cff;
15+
--primary-contrast: white;
16+
}
17+
[data-theme="dark"] {
18+
--surface-1: color-mix(in oklab, Canvas 88%, transparent);
19+
--surface-2: color-mix(in oklab, Canvas 84%, transparent);
20+
--border-col: color-mix(in hsl, currentColor 26%, transparent);
21+
--ring: #a3a6ff;
22+
--primary: #a3a6ff;
23+
}
24+
25+
:where(button,[role="button"],a,input,select,textarea):focus-visible {
26+
outline: 2px solid var(--ring);
27+
outline-offset: 2px;
28+
border-radius: var(--radius-sm);
29+
}
30+
31+
/* Buttons & inputs */
32+
.btn {
33+
--_bg: transparent; --_fg: inherit; --_bd: var(--border-col);
34+
display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
35+
padding:.5rem .75rem; border:1px solid var(--_bd); border-radius:var(--radius-sm);
36+
background:var(--_bg); color:var(--_fg); cursor:pointer;
37+
transition: background .2s ease, border-color .2s ease, transform .05s ease;
38+
}
39+
.btn:hover { background: color-mix(in oklab, currentColor 10%, transparent); }
40+
.btn:active { transform: translateY(1px); }
41+
.btn:disabled { opacity:.55; cursor:not-allowed; }
42+
.btn-primary { --_bg: var(--primary); --_fg: var(--primary-contrast); --_bd: color-mix(in oklab, var(--primary) 85%, black); }
43+
.btn-ghost { --_bg: transparent; --_bd: var(--border-col); }
44+
.btn-icon { padding:.5rem; width:36px; height:36px; }
45+
46+
.input, .select, .textarea {
47+
padding:.4rem .55rem; border-radius: var(--radius-sm);
48+
border:1px solid var(--border-col); background: transparent; color: inherit;
49+
}
50+
.select { padding-right:1.75rem; }
51+
.textarea { resize: vertical; }
52+
53+
.badge {
54+
display:inline-flex; align-items:center; gap:.35rem;
55+
font-size:.8rem; padding:.2rem .45rem; border:1px solid var(--border-col);
56+
border-radius: 999px; background: var(--surface-1);
57+
}
58+
.badge.m { color:#e5c07b; border-color: currentColor; }
59+
.badge.a { color:#7cc37f; border-color: currentColor; }
60+
.badge.d { color:#e06c75; border-color: currentColor; }
61+
62+
.row { display:flex; align-items:center; gap:.5rem; }
63+
.row-between { display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
64+
.ml-auto { margin-left:auto; }
65+
.v-divider { border-left:1px solid var(--border-col); height:22px; }
66+
.img-rounded { border-radius: 8px; display:block; }
67+
168
#root {
269
max-width: 1440px;
370
margin: 0 auto;
@@ -15,8 +82,14 @@
1582
justify-content: space-between;
1683
gap: 0.75rem;
1784
grid-area: header;
85+
position: sticky;
86+
top: 0;
87+
z-index: 5;
88+
backdrop-filter: blur(6px);
1889
}
1990

91+
.brand { display:flex; align-items:center; gap:.75rem; }
92+
2093
.header h1 {
2194
margin: 0;
2295
font-size: 1.75rem;
@@ -38,8 +111,10 @@
38111
}
39112

40113
.panel {
41-
border: 1px solid color-mix(in hsl, currentColor 20%, transparent);
42-
border-radius: 10px;
114+
border: 1px solid var(--border-col);
115+
border-radius: var(--radius);
116+
background: var(--surface-1);
117+
box-shadow: var(--shadow-1);
43118
padding: 1rem 1.25rem;
44119
}
45120

@@ -78,10 +153,11 @@ a.hint:active {
78153
}
79154

80155
.landing-visual {
81-
border: 1px solid color-mix(in hsl, currentColor 20%, transparent);
82-
border-radius: 10px;
156+
border: 1px solid var(--border-col);
157+
border-radius: var(--radius);
83158
padding: 0.75rem;
84-
background: color-mix(in oklab, Canvas 92%, transparent);
159+
background: var(--surface-1);
160+
box-shadow: var(--shadow-1);
85161
}
86162

87163
.landing-visual-stack {
@@ -113,7 +189,7 @@ a.hint:active {
113189
max-height: 360px;
114190
overflow: auto;
115191
border-radius: 8px;
116-
border: 1px solid color-mix(in hsl, currentColor 20%, transparent);
192+
border: 1px solid var(--border-col);
117193
background: Canvas;
118194
color: CanvasText;
119195
padding: 0.75rem;
@@ -147,10 +223,7 @@ button {
147223
gap: 0.5rem;
148224
}
149225

150-
button.icon-only {
151-
padding: 0.6em;
152-
gap: 0;
153-
}
226+
.icon-only { padding: 0.6em; gap: 0; } /* legacy (kept for compatibility) */
154227

155228
/* Unsupported browser overlay */
156229
.gc-overlay {
@@ -225,20 +298,22 @@ button.icon-only {
225298
cursor: col-resize;
226299
align-self: stretch;
227300
justify-self: center;
228-
background:
229-
linear-gradient(
230-
to bottom,
231-
transparent 0%,
232-
color-mix(in hsl, currentColor 12%, transparent) 10%,
233-
color-mix(in hsl, currentColor 18%, transparent) 50%,
234-
color-mix(in hsl, currentColor 12%, transparent) 90%,
235-
transparent 100%
236-
);
301+
background: color-mix(in hsl, currentColor 16%, transparent);
237302
border-radius: 3px;
238303
/* Ensure the element can receive pointer events for dragging */
239304
touch-action: none;
240305
-webkit-user-select: none;
241306
user-select: none;
307+
position: relative;
308+
}
309+
310+
.column-resizer::after {
311+
content:""; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
312+
width:2px; height:48px; border-radius:2px;
313+
background: repeating-linear-gradient(to bottom,
314+
color-mix(in hsl, currentColor 40%, transparent) 0 6px,
315+
transparent 6px 12px);
316+
opacity:.85;
242317
}
243318

244319
.column-resizer:focus-visible {
@@ -247,17 +322,7 @@ button.icon-only {
247322
border-radius: 4px;
248323
}
249324

250-
.column-resizer:hover {
251-
background:
252-
linear-gradient(
253-
to bottom,
254-
transparent 0%,
255-
color-mix(in hsl, currentColor 20%, transparent) 10%,
256-
color-mix(in hsl, currentColor 28%, transparent) 50%,
257-
color-mix(in hsl, currentColor 20%, transparent) 90%,
258-
transparent 100%
259-
);
260-
}
325+
.column-resizer:hover { background: color-mix(in hsl, currentColor 24%, transparent); }
261326

262327
/* Reduce accidental selection while dragging */
263328
.app-container.resizing,
@@ -266,8 +331,9 @@ button.icon-only {
266331
}
267332

268333
.panel-section {
269-
border: 1px solid color-mix(in hsl, currentColor 20%, transparent);
270-
border-radius: 10px;
334+
border: 1px solid var(--border-col);
335+
border-radius: var(--radius);
336+
background: var(--surface-2);
271337
padding: 1rem 1.25rem;
272338
display: flex;
273339
flex-direction: column;
@@ -289,9 +355,8 @@ button.icon-only {
289355
.instructions-textarea {
290356
width: 100%;
291357
min-height: 100px;
292-
resize: vertical;
293358
background-color: transparent;
294-
border: 1px solid color-mix(in hsl, currentColor 20%, transparent);
359+
border: 1px solid var(--border-col);
295360
border-radius: 6px;
296361
padding: 0.5rem;
297362
font-family: inherit;
@@ -343,6 +408,10 @@ button.icon-only {
343408
height: 12px;
344409
}
345410

411+
/* Rows & hovers */
412+
.tree-row, .selected-file-row { border-radius: var(--radius-sm); }
413+
.tree-row:hover, .selected-file-row:hover { background: color-mix(in oklab, currentColor 8%, transparent); }
414+
346415
/* Status bar */
347416
.status-bar {
348417
display: flex;
@@ -365,7 +434,7 @@ button.icon-only {
365434

366435
.status-bar-fill {
367436
height: 100%;
368-
background-color: #646cff;
437+
background-color: var(--primary);
369438
border-radius: 4px;
370439
transition: width 0.3s ease-in-out;
371440
}
@@ -432,6 +501,40 @@ button.icon-only {
432501
text-underline-offset: 2px;
433502
}
434503

504+
/* Modal (Preview) */
505+
.gc-modal-backdrop {
506+
position: fixed; inset: 0; display:flex; align-items:center; justify-content:center;
507+
background: color-mix(in hsl, black 45%, transparent); z-index:1000;
508+
}
509+
.gc-modal {
510+
background: Canvas; color: CanvasText; border:1px solid var(--border-col);
511+
border-radius: var(--radius); width: min(1200px, 96vw); max-height: 86vh;
512+
display:flex; flex-direction:column; box-shadow: var(--shadow-2);
513+
}
514+
.gc-modal-header {
515+
position: sticky; top:0; display:flex; align-items:center; gap:.5rem;
516+
padding:.75rem 1rem; border-bottom:1px solid var(--border-col); background: var(--surface-1);
517+
}
518+
.gc-modal-body { padding:.75rem 1rem; overflow:auto; }
519+
520+
/* Header controls */
521+
.header-controls {
522+
display:grid; grid-template-columns: minmax(280px,1fr) auto auto;
523+
gap:.5rem; align-items:center; min-width:0;
524+
}
525+
.ws-wrap { position:relative; min-width:0; }
526+
.ws-card {
527+
border:1px solid var(--border-col); border-radius: var(--radius-sm);
528+
padding:.5rem .75rem; background: var(--surface-2);
529+
}
530+
.ws-select-overlay {
531+
position:absolute; inset:0; opacity:0; width:100%; height:100%; cursor:pointer;
532+
}
533+
534+
/* Selected files */
535+
.selected-files { width:100%; display:flex; flex-direction:column; min-height:0; }
536+
.selected-files-list { border: 1px solid var(--border-col); border-radius: 8px; padding:.5rem; flex:1; min-height:0; overflow-y:auto; }
537+
435538
/* ---------- Responsiveness ---------- */
436539
/* Stack columns on narrower screens; hide the resizer */
437540
@media (max-width: 1100px) {
@@ -483,4 +586,5 @@ button.icon-only {
483586
/* Make generic icon-only targets a bit friendlier to tap */
484587
@media (hover: none) and (pointer: coarse) {
485588
button.icon-only { padding: 0.75em; }
589+
.btn-icon { width:40px; height:40px; }
486590
}

0 commit comments

Comments
 (0)