diff --git a/css/app.css b/css/app.css index c0f1a23..9dd5ede 100644 --- a/css/app.css +++ b/css/app.css @@ -630,26 +630,21 @@ select:focus { border-color: var(--accent); } /* ── HISTORY TIMELINE ── */ .tl-item { - display: grid; - grid-template-columns: 160px 140px 1fr; - gap: 0 12px; - padding: 7px 0; + padding: 12px 0; border-bottom: 1px solid var(--border); - font-size: 12px; - align-items: baseline; } .tl-item:last-child { border-bottom: none; } -.tl-time { color: var(--text3); font-size: 11px; white-space: nowrap; } -.tl-field { color: var(--text2); } -.tl-change { display: flex; align-items: baseline; gap: 6px; } +.tl-time { display: block; color: var(--text3); font-size: 11px; margin-bottom: 5px; } +.tl-desc { display: flex; align-items: baseline; gap: 16px; font-size: 13px; } +.tl-label { color: var(--text2); min-width: 130px; } +.tl-change { display: flex; align-items: baseline; gap: 8px; } .tl-old { color: var(--text3); text-decoration: line-through; } .tl-arrow { color: var(--text3); } -.tl-new { color: var(--text); } +.tl-new { color: var(--text); font-weight: 500; } .tl-deployed { color: var(--accent); } .tl-testing { color: var(--amber); } .tl-degraded { color: var(--red); } -.tl-created .tl-field { color: var(--accent); } -.tl-created .tl-change { color: var(--text3); } +.tl-created .tl-label { color: var(--accent); font-weight: 500; } .tl-empty { color: var(--text3); font-size: 12px; padding: 8px 0; } /* ── SETTINGS MODAL ── */ diff --git a/js/ui.js b/js/ui.js index 5478a9d..d3fb403 100644 --- a/js/ui.js +++ b/js/ui.js @@ -129,6 +129,21 @@ async function filterInstances() { const BOOL_FIELDS = ['atlas','argus','semaphore','patchmon','tailscale','andromeda','hardware_acceleration']; +const FIELD_LABELS = { + name: 'name', + state: 'state', + stack: 'stack', + vmid: 'vmid', + tailscale_ip: 'tailscale ip', + atlas: 'atlas', + argus: 'argus', + semaphore: 'semaphore', + patchmon: 'patchmon', + tailscale: 'tailscale', + andromeda: 'andromeda', + hardware_acceleration: 'hw acceleration', +}; + function stateClass(field, val) { if (field !== 'state') return ''; return { deployed: 'tl-deployed', testing: 'tl-testing', degraded: 'tl-degraded' }[val] ?? ''; @@ -179,18 +194,20 @@ async function renderDetailPage(vmid) { if (e.field === 'created') return `
${fmtDateFull(e.changed_at)} - created - +
instance created
`; + const label = FIELD_LABELS[e.field] ?? esc(e.field); return `
${fmtDateFull(e.changed_at)} - ${esc(e.field)} - - ${fmtHistVal(e.field, e.old_value)} - - ${fmtHistVal(e.field, e.new_value)} - +
+ ${label} + + ${fmtHistVal(e.field, e.old_value)} + + ${fmtHistVal(e.field, e.new_value)} + +
`; }).join('') : '
no history yet
';