Dashboard levels: limiter as a LIM segment on top of the meter
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
43def4480c
commit
9c6d2d6e35
2 files changed
+11
-3
No files matched your search
+7
-2
@@ -95,8 +95,13 @@ const DASH_MODULES = {
|
||||
title: () => t("Levels"), w: 8, min: [3, 5], max: [12, 14], h: 7,
|
||||
icon: '<path d="M5 20V10M10 20V4M15 20v-7M20 20V8"/>',
|
||||
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)));
|
||||
|
||||
+4
-1
@@ -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); }
|
||||
|
||||
Reference in new issue
Block a user