Dashboard levels: link groups as a thin line with a small name
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b82a6b90c6
commit
936d7f64a9
2 files changed
+19
-8
No files matched your search
+16
-1
@@ -55,6 +55,21 @@ function dashChannelNav(m, d, s) {
|
|||||||
h("button", { class: "small", "data-view-ok": "", "aria-label": t("Next channel"), onclick: () => go(1) }, "›"));
|
h("button", { class: "small", "data-view-ok": "", "aria-label": t("Next channel"), onclick: () => go(1) }, "›"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// link groups in the level meters: a thin line with a small name (the mixer has the big brackets)
|
||||||
|
function dashGroups(d, kind) {
|
||||||
|
const out = [];
|
||||||
|
linkedGroups(d, kind).forEach(g => {
|
||||||
|
const color = custColor(d, kind, g[0]) || linkInfo(d, kind, g[0]).color, name = linkName(d, kind, g);
|
||||||
|
g.forEach((j, n) => {
|
||||||
|
if (n && g[n - 1] === j - 1) return;
|
||||||
|
let len = 1;
|
||||||
|
while (g.includes(j + len)) len++;
|
||||||
|
out.push(h("div", { class: "dgrp", style: `--lc:${color};grid-column:${j + 1} / span ${len}`, title: (name ? name + " · " : "") + g.map(i => chLabel(kind, i)).join(" + ") }, name));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
const DASH_MODULES = {
|
const DASH_MODULES = {
|
||||||
status: {
|
status: {
|
||||||
title: () => t("DSP overview"), w: 4, min: [3, 3], max: [12, 14], h: () => 2 + Math.ceil(dashDevs().length * 1.2), global: true,
|
title: () => t("DSP overview"), w: 4, min: [3, 3], max: [12, 14], h: () => 2 + Math.ceil(dashDevs().length * 1.2), global: true,
|
||||||
@@ -75,7 +90,7 @@ const DASH_MODULES = {
|
|||||||
body(m, d) {
|
body(m, d) {
|
||||||
const col = (k, i) => h("div", { class: "dm" + (chans(d, k)[i].mute ? " muted" : ""), title: chTitle(d, k, i), style: `${ccStyle(d, k, i)};grid-column:${i + 1}` },
|
const col = (k, i) => h("div", { class: "dm" + (chans(d, k)[i].mute ? " muted" : ""), title: chTitle(d, k, i), style: `${ccStyle(d, k, i)};grid-column:${i + 1}` },
|
||||||
ledMeter(d.id, k, i), k === "out" ? limLed(d.id, i) : h("span", { class: "limled ph", "aria-hidden": "true" }), h("small", {}, chLabel(k, i).replace("Out ", "").replace("In ", "")));
|
ledMeter(d.id, k, i), k === "out" ? limLed(d.id, i) : h("span", { class: "limled ph", "aria-hidden": "true" }), h("small", {}, 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}` }, linkBands(d, k), chans(d, k).map((_, i) => col(k, i))));
|
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}` }, dashGroups(d, k), chans(d, k).map((_, i) => col(k, i))));
|
||||||
const bands = linkedGroups(d, "in").length + linkedGroups(d, "out").length > 0;
|
const bands = linkedGroups(d, "in").length + linkedGroups(d, "out").length > 0;
|
||||||
return h("div", { class: "dmeters" + (bands ? " hasbands" : "") }, group("in", t("Inputs")), group("out", t("Outputs")));
|
return h("div", { class: "dmeters" + (bands ? " hasbands" : "") }, group("in", t("Inputs")), group("out", t("Outputs")));
|
||||||
},
|
},
|
||||||
|
|||||||
+3
-7
@@ -832,14 +832,10 @@ body.ddragging { user-select: none; -webkit-user-select: none; cursor: grabbing;
|
|||||||
.dmgroup { flex: 1 1 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
.dmgroup { flex: 1 1 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
||||||
.dmgroup .sub { flex: none !important; margin: 0; }
|
.dmgroup .sub { flex: none !important; margin: 0; }
|
||||||
.dms { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); grid-template-rows: 0 minmax(0, 1fr); gap: 0 4px; }
|
.dms { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); grid-template-rows: 0 minmax(0, 1fr); gap: 0 4px; }
|
||||||
.dmeters.hasbands .dms { grid-template-rows: 22px minmax(0, 1fr); }
|
.dmeters.hasbands .dms { grid-template-rows: 18px minmax(0, 1fr); }
|
||||||
.dms > .dm { grid-row: 2; }
|
.dms > .dm { grid-row: 2; }
|
||||||
.dms .lkband { height: 8px; margin: 0 5px 3px; border-width: 1.5px; border-radius: 7px 7px 0 0; }
|
.dgrp { grid-row: 1; align-self: end; min-width: 0; margin-bottom: 4px; padding-bottom: 1px; border-bottom: 2px solid var(--lc); color: var(--lc);
|
||||||
.dms .lkband::before, .dms .lkband::after { width: 4px; height: 4px; bottom: -2px; }
|
font-size: 9px; line-height: 11px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
.dms .lkband::before { left: -3px; } .dms .lkband::after { right: -3px; }
|
|
||||||
.dms .lkband .lkname { padding: 0 5px; font-size: 9px; letter-spacing: .04em; gap: 3px; max-width: calc(100% + 6px); }
|
|
||||||
.dms .lkband .lkname svg { width: 9px; height: 9px; }
|
|
||||||
.dms .lkband.single { margin: 0 3px 3px; }
|
|
||||||
.dm { --cc: var(--warn); display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; min-height: 0; }
|
.dm { --cc: var(--warn); 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 .led { flex: 1 1 0; height: auto; min-height: 0; padding: 0; }
|
||||||
.dm small { color: var(--cc); font-size: 11px; font-weight: 700; }
|
.dm small { color: var(--cc); font-size: 11px; font-weight: 700; }
|
||||||
|
|||||||
Reference in new issue
Block a user