From 9c6d2d6e35e46baba06c18dfa41a4b2374d2dbc1 Mon Sep 17 00:00:00 2001 From: Givou Date: Mon, 2 Nov 2026 17:45:27 +0100 Subject: [PATCH] Dashboard levels: limiter as a LIM segment on top of the meter Co-Authored-By: Claude Opus 5.5 --- static/dashboard.js | 9 +++++++-- static/style.css | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/static/dashboard.js b/static/dashboard.js index 2a6bab1..46c82fe 100644 --- a/static/dashboard.js +++ b/static/dashboard.js @@ -95,8 +95,13 @@ const DASH_MODULES = { title: () => t("Levels"), w: 8, min: [3, 5], max: [12, 14], h: 7, icon: '', body(m, d) { - const col = (k, i) => h("div", { class: "dm" + (chans(d, k)[i].mute ? " muted" : ""), title: chTitle(d, k, i), style: `grid-column:${i + 1}` }, - ledMeter(d.id, k, i), k === "out" ? limLed(d.id, i) : h("span", { class: "limled ph", "aria-hidden": "true" })); + // limiter as one more segment on top; inputs keep the room so all scales line up + const meter = (k, i) => { + const el = ledMeter(d.id, k, i); + el.append(k === "out" ? limLed(d.id, i, "seg") : h("span", { class: "limled seg ph", "aria-hidden": "true" })); + return el; + }; + const col = (k, i) => h("div", { class: "dm" + (chans(d, k)[i].mute ? " muted" : ""), title: chTitle(d, k, i), style: `grid-column:${i + 1}` }, meter(k, i)); const numberOf = (k, i) => h("small", { class: "dmlab", style: `color:${dashLabelColor(d, k, i)};grid-column:${i + 1}` }, chLabel(k, i).replace("Out ", "").replace("In ", "")); const group = (k, label) => h("div", { class: "dmgroup", style: `flex-grow:${chans(d, k).length}` }, h("div", { class: "sub" }, label), h("div", { class: "dms", style: `--n:${chans(d, k).length}` }, chans(d, k).map((_, i) => col(k, i)), dashGroups(d, k), chans(d, k).map((_, i) => numberOf(k, i)))); const named = ["in", "out"].some(k => linkedGroups(d, k).some(g => linkName(d, k, g))); diff --git a/static/style.css b/static/style.css index 925b5a2..901d1c7 100644 --- a/static/style.css +++ b/static/style.css @@ -840,7 +840,10 @@ body.ddragging { user-select: none; -webkit-user-select: none; cursor: grabbing; .dm { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; min-height: 0; } .dm .led { flex: 1 1 0; height: auto; min-height: 0; padding: 0; } .dm.muted .led { opacity: .35; } -.dm .limled { width: 18px; height: 4px; min-height: 4px; margin: 0; font-size: 0; } +.led > .limled.seg { flex: 1; width: auto; height: auto; min-height: 0; margin: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; + border-radius: 1.5px; font-size: 6px; line-height: 1; font-weight: 800; letter-spacing: 0; color: color-mix(in srgb, var(--led-o) 45%, transparent); + background: color-mix(in srgb, var(--led-o) 13%, transparent); } +.led > .limled.seg.on { color: #1a1000; background: var(--led-o); } .dnav { flex: none; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; } .dnav button { min-height: 28px; min-width: 32px; padding: 0 8px; font-size: 16px; line-height: 1; } .dnavname { flex: 1; min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--dim); }