feat(web): React SPA with realtime task detail over WebSocket
Vite + React 19 + TS console-style operator UI: hash-routed Login, Endpoints, Tasks, and TaskDetail (realtime accounts table over /ws, Run gated on all accounts testing ok on both sides). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MMHQTtnQtQqL8muAXHr9kd
This commit is contained in:
+568
@@ -0,0 +1,568 @@
|
||||
/* ---------- layout shell ---------- */
|
||||
|
||||
.shell {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.topbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 28px;
|
||||
padding: 0 24px;
|
||||
height: 56px;
|
||||
background: var(--bg-panel-raised);
|
||||
border-bottom: 1px solid var(--border);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.brand {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 2px;
|
||||
font-family: var(--font-display);
|
||||
font-weight: 800;
|
||||
font-size: 22px;
|
||||
letter-spacing: 0.5px;
|
||||
text-transform: uppercase;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.brand .bracket {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.brand .dim {
|
||||
color: var(--fg-dim);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.topnav {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.topnav a {
|
||||
display: inline-block;
|
||||
padding: 8px 14px;
|
||||
text-decoration: none;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
color: var(--fg-dim);
|
||||
border: 1px solid transparent;
|
||||
border-radius: 2px;
|
||||
transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
|
||||
}
|
||||
|
||||
.topnav a:hover {
|
||||
color: var(--fg);
|
||||
border-color: var(--border);
|
||||
}
|
||||
|
||||
.topnav a.active {
|
||||
color: var(--accent-strong);
|
||||
border-color: var(--accent-dim);
|
||||
background: rgba(255, 178, 56, 0.06);
|
||||
}
|
||||
|
||||
.session-indicator {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 11px;
|
||||
color: var(--fg-dim);
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.pulse-dot {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: var(--ok);
|
||||
box-shadow: 0 0 6px 1px var(--ok);
|
||||
animation: pulse 2.4s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.35; }
|
||||
}
|
||||
|
||||
.main {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
max-width: 1180px;
|
||||
margin: 0 auto;
|
||||
padding: 32px 24px 64px;
|
||||
}
|
||||
|
||||
.page-head {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
margin-bottom: 24px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-family: var(--font-display);
|
||||
font-weight: 800;
|
||||
font-size: 34px;
|
||||
letter-spacing: 0.3px;
|
||||
text-transform: uppercase;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.page-title .idx {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--fg-faint);
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
.crumb {
|
||||
font-size: 12px;
|
||||
color: var(--fg-dim);
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dashed var(--border-bright);
|
||||
}
|
||||
|
||||
.crumb:hover {
|
||||
color: var(--accent-strong);
|
||||
}
|
||||
|
||||
/* ---------- panels ---------- */
|
||||
|
||||
.panel {
|
||||
position: relative;
|
||||
background: var(--bg-panel);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 3px;
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.panel-label {
|
||||
position: absolute;
|
||||
top: -9px;
|
||||
left: 14px;
|
||||
background: var(--bg);
|
||||
padding: 0 8px;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.14em;
|
||||
text-transform: uppercase;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.panel-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
/* ---------- forms ---------- */
|
||||
|
||||
.field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.field label {
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
color: var(--fg-dim);
|
||||
}
|
||||
|
||||
.field input,
|
||||
.field select {
|
||||
background: var(--bg-inset);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--fg);
|
||||
padding: 9px 11px;
|
||||
font-size: 13px;
|
||||
border-radius: 2px;
|
||||
outline: none;
|
||||
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
||||
}
|
||||
|
||||
.field input:focus,
|
||||
.field select:focus {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px rgba(255, 178, 56, 0.12);
|
||||
}
|
||||
|
||||
.field-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.hint {
|
||||
font-size: 11px;
|
||||
color: var(--fg-faint);
|
||||
}
|
||||
|
||||
/* ---------- buttons ---------- */
|
||||
|
||||
.btn {
|
||||
appearance: none;
|
||||
border: 1px solid var(--border-bright);
|
||||
background: transparent;
|
||||
color: var(--fg);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
padding: 10px 18px;
|
||||
border-radius: 2px;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.btn:hover:not(:disabled) {
|
||||
border-color: var(--fg-dim);
|
||||
color: var(--accent-strong);
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: var(--accent);
|
||||
border-color: var(--accent);
|
||||
color: #1a1200;
|
||||
}
|
||||
|
||||
.btn-primary:hover:not(:disabled) {
|
||||
background: var(--accent-strong);
|
||||
border-color: var(--accent-strong);
|
||||
color: #1a1200;
|
||||
box-shadow: 0 0 16px -2px rgba(255, 178, 56, 0.6);
|
||||
}
|
||||
|
||||
.btn:disabled {
|
||||
opacity: 0.35;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.btn-row {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.btn-ghost {
|
||||
border-color: transparent;
|
||||
color: var(--fg-dim);
|
||||
padding: 8px 10px;
|
||||
}
|
||||
|
||||
.btn-ghost:hover:not(:disabled) {
|
||||
color: var(--fail);
|
||||
}
|
||||
|
||||
/* ---------- status badges ---------- */
|
||||
|
||||
.badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
padding: 3px 9px 3px 7px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.badge .dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.badge-ok {
|
||||
color: var(--ok);
|
||||
border-color: var(--ok-dim);
|
||||
background: rgba(82, 230, 160, 0.06);
|
||||
}
|
||||
.badge-ok .dot { background: var(--ok); box-shadow: 0 0 5px var(--ok); }
|
||||
|
||||
.badge-fail {
|
||||
color: var(--fail);
|
||||
border-color: var(--fail-dim);
|
||||
background: rgba(255, 93, 93, 0.06);
|
||||
}
|
||||
.badge-fail .dot { background: var(--fail); box-shadow: 0 0 5px var(--fail); }
|
||||
|
||||
.badge-pending {
|
||||
color: var(--pending);
|
||||
border-color: #4a4423;
|
||||
background: rgba(240, 196, 25, 0.06);
|
||||
}
|
||||
.badge-pending .dot { background: var(--pending); }
|
||||
|
||||
.badge-info {
|
||||
color: var(--info);
|
||||
border-color: #234456;
|
||||
background: rgba(87, 194, 255, 0.06);
|
||||
}
|
||||
.badge-info .dot { background: var(--info); animation: pulse 1.4s ease-in-out infinite; }
|
||||
|
||||
/* ---------- tables ---------- */
|
||||
|
||||
.tbl-wrap {
|
||||
overflow-x: auto;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
table.tbl {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
table.tbl thead th {
|
||||
text-align: left;
|
||||
font-size: 10.5px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
color: var(--fg-dim);
|
||||
background: var(--bg-panel-raised);
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
table.tbl tbody td {
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table.tbl tbody tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
table.tbl tbody tr:hover {
|
||||
background: rgba(255, 255, 255, 0.015);
|
||||
}
|
||||
|
||||
table.tbl a.rowlink {
|
||||
color: var(--fg);
|
||||
text-decoration: none;
|
||||
}
|
||||
table.tbl a.rowlink:hover {
|
||||
color: var(--accent-strong);
|
||||
}
|
||||
|
||||
.num-cell {
|
||||
font-variant-numeric: tabular-nums;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.empty-row td {
|
||||
text-align: center;
|
||||
color: var(--fg-faint);
|
||||
padding: 28px 14px;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* ---------- login ---------- */
|
||||
|
||||
.login-wrap {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 24px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.login-card {
|
||||
width: 100%;
|
||||
max-width: 380px;
|
||||
background: var(--bg-panel);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 3px;
|
||||
padding: 32px 28px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.login-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: -1px;
|
||||
border-radius: 3px;
|
||||
padding: 1px;
|
||||
background: linear-gradient(135deg, var(--accent-dim), transparent 40%);
|
||||
-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
|
||||
-webkit-mask-composite: xor;
|
||||
mask-composite: exclude;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.login-brand {
|
||||
font-family: var(--font-display);
|
||||
font-weight: 800;
|
||||
font-size: 30px;
|
||||
letter-spacing: 0.5px;
|
||||
text-transform: uppercase;
|
||||
margin: 0 0 4px;
|
||||
}
|
||||
|
||||
.login-sub {
|
||||
color: var(--fg-dim);
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.06em;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.login-error {
|
||||
color: var(--fail);
|
||||
font-size: 12px;
|
||||
margin-top: 10px;
|
||||
min-height: 16px;
|
||||
}
|
||||
|
||||
/* ---------- task detail ---------- */
|
||||
|
||||
.stat-row {
|
||||
display: flex;
|
||||
gap: 28px;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.stat {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.stat .val {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.stat .lbl {
|
||||
font-size: 10.5px;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
color: var(--fg-dim);
|
||||
}
|
||||
|
||||
.stat.ok .val { color: var(--ok); }
|
||||
.stat.fail .val { color: var(--fail); }
|
||||
.stat.info .val { color: var(--info); }
|
||||
|
||||
.upload-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.file-btn {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.file-btn input[type='file'] {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.log-pane {
|
||||
background: var(--bg-inset);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 3px;
|
||||
padding: 12px 14px;
|
||||
height: 260px;
|
||||
overflow-y: auto;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
.log-line {
|
||||
padding: 3px 0;
|
||||
border-bottom: 1px dotted rgba(255, 255, 255, 0.04);
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
color: var(--fg-dim);
|
||||
}
|
||||
|
||||
.log-line .tag {
|
||||
flex-shrink: 0;
|
||||
color: var(--accent);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.log-line .payload {
|
||||
color: var(--fg);
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.log-empty {
|
||||
color: var(--fg-faint);
|
||||
text-align: center;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.divider-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin: 22px 0 14px;
|
||||
color: var(--fg-faint);
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.divider-label::before,
|
||||
.divider-label::after {
|
||||
content: '';
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
.error-banner {
|
||||
border: 1px solid var(--fail-dim);
|
||||
background: rgba(255, 93, 93, 0.08);
|
||||
color: var(--fail);
|
||||
padding: 10px 14px;
|
||||
border-radius: 2px;
|
||||
font-size: 12px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.muted-note {
|
||||
color: var(--fg-faint);
|
||||
font-size: 12px;
|
||||
}
|
||||
Reference in New Issue
Block a user