diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-10 19:54:20 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-10 19:54:20 +0100 |
| commit | 24a83b7019cd424b27ad95f1d056581096a1e5b9 (patch) | |
| tree | 691f50369f0cef5fa2b489440aef133e9b7a5aa6 /static | |
| parent | c75b6f1ff69d944bb07b9395880a63620a0a8a00 (diff) | |
| download | deck-it-24a83b7019cd424b27ad95f1d056581096a1e5b9.tar.gz deck-it-24a83b7019cd424b27ad95f1d056581096a1e5b9.zip | |
fix(dashboard): chip and spending classes clear of global rules
The global .warn (yellow text) and .row (wrap, margin) rules reached
into the dashboard; its chips use .hot and the one-line spending row
.inline instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'static')
| -rw-r--r-- | static/dashboard.js | 4 | ||||
| -rw-r--r-- | static/deck.css | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/static/dashboard.js b/static/dashboard.js index 5479312..5dc8939 100644 --- a/static/dashboard.js +++ b/static/dashboard.js @@ -138,7 +138,7 @@ export default { c.querySelector(".v").textContent = v; if (s != null) c.querySelector(".s").textContent = s; if (fill != null) c.querySelector(".fill").style.width = `${Math.max(0, Math.min(100, fill))}%`; - c.classList.toggle("warn", Boolean(warn)); + c.classList.toggle("hot", Boolean(warn)); }; // A disabled module's parts are left out. @@ -179,7 +179,7 @@ export default { const program = (title, p) => { const model = `<span class="model">${esc(p.model ? short(p.model) : "—")}</span>`; if (!(p.cost > 0)) { // local or free models: tokens, not dollars - return `<div class="prog row"><h3>${esc(title)}</h3>${model} + return `<div class="prog inline"><h3>${esc(title)}</h3>${model} <span class="tok"><span class="lbl">session</span><b class="num">${tok(p.session_tokens)}</b></span> <span class="tok"><span class="lbl">total</span><b class="num">${tok(p.tokens)}</b></span></div>`; } diff --git a/static/deck.css b/static/deck.css index ef10de6..61b7c3f 100644 --- a/static/deck.css +++ b/static/deck.css @@ -646,7 +646,7 @@ select { .dash .chips.aux { grid-template-columns: 1fr 1fr 1fr 1fr 1.3fr; } .dash .chip { position: relative; overflow: hidden; border-radius: 10px; background: var(--udt-surface0); border: 1px solid var(--udt-surface1); display: flex; align-items: center; gap: 10px; padding: 0 14px; min-width: 0; } -.dash .chip.warn { border-color: var(--udt-accent); } +.dash .chip.hot { border-color: var(--udt-accent); } .dash .chip svg, .dash .chip .fill { position: absolute; inset: 0; pointer-events: none; } .dash .chip svg { width: 100%; height: 100%; } .dash .chip svg path { stroke-width: 1.5; vector-effect: non-scaling-stroke; } @@ -684,9 +684,9 @@ select { .dash .prog .big { font-size: 1.25rem; font-weight: 600; } .dash .prog .lbl { font-size: 0.714rem; text-transform: uppercase; letter-spacing: .08em; color: var(--udt-overlay0); } .dash .prog .sub { font-size: 0.786rem; color: var(--udt-subtext0); } -.dash .prog.row { flex-direction: row; align-items: baseline; gap: 12px; padding-top: 10px; border-top: 1px solid var(--udt-surface1); } -.dash .prog.row .model { margin-left: 0; flex: 1; } -.dash .prog.row .tok b { font-size: 1.1rem; font-weight: 600; margin-left: 4px; } +.dash .prog.inline { flex-direction: row; align-items: baseline; gap: 12px; padding-top: 10px; border-top: 1px solid var(--udt-surface1); } +.dash .prog.inline .model { margin-left: 0; flex: 1; } +.dash .prog.inline .tok b { font-size: 1.1rem; font-weight: 600; margin-left: 4px; } .dash .stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--udt-surface0); } .dash .stack i { display: block; height: 100%; } .dash .legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.75rem; color: var(--udt-subtext0); } |
