Dashboard: modular read-only overview page, stored in the config; UI cleanup
Modules are added and moved by drag and drop. Cleanup: no sideways jump between pages, mixer strips stay together with few channels, equal card heights, compact limiter cards without an amplifier, wider test meters, scrollable bottom bar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5597fae3f3
commit
2ea9fa32bc
8 files changed
+502
-19
No files matched your search
+18
-9
@@ -56,7 +56,7 @@ const store = {
|
||||
};
|
||||
const S = {
|
||||
devices: {}, order: [], cur: store.get("dsp.cur"),
|
||||
view: store.get("dsp.view") || "mixer", settings: false,
|
||||
view: store.get("dsp.view") || "dash", settings: false, dash: null,
|
||||
sel: { kind: "in", idx: 0 }, band: 0, busy: false, dirty: false,
|
||||
routeOpen: null, es: null, linkSel: { in: [], out: [] }, linkEdit: { in: null, out: null }, firSel: { kind: "out", idx: 0 }, firDraft: null, firCoef: {},
|
||||
lim: { amps: [], assign: {}, ref: {} },
|
||||
@@ -630,6 +630,8 @@ function renderTabs() {
|
||||
b.disabled = testLock && b.dataset.view !== "test";
|
||||
});
|
||||
fitNav(); // the DSP button's width changes with the name
|
||||
if (renderTabs.view !== S.view && window.innerWidth < 760) $("#viewtabs .active")?.scrollIntoView({ inline: "center", block: "nearest" }); // scrollable bottom bar
|
||||
renderTabs.view = S.view;
|
||||
}
|
||||
// close the DSP menu on a click elsewhere or Escape
|
||||
document.addEventListener("pointerdown", e => { if (S.devMenu && !e.target.closest("#devtabs")) { S.devMenu = false; renderTabs(); } });
|
||||
@@ -848,7 +850,7 @@ function reportImport(res, okMsg) {
|
||||
function renderStatus() {
|
||||
const bar = $("#statusbar");
|
||||
const d = dev();
|
||||
if (S.settings || !d) { bar.replaceChildren(); return; }
|
||||
if (S.settings || !d || S.view === "dash") { bar.replaceChildren(); return; }
|
||||
if (d.status !== "online" || !d.state) {
|
||||
bar.replaceChildren(
|
||||
h("div", { class: "preset" }, h("small", {}, `${STATUS_TEXT[d.status] || d.status} · ${d.transport === "usb" ? "USB" : d.host + ":" + d.port}`), h("b", {}, d.name),
|
||||
@@ -1696,7 +1698,7 @@ function maxLevelCard(d) {
|
||||
function viewLink(d) {
|
||||
return [h("h2", { class: "section" }, t("Links")),
|
||||
h("div", { class: "cards" }, linkCard(d, "in"), linkCard(d, "out")),
|
||||
h("p", { class: "info hint" }, t("Linked channels share all settings (gain, delay, filters, EQ, dynamics, mute) – ") +
|
||||
h("p", { class: "info" }, t("Linked channels share all settings (gain, delay, filters, EQ, dynamics, mute) – ") +
|
||||
t("a change on one channel applies to the whole group. Name, routing and mix levels stay per channel. ") +
|
||||
t("The link is stored in the DSP and also applies in the Thomann editor.")),
|
||||
h("h2", { class: "section" }, t("Colours")),
|
||||
@@ -1900,8 +1902,8 @@ function limiterCard(d, o) {
|
||||
res,
|
||||
h("div", { class: "limgrid" },
|
||||
h("label", { class: "full" }, t("Amplifier"), ampSel),
|
||||
h("label", {}, t("Load on channel"), ohmSel),
|
||||
h("label", {}, t("Speaker RMS (W)"), spkIn)),
|
||||
as ? h("label", {}, t("Load on channel"), ohmSel) : null,
|
||||
as ? h("label", {}, t("Speaker RMS (W)"), spkIn) : null),
|
||||
paramSlider("Threshold", "out", o, "limit.threshold", "thresh", update),
|
||||
as ? h("div", { class: "target" },
|
||||
h("div", { class: "row" }, h("span", { class: "sub" }, t("Limit to")), target,
|
||||
@@ -1949,9 +1951,10 @@ function timingBox(d, o) {
|
||||
h("b", {}, p.name), h("small", {}, p.range));
|
||||
const box = h("details", { class: "more", open: limOpen.has(key),
|
||||
ontoggle: () => box.open ? limOpen.add(key) : limOpen.delete(key) },
|
||||
h("summary", {}, `Attack ${lim.attack + 1} ms · Release ${lim.release + 1} ms · Knee ${lim.knee} dB`,
|
||||
h("summary", {}, `${"ratio" in lim ? `Ratio ${RATIOS[lim.ratio]} · ` : ""}Attack ${lim.attack + 1} ms · Release ${lim.release + 1} ms · Knee ${lim.knee} dB`,
|
||||
active ? h("span", { class: "tag" }, active.name) : null),
|
||||
h("div", { class: "chips presets" }, chip(auto), LIM_PRESETS.map(chip)),
|
||||
"ratio" in lim ? paramSlider("Ratio", "out", o, "limit.ratio", "ratio") : null,
|
||||
paramSlider("Attack", "out", o, "limit.attack", "attack"),
|
||||
paramSlider("Release", "out", o, "limit.release", "release"),
|
||||
paramSlider("Knee", "out", o, "limit.knee", "knee"),
|
||||
@@ -2425,8 +2428,10 @@ function render() {
|
||||
let content;
|
||||
const d = dev();
|
||||
const field = !S.settings && S.view === "soundfield"; // the room plan works without a connected DSP
|
||||
document.body.dataset.view = field ? "soundfield" : S.settings || !d ? "settings" : S.view;
|
||||
const dash = !S.settings && S.view === "dash"; // shows all DSPs, works without any
|
||||
document.body.dataset.view = field ? "soundfield" : dash ? "dash" : S.settings || !d ? "settings" : S.view;
|
||||
if (field) content = viewSoundField();
|
||||
else if (dash) content = viewDash();
|
||||
else if (S.settings || !d) content = viewSettings();
|
||||
else if (d.status !== "online" || !d.state)
|
||||
content = h("div", { class: "empty" }, h("div", { class: "spinner" + (["loading", "connecting"].includes(d.status) ? "" : " off") }),
|
||||
@@ -2461,7 +2466,7 @@ function fitNav() {
|
||||
const kids = [...top.children].filter(el => !el.hidden && getComputedStyle(el).display !== "none");
|
||||
const cs = getComputedStyle(top), gap = parseFloat(cs.columnGap) || 0;
|
||||
// natural widths: the DSP button may be squeezed by flexbox, so take its content width
|
||||
const need = kids.reduce((w, el) => w + (el.id === "devtabs" ? el.scrollWidth : el.getBoundingClientRect().width), 0)
|
||||
const need = kids.reduce((w, el) => w + (el.id === "devtabs" ? Math.max(el.scrollWidth, 210) : el.getBoundingClientRect().width), 0)
|
||||
+ gap * (kids.length - 1) + parseFloat(cs.paddingLeft) + parseFloat(cs.paddingRight);
|
||||
if (need > top.clientWidth + 1) b.classList.add("navside");
|
||||
}
|
||||
@@ -2541,6 +2546,7 @@ function connectEvents() {
|
||||
if (ev.demo) S.demo = ev.demo;
|
||||
if (ev.muteall) { S.muteAll = ev.muteall.active; showMuteAll(); }
|
||||
if (ev.soundfield) S.sf = ev.soundfield;
|
||||
if ("dashboard" in ev) S.dash = ev.dashboard && ev.dashboard.modules;
|
||||
if ("logo" in ev) { S.logo = ev.logo; showLogo(); }
|
||||
if (S.demo.enabled && S.devices.demo && !S.devices[S.cur]?.demo) S.cur = "demo";
|
||||
S.order.forEach(id => maybeAskUnlock(S.devices[id]));
|
||||
@@ -2573,6 +2579,8 @@ function connectEvents() {
|
||||
}
|
||||
case "soundfield":
|
||||
sfOnRemote(ev.data); break;
|
||||
case "dashboard":
|
||||
dashRemote(ev.data); break;
|
||||
case "logo":
|
||||
S.logo = ev.data; showLogo(); if (S.settings) render(); break;
|
||||
case "muteall":
|
||||
@@ -2589,6 +2597,7 @@ function connectEvents() {
|
||||
if (JSON.stringify(getPath(ch, ev.param)) === JSON.stringify(ev.value)) break;
|
||||
setPath(ch, ev.param, ev.value);
|
||||
showLive(`${ev.device}|${ev.kind}|${ev.idx}|${ev.param}`, ev.value); // even while a fader is held
|
||||
if (S.view === "dash") dashSoon();
|
||||
// the test fader moves every output: the audio test view only shows meters, no need to redraw
|
||||
if (ev.device === S.cur && !S.settings && !(S.view === "test" && ev.param === "gain")) render();
|
||||
break;
|
||||
@@ -2600,7 +2609,7 @@ function connectEvents() {
|
||||
updateMeters(ev); break;
|
||||
case "limiter":
|
||||
S.lim = ev.data;
|
||||
if (!S.busy && (S.view === "limiter" || S.view === "channel")) render();
|
||||
if (!S.busy && (S.view === "limiter" || S.view === "channel" || S.view === "dash")) render();
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,323 @@
|
||||
"use strict";
|
||||
|
||||
// Dashboard: an overview page built from modules, stored by the server as `dashboard` in config.json.
|
||||
// Every module only looks: nothing here changes a DSP. Browsing (channel, EQ band) stays in this session.
|
||||
|
||||
const DASH_WIDTHS = [3, 4, 6, 8, 12];
|
||||
const DASH_DEFAULT = () => [
|
||||
{ type: "status", w: 4 }, { type: "meters", w: 8 },
|
||||
{ type: "curve", w: 8 }, { type: "mixer", w: 4 },
|
||||
].map((m, i) => ({ id: `m${i}`, cfg: {}, ...m }));
|
||||
|
||||
let dashEdit = false, dashTimer = 0, dashSaveTimer = 0;
|
||||
const dashBrowse = new Map(); // module id -> { kind, idx, band }
|
||||
|
||||
const dashMods = () => S.dash || (S.dash = DASH_DEFAULT());
|
||||
const dashDevs = () => S.order.map(id => S.devices[id]).filter(d => d && (!d.demo || S.demo.enabled));
|
||||
// the chosen DSP, or the first one if it is gone (e.g. while demo mode is on)
|
||||
const dashDev = m => S.devices[m.cfg.device] && dashDevs().includes(S.devices[m.cfg.device]) ? S.devices[m.cfg.device] : dashDevs()[0];
|
||||
const offline = d => h("p", { class: "info dempty" }, d ? t("{name} is not connected.", { name: d.name }) : t("No DSP added yet."));
|
||||
|
||||
function dashSave() {
|
||||
clearTimeout(dashSaveTimer);
|
||||
dashSaveTimer = setTimeout(() => api("PUT", "/api/dashboard", { modules: dashMods() }).catch(e => toast(t("Error: ") + trMsg(e.message))), 300);
|
||||
}
|
||||
// parameter changes redraw the page, but not for every single step of a fader
|
||||
function dashSoon() {
|
||||
clearTimeout(dashTimer);
|
||||
dashTimer = setTimeout(() => { if (S.view === "dash" && !S.settings) render(); }, 250);
|
||||
}
|
||||
function dashRemote(data) {
|
||||
S.dash = data && data.modules ? data.modules : null;
|
||||
if (S.view === "dash" && !S.settings && !S.busy) render();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------ modules
|
||||
|
||||
const dashKv = (k, v, cls = "") => h("div", { class: "dkv " + cls }, h("span", {}, k), h("b", {}, v));
|
||||
const dashChannels = d => [...chans(d, "in").map((_, i) => ["in", i]), ...chans(d, "out").map((_, i) => ["out", i])];
|
||||
|
||||
// a channel of a module, browsed with the arrows
|
||||
function dashSel(m, d) {
|
||||
const all = dashChannels(d);
|
||||
let s = dashBrowse.get(m.id);
|
||||
if (!s) { s = { kind: m.cfg.kind || "in", idx: m.cfg.idx || 0, band: 0 }; dashBrowse.set(m.id, s); }
|
||||
if (!all.some(([k, i]) => k === s.kind && i === s.idx)) { s.kind = all[0][0]; s.idx = all[0][1]; }
|
||||
return s;
|
||||
}
|
||||
function dashChannelNav(m, d, s) {
|
||||
const all = dashChannels(d), at = all.findIndex(([k, i]) => k === s.kind && i === s.idx);
|
||||
const go = dir => { const [k, i] = all[(at + dir + all.length) % all.length]; s.kind = k; s.idx = i; s.band = 0; render(); };
|
||||
const ch = chans(d, s.kind)[s.idx];
|
||||
return h("div", { class: "dnav" },
|
||||
h("button", { class: "small", "data-view-ok": "", "aria-label": t("Previous channel"), onclick: () => go(-1) }, "‹"),
|
||||
h("span", { class: "dnavname" }, h("b", {}, chLabel(s.kind, s.idx)), " ", ch.name),
|
||||
h("button", { class: "small", "data-view-ok": "", "aria-label": t("Next channel"), onclick: () => go(1) }, "›"));
|
||||
}
|
||||
|
||||
const DASH_MODULES = {
|
||||
status: {
|
||||
title: () => t("DSP overview"), w: 4, global: true,
|
||||
icon: '<rect x="3" y="4" width="18" height="6" rx="1.5"/><rect x="3" y="14" width="18" height="6" rx="1.5"/><path d="M7 7h.01M7 17h.01"/>',
|
||||
body() {
|
||||
const list = dashDevs();
|
||||
if (!list.length) return offline();
|
||||
return h("div", { class: "dlist" }, list.map(d => h("button", { class: "drow dlink", "data-view-ok": "", title: t("Open in the mixer"),
|
||||
onclick: () => { S.cur = d.id; S.view = "mixer"; store.set("dsp.view", "mixer"); render(); window.scrollTo(0, 0); } },
|
||||
h("span", { class: "dot " + d.status }),
|
||||
h("span", { class: "grow dname" }, h("b", {}, d.name), h("small", {}, [MODEL_LABEL[d.detected_model || d.model] || "", d.state ? d.state.preset_name : (STATUS_TEXT[d.status] || d.status)].filter(Boolean).join(" · "))),
|
||||
d.state && dashChannels(d).some(([k, i]) => chans(d, k)[i].mute) ? h("span", { class: "dtag mute" }, "MUTE") : null)));
|
||||
},
|
||||
},
|
||||
meters: {
|
||||
title: () => t("Levels"), w: 8,
|
||||
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) },
|
||||
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" }, chans(d, k).map((_, i) => col(k, i))));
|
||||
return h("div", { class: "dmeters" }, group("in", t("Inputs")), group("out", t("Outputs")));
|
||||
},
|
||||
},
|
||||
mixer: {
|
||||
title: () => t("Faders"), w: 4,
|
||||
icon: '<path d="M6 3v18M12 3v18M18 3v18"/><rect x="3.5" y="13" width="5" height="3" rx="1"/><rect x="9.5" y="7" width="5" height="3" rx="1"/><rect x="15.5" y="10" width="5" height="3" rx="1"/>',
|
||||
body(m, d) {
|
||||
const row = (k, i) => {
|
||||
const ch = chans(d, k)[i];
|
||||
return h("div", { class: "drow dgain" + (ch.mute ? " muted" : ""), style: ccStyle(d, k, i) },
|
||||
h("span", { class: "dlab" }, chLabel(k, i)),
|
||||
h("span", { class: "dbar" }, h("i", { style: `width:${ch.gain / 4}%` }), h("u")),
|
||||
h("span", { class: "dval" }, ch.mute ? "MUTE" : `${sign(gainDb(ch.gain))}`));
|
||||
};
|
||||
return h("div", { class: "dlist" }, chans(d, "in").map((_, i) => row("in", i)), h("hr"), chans(d, "out").map((_, i) => row("out", i)));
|
||||
},
|
||||
},
|
||||
curve: {
|
||||
title: () => t("Frequency response"), w: 8,
|
||||
icon: '<path d="M2 14c3 0 3-7 6-7s3 10 6 10 3-6 6-6h2"/>',
|
||||
body(m, d) {
|
||||
const s = dashSel(m, d), ch = chans(d, s.kind)[s.idx];
|
||||
if (s.band >= ch.peq.length) s.band = 0;
|
||||
const canvas = h("canvas", { class: "dcurve" });
|
||||
const draw = () => drawCurve(canvas, ch, s.band, { mode: "mag", overlays: [] });
|
||||
requestAnimationFrame(draw);
|
||||
const b = ch.peq[s.band];
|
||||
return [dashChannelNav(m, d, s), canvas,
|
||||
h("div", { class: "dbands" }, ch.peq.map((bb, i) => h("button", { class: "dband" + (i === s.band ? " on" : "") + (bb.bypass ? " off" : "") + (bb.gain !== 120 ? " act" : ""), "data-view-ok": "",
|
||||
onclick: () => { s.band = i; render(); } }, h("b", {}, i + 1), h("small", {}, fmtHzShort(freqHz(bb.freq)))))),
|
||||
h("p", { class: "info dbandinfo" }, `${PEQ_TYPES[b.type]} · ${SPEC.freq.fmt(b.freq)} · ${sign((b.gain - 120) / 10)} dB · Q ${Q_TABLE[b.q]}${b.bypass ? " · Bypass" : ""}`)];
|
||||
},
|
||||
},
|
||||
channel: {
|
||||
title: () => t("Channel"), w: 4,
|
||||
icon: '<circle cx="12" cy="12" r="8"/><path d="M12 8v4l3 2"/>',
|
||||
body(m, d) {
|
||||
const s = dashSel(m, d), ch = chans(d, s.kind)[s.idx];
|
||||
const filt = f => (f && f.slope ? `${SLOPES[f.slope]} @ ${SPEC.freq.fmt(f.freq)}` : t("off"));
|
||||
const on = ch.peq.filter(b => !b.bypass && b.gain !== 120).length;
|
||||
return [dashChannelNav(m, d, s), h("div", { class: "dkvs" },
|
||||
dashKv("Gain", ch.mute ? "MUTE" : SPEC.gain.fmt(ch.gain), ch.mute ? "bad" : ""),
|
||||
dashKv("Delay", SPEC.delay.fmt(ch.delay)),
|
||||
dashKv("Phase", ch.polarity ? "180°" : "0°"),
|
||||
ch.hp ? dashKv(t("High-pass"), filt(ch.hp)) : null,
|
||||
ch.lp ? dashKv(t("Low-pass"), filt(ch.lp)) : null,
|
||||
dashKv("EQ", on ? t("{n} bands active", { n: on }) : t("flat")),
|
||||
s.kind === "out" ? dashKv(t("Sources"), chans(d, "in").map((_, i) => (ch.matrix >> i & 1 ? chLabel("in", i) : "")).filter(Boolean).join(", ") || "–") : null,
|
||||
s.kind === "out" ? dashKv("Limiter", SPEC.thresh.fmt(ch.limit.threshold)) : null,
|
||||
s.kind === "in" ? dashKv("Gate", SPEC.gthresh.fmt(ch.gate.threshold)) : null)];
|
||||
},
|
||||
},
|
||||
limiter: {
|
||||
title: () => "Limiter", w: 4,
|
||||
icon: '<path d="M2 7h20" stroke-dasharray="2.5 2.5"/><path d="M2 14c2 0 3-7 5-7h3c2 0 3 11 6 11s3-5 6-5"/>',
|
||||
body(m, d) {
|
||||
return h("div", { class: "dlist" }, chans(d, "out").map((ch, o) => {
|
||||
const c = limCalc(d.id, o, ch.limit.threshold);
|
||||
return h("div", { class: "drow" }, limLed(d.id, o), h("span", { class: "dlab" }, chLabel("out", o)),
|
||||
h("span", { class: "grow dsub" }, c ? c.amp.name : ""),
|
||||
h("b", { class: "dval" }, c ? fmtW(c.p) : SPEC.thresh.fmt(ch.limit.threshold)));
|
||||
}));
|
||||
},
|
||||
},
|
||||
routing: {
|
||||
title: () => "Routing", w: 4,
|
||||
icon: '<path d="M4 6h16M4 12h16M4 18h16M8 3v18M16 3v18"/>',
|
||||
body(m, d) {
|
||||
const ins = chans(d, "in");
|
||||
return h("div", { class: "dmatrix", style: `--n:${ins.length}` },
|
||||
h("span"), ins.map((_, i) => h("b", { style: `color:${inColor(d, i)}` }, chLabel("in", i).replace("In ", ""))),
|
||||
chans(d, "out").flatMap((ch, o) => [h("span", {}, chLabel("out", o)),
|
||||
...ins.map((_, i) => h("i", { class: ch.matrix >> i & 1 ? "on" : "", style: `--c:${inColor(d, i)}`, title: `${chLabel("in", i)} → ${chLabel("out", o)}` }))]));
|
||||
},
|
||||
},
|
||||
delays: {
|
||||
title: () => "Delay", w: 4,
|
||||
icon: '<circle cx="12" cy="13" r="8"/><path d="M12 9v4l2 2M9 2h6"/>',
|
||||
body(m, d) {
|
||||
const row = (k, i) => {
|
||||
const ch = chans(d, k)[i];
|
||||
return h("div", { class: "drow" + (ch.delay ? "" : " zero") }, h("span", { class: "dlab" }, chLabel(k, i)), h("span", { class: "grow dsub" }, ch.name), h("b", { class: "dval" }, SPEC.delay.fmt(ch.delay)));
|
||||
};
|
||||
return h("div", { class: "dlist" }, dashChannels(d).map(([k, i]) => row(k, i)));
|
||||
},
|
||||
},
|
||||
fir: {
|
||||
title: () => t("FIR filters"), w: 4, only: () => dashDevs().some(d => d.fir),
|
||||
icon: '<path d="M2 12h3l2-7 3 14 3-11 2 6 2-3 1 1h4"/>',
|
||||
body(m, d) {
|
||||
if (!d.fir) return h("p", { class: "info dempty" }, t("{name} has no FIR filters.", { name: d.name }));
|
||||
const used = firUsed(d);
|
||||
const list = dashChannels(d).filter(([k, i]) => firTapsOf(chans(d, k)[i]));
|
||||
return [h("div", { class: "firmeter" }, h("span", { style: `width:${Math.min(100, used / 40.96)}%` })),
|
||||
h("p", { class: "info" }, t("{used} of 4096 taps in use", { used })),
|
||||
list.length ? h("div", { class: "dlist" }, list.map(([k, i]) => {
|
||||
const f = chans(d, k)[i].fir;
|
||||
return h("div", { class: "drow" }, h("span", { class: "dlab" }, chLabel(k, i)),
|
||||
h("span", { class: "grow dsub" }, "type" in f ? FIR_TYPES()[f.type] : f.name), h("b", { class: "dval" }, firTapsOf(chans(d, k)[i])));
|
||||
})) : null];
|
||||
},
|
||||
},
|
||||
notes: {
|
||||
title: () => t("Notes"), w: 4, global: true,
|
||||
icon: '<path d="M5 3h14v18H5zM9 8h6M9 12h6M9 16h3"/>',
|
||||
body(m) { return m.cfg.text ? h("p", { class: "dnote" }, m.cfg.text) : h("p", { class: "info dempty" }, t("Empty – add text in the module settings.")); },
|
||||
},
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------ editing
|
||||
|
||||
function dashAdd(type, at = dashMods().length) {
|
||||
const mods = dashMods(), def = DASH_MODULES[type];
|
||||
const id = "m" + Date.now().toString(36) + Math.floor(Math.random() * 1296).toString(36);
|
||||
const d = dashDevs()[0];
|
||||
const m = { id, type, w: def.w, cfg: def.global || !d ? {} : { device: d.id } };
|
||||
mods.splice(at, 0, m);
|
||||
dashSave();
|
||||
return m;
|
||||
}
|
||||
|
||||
async function dashSettings(m) {
|
||||
const def = DASH_MODULES[m.type], d = dashDev(m);
|
||||
const title = h("input", { type: "text", maxlength: 40, value: m.cfg.title || "", placeholder: def.title() });
|
||||
const dev_ = def.global ? null : h("select", {}, dashDevs().map(x => h("option", { value: x.id, selected: x === d }, x.name)));
|
||||
const text = m.type === "notes" ? h("textarea", { rows: 6, maxlength: 2000 }, m.cfg.text || "") : null;
|
||||
const res = await modal({ title: def.title(),
|
||||
body: h("div", { class: "form dform" }, h("label", { class: "full" }, t("Title"), title),
|
||||
dev_ ? h("label", { class: "full" }, "DSP", dev_) : null, text ? h("label", { class: "full" }, t("Text"), text) : null),
|
||||
actions: [{ label: t("Cancel") }, { label: t("Save"), primary: true, value: () => true }] });
|
||||
if (!res) return;
|
||||
m.cfg = { ...m.cfg, title: title.value.trim() };
|
||||
if (dev_) m.cfg.device = dev_.value;
|
||||
if (text) m.cfg.text = text.value;
|
||||
dashBrowse.delete(m.id);
|
||||
dashSave(); render();
|
||||
}
|
||||
|
||||
// Drag with pointer events (mouse and touch): modules are moved, new ones come from the palette.
|
||||
function dashDrag(ev, source, el) {
|
||||
if (ev.button) return;
|
||||
const sx = ev.clientX, sy = ev.clientY;
|
||||
let ghost = null, ph = null, grid = null;
|
||||
const start = () => {
|
||||
S.busy = true;
|
||||
grid = $("#main .dash");
|
||||
const w = source.mod ? source.mod.w : DASH_MODULES[source.type].w;
|
||||
ph = h("div", { class: `dmod dph w${w}` });
|
||||
const r = el.getBoundingClientRect();
|
||||
ghost = (source.mod ? el.closest(".dmod") : el).cloneNode(true);
|
||||
ghost.classList.add("dghost");
|
||||
ghost.style.width = (source.mod ? el.closest(".dmod").getBoundingClientRect().width : r.width) + "px";
|
||||
document.body.append(ghost);
|
||||
if (source.mod) { const home = el.closest(".dmod"); home.after(ph); home.hidden = true; } else grid.append(ph);
|
||||
document.body.classList.add("ddragging");
|
||||
};
|
||||
const place = (x, y) => {
|
||||
ghost.style.transform = `translate(${x + 8}px, ${y + 8}px)`;
|
||||
if (y < 70) window.scrollBy(0, -12); else if (y > window.innerHeight - 70) window.scrollBy(0, 12);
|
||||
const items = [...grid.children].filter(c => c !== ph && !c.hidden);
|
||||
const next = items.find(c => { const r = c.getBoundingClientRect(); return y < r.top || (y < r.bottom && x < r.left + r.width / 2); });
|
||||
if (next) { if (ph.nextSibling !== next) grid.insertBefore(ph, next); } else if (grid.lastChild !== ph) grid.append(ph);
|
||||
};
|
||||
const move = e => {
|
||||
if (!ghost) { if (Math.hypot(e.clientX - sx, e.clientY - sy) < 6) return; start(); }
|
||||
e.preventDefault();
|
||||
place(e.clientX, e.clientY);
|
||||
};
|
||||
const end = e => {
|
||||
window.removeEventListener("pointermove", move); window.removeEventListener("pointerup", end); window.removeEventListener("pointercancel", end);
|
||||
if (!ghost) { if (e.type === "pointerup" && source.type) { dashAdd(source.type); render(); } return; }
|
||||
const items = [...grid.children].filter(c => !c.hidden);
|
||||
const at = items.indexOf(ph);
|
||||
const onGrid = e.type === "pointerup";
|
||||
ghost.remove(); document.body.classList.remove("ddragging"); S.busy = false;
|
||||
const mods = dashMods();
|
||||
if (onGrid && at >= 0) {
|
||||
if (source.mod) { mods.splice(mods.indexOf(source.mod), 1); mods.splice(at, 0, source.mod); dashSave(); }
|
||||
else dashAdd(source.type, at);
|
||||
}
|
||||
render();
|
||||
};
|
||||
window.addEventListener("pointermove", move, { passive: false });
|
||||
window.addEventListener("pointerup", end); window.addEventListener("pointercancel", end);
|
||||
}
|
||||
|
||||
function dashPalette() {
|
||||
const list = Object.entries(DASH_MODULES).filter(([, def]) => !def.only || def.only());
|
||||
return h("div", { class: "card dpalette" },
|
||||
h("h3", {}, h("span", { class: "grow" }, t("Add modules")), h("span", { class: "info dhelp" }, t("Drag into the page or tap"))),
|
||||
h("div", { class: "dchips" }, list.map(([type, def]) => {
|
||||
const c = h("button", { class: "dchip", type: "button" }, svgIcon(def.icon), def.title());
|
||||
c.addEventListener("pointerdown", e => dashDrag(e, { type }, c));
|
||||
return c;
|
||||
})));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------ page
|
||||
|
||||
function dashModule(m) {
|
||||
const def = DASH_MODULES[m.type];
|
||||
if (!def) return null;
|
||||
const d = def.global ? null : dashDev(m);
|
||||
let body;
|
||||
try {
|
||||
body = def.global || (d && d.status === "online" && d.state) ? def.body(m, d) : offline(d);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
body = h("p", { class: "info dempty" }, t("This module can't show this DSP."));
|
||||
}
|
||||
const controls = dashEdit ? (() => {
|
||||
const steps = DASH_WIDTHS, at = Math.max(0, steps.indexOf(m.w));
|
||||
const size = dir => { m.w = steps[clamp(at + dir, 0, steps.length - 1)]; dashSave(); render(); };
|
||||
const grip = h("button", { class: "small dgrip", title: t("Drag to move"), "aria-label": t("Drag to move") }, "⠿");
|
||||
grip.addEventListener("pointerdown", e => dashDrag(e, { mod: m }, grip));
|
||||
return h("div", { class: "dctl" }, grip,
|
||||
h("button", { class: "small", disabled: at === 0, "aria-label": t("Narrower"), title: t("Narrower"), onclick: () => size(-1) }, "−"),
|
||||
h("button", { class: "small", disabled: at === steps.length - 1, "aria-label": t("Wider"), title: t("Wider"), onclick: () => size(1) }, "+"),
|
||||
h("button", { class: "small", "aria-label": t("Module settings"), title: t("Module settings"), onclick: () => dashSettings(m) }, "⚙"),
|
||||
h("button", { class: "small danger", "aria-label": t("Remove"), title: t("Remove"), onclick: () => {
|
||||
dashMods().splice(dashMods().indexOf(m), 1); dashSave(); render();
|
||||
} }, "×"));
|
||||
})() : null;
|
||||
return h("section", { class: `card dmod w${m.w} dt-${m.type}` },
|
||||
h("h3", {}, svgIcon(def.icon), h("span", { class: "grow dtitle" }, m.cfg.title || def.title()),
|
||||
d && dashDevs().length > 1 ? h("small", { class: "ddev" }, d.name) : null, controls),
|
||||
body);
|
||||
}
|
||||
|
||||
function viewDash() {
|
||||
const mods = dashMods();
|
||||
return [
|
||||
h("div", { class: "dhead" }, h("h2", {}, "Dashboard"),
|
||||
S.locked ? null : h("button", { class: dashEdit ? "on" : "", onclick: () => { dashEdit = !dashEdit; render(); } }, dashEdit ? t("Done") : t("Customise"))),
|
||||
dashEdit ? dashPalette() : null,
|
||||
mods.length ? h("div", { class: "dash" + (dashEdit ? " editing" : "") }, mods.map(dashModule))
|
||||
: h("div", { class: "dash" + (dashEdit ? " editing" : "") }, h("div", { class: "dmod w12 dblank" }, t("Nothing here yet – press “Customise” and add modules."))),
|
||||
];
|
||||
}
|
||||
|
||||
let dashResize = 0;
|
||||
window.addEventListener("resize", () => {
|
||||
clearTimeout(dashResize);
|
||||
dashResize = setTimeout(() => { if (S.view === "dash" && !S.settings && !S.busy) render(); }, 200);
|
||||
});
|
||||
@@ -550,6 +550,30 @@ const DE = {
|
||||
"Frequency response": "Frequenzgang",
|
||||
"Out of FIR taps: all channels together have 4096": "Keine FIR-Taps mehr frei: alle Kanäle zusammen haben 4096",
|
||||
"Not valid FIR coefficients": "Keine gültigen FIR-Koeffizienten",
|
||||
"{name} is not connected.": "{name} ist nicht verbunden.",
|
||||
"No DSP added yet.": "Noch kein DSP angelegt.",
|
||||
"DSP overview": "DSP-Übersicht",
|
||||
"Open in the mixer": "Im Mixer öffnen",
|
||||
"Levels": "Pegel",
|
||||
"Faders": "Fader",
|
||||
"{n} bands active": "{n} Bänder aktiv",
|
||||
"flat": "flach",
|
||||
"Sources": "Quellen",
|
||||
"{name} has no FIR filters.": "{name} hat keine FIR-Filter.",
|
||||
"Notes": "Notizen",
|
||||
"Empty – add text in the module settings.": "Leer – Text in den Moduleinstellungen eintragen.",
|
||||
"Title": "Titel",
|
||||
"Text": "Text",
|
||||
"Add modules": "Module hinzufügen",
|
||||
"Drag into the page or tap": "Auf die Seite ziehen oder antippen",
|
||||
"This module can't show this DSP.": "Dieses Modul kann diesen DSP nicht anzeigen.",
|
||||
"Drag to move": "Zum Verschieben ziehen",
|
||||
"Narrower": "Schmaler",
|
||||
"Wider": "Breiter",
|
||||
"Module settings": "Moduleinstellungen",
|
||||
"Done": "Fertig",
|
||||
"Customise": "Anpassen",
|
||||
"Nothing here yet – press “Customise” and add modules.": "Noch nichts da – „Anpassen“ drücken und Module hinzufügen.",
|
||||
};
|
||||
|
||||
const DE_PATTERNS = [
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
</div>
|
||||
<div id="devtabs"></div>
|
||||
<nav id="viewtabs" aria-label="View" data-t-label="View">
|
||||
<button data-view="dash"><svg viewBox="0 0 24 24"><rect x="3" y="3" width="8" height="9" rx="1.5"/><rect x="13" y="3" width="8" height="5" rx="1.5"/><rect x="13" y="10" width="8" height="11" rx="1.5"/><rect x="3" y="14" width="8" height="7" rx="1.5"/></svg><span>Dashboard</span></button>
|
||||
<button data-view="mixer"><svg viewBox="0 0 24 24"><path d="M6 3v18M12 3v18M18 3v18"/><rect x="3.5" y="13" width="5" height="3" rx="1"/><rect x="9.5" y="7" width="5" height="3" rx="1"/><rect x="15.5" y="10" width="5" height="3" rx="1"/></svg><span>Mixer</span></button>
|
||||
<button data-view="channel"><svg viewBox="0 0 24 24"><path d="M2 14c3 0 3-7 6-7s3 10 6 10 3-6 6-6h2"/></svg><span data-t="Channel">Channel</span></button>
|
||||
<button data-view="routing"><svg viewBox="0 0 24 24"><path d="M4 6h16M4 12h16M4 18h16M8 3v18M16 3v18"/><circle cx="8" cy="6" r="2.2" class="f"/><circle cx="16" cy="12" r="2.2" class="f"/><circle cx="8" cy="18" r="2.2" class="f"/></svg><span>Routing</span></button>
|
||||
@@ -43,5 +44,6 @@
|
||||
<script src="/i18n.js"></script>
|
||||
<script src="/app.js"></script>
|
||||
<script src="/soundfield.js"></script>
|
||||
<script src="/dashboard.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
+92
-6
@@ -109,7 +109,9 @@ body[data-view=settings] #viewtabs button.active { background: none; color: var(
|
||||
position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; border-radius: 0; border: 0; border-top: 1px solid var(--line);
|
||||
padding: 4px 6px env(safe-area-inset-bottom); background: rgba(16, 18, 22, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
|
||||
}
|
||||
#viewtabs button { flex: 1; flex-direction: column; gap: 2px; font-size: 11px; min-height: 54px; padding: 4px; }
|
||||
#viewtabs { overflow-x: auto; scrollbar-width: none; }
|
||||
#viewtabs::-webkit-scrollbar { display: none; }
|
||||
#viewtabs button { flex: 1 0 60px; flex-direction: column; gap: 2px; font-size: 11px; min-height: 54px; padding: 4px; }
|
||||
#viewtabs button svg { width: 22px; height: 22px; }
|
||||
#toast { bottom: calc(var(--bnav) + 12px) !important; }
|
||||
}
|
||||
@@ -119,7 +121,8 @@ body[data-view=settings] #viewtabs button.active { background: none; color: var(
|
||||
.card h3 { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim);
|
||||
display: flex; align-items: center; gap: 8px; min-height: 22px; }
|
||||
.grow { flex: 1; }
|
||||
.cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; margin-bottom: 10px; }
|
||||
html { scrollbar-gutter: stable; }
|
||||
.cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: stretch; margin-bottom: 10px; }
|
||||
.cards .wide { grid-column: 1 / -1; }
|
||||
h2.section { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin: 14px 2px 8px; }
|
||||
.empty { color: var(--dim); text-align: center; padding: 60px 16px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
|
||||
@@ -229,7 +232,7 @@ input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius:
|
||||
button.mute.on { background: var(--mute); border-color: #f87171; color: #fff; box-shadow: 0 0 10px #dc262655; }
|
||||
.strip.muted { background: linear-gradient(#1f1517, var(--bg2)); }
|
||||
@media (min-width: 1200px) {
|
||||
.mgroup { flex-shrink: 1; flex-basis: 0; }
|
||||
.mgroup { flex: 0 1 auto !important; }
|
||||
.strips { grid-template-columns: repeat(var(--n), minmax(92px, 128px)); }
|
||||
.strip { width: auto; max-width: 128px; }
|
||||
}
|
||||
@@ -382,7 +385,9 @@ canvas.curve { width: 100%; height: clamp(200px, 32vw, 320px); display: block; b
|
||||
.lw small { font-size: 14px; font-weight: 500; color: var(--dim); }
|
||||
.lsub { font-size: 13px; color: var(--dim); margin-top: 2px; }
|
||||
.lbar { position: relative; height: 8px; border-radius: 4px; background: var(--panel3); margin: 10px 0 4px; }
|
||||
.lres.none .lbar { display: none; }
|
||||
.lres.none .lbar, .lres.none .lw, .lres.none .lnotes { display: none; }
|
||||
.lres.none { padding: 7px 10px; }
|
||||
.lres.none .lsub { margin: 0; }
|
||||
.lbar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 100%); border-radius: 4px; background: var(--c); transition: width .15s; }
|
||||
.lbar b, .lbar::after { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); left: calc(var(--a) * 100% - 1px); }
|
||||
.lbar::after { content: ""; display: none; background: var(--warn); left: calc(var(--s) * 100% - 1px); }
|
||||
@@ -507,8 +512,8 @@ input.code { width: 7.5em; text-align: center; font-family: ui-monospace, Menlo,
|
||||
.tf .fader { height: 300px; }
|
||||
.testval { white-space: nowrap; width: 6.5em; text-align: center; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
|
||||
.tf { flex: none; width: 6.5em; }
|
||||
.tmeters { display: flex; gap: 6px; overflow-x: auto; min-width: 0; padding-bottom: 4px; }
|
||||
.tmeter { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
|
||||
.tmeters { flex: 1; display: flex; gap: 6px; overflow-x: auto; min-width: 0; padding-bottom: 4px; }
|
||||
.tmeter { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1 0 auto; max-width: 120px; }
|
||||
.tmeter .led { height: 300px; }
|
||||
.testfader h3 .info { margin-left: 8px; text-transform: none; letter-spacing: 0; font-weight: 400; }
|
||||
.tmeter small { font-size: 11px; color: var(--dim); }
|
||||
@@ -762,3 +767,84 @@ input[type=range].haslim::-moz-range-track {
|
||||
.firch.on small { color: #dbeafe; }
|
||||
.firform { margin-bottom: 8px; }
|
||||
canvas.fircurve { display: block; width: 100%; height: 240px; background: var(--bg2); border-radius: 8px; }
|
||||
/* ---- dashboard */
|
||||
.dhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 10px; }
|
||||
.dhead h2 { margin: 0; font-size: 20px; }
|
||||
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; gap: 10px; align-items: stretch; }
|
||||
.dmod { min-width: 0; display: flex; flex-direction: column; }
|
||||
.dmod[hidden] { display: none; }
|
||||
.w3 { grid-column: span 3; } .w4 { grid-column: span 4; } .w6 { grid-column: span 6; } .w8 { grid-column: span 8; } .w12 { grid-column: span 12; }
|
||||
@media (max-width: 1100px) { .w3, .w4 { grid-column: span 6; } .w6, .w8 { grid-column: span 12; } }
|
||||
@media (max-width: 759px) { .dmod.w3, .dmod.w4, .dmod.w6, .dmod.w8 { grid-column: span 12; } .dhelp { display: none; } }
|
||||
.dmod > h3 svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
||||
.dtitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
|
||||
.ddev { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: 0; }
|
||||
.dctl { display: flex; gap: 3px; flex: none; }
|
||||
.dctl button { min-height: 26px; min-width: 26px; padding: 0 6px; text-transform: none; letter-spacing: 0; }
|
||||
.dgrip { cursor: grab; touch-action: none; }
|
||||
.dash.editing .dmod { border-style: dashed; border-color: var(--line2, #3a4250); }
|
||||
.dempty { margin: auto; text-align: center; padding: 16px 4px; }
|
||||
.dblank { padding: 40px 12px; text-align: center; color: var(--dim); }
|
||||
.dpalette { margin-bottom: 10px; }
|
||||
.dpalette h3 { margin-bottom: 8px; }
|
||||
.dhelp { margin: 0; text-transform: none; letter-spacing: 0; font-weight: 400; }
|
||||
.dchips { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
.dchip { gap: 6px; min-height: 34px; padding: 4px 11px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
|
||||
.dchip svg { width: 15px; height: 15px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
||||
.dph { min-height: 110px; border: 2px dashed var(--accent); border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 8%, transparent); }
|
||||
.dghost { position: fixed; left: 0; top: 0; z-index: 90; margin: 0; pointer-events: none; opacity: .85; max-height: 240px; overflow: hidden; box-shadow: 0 12px 30px #000a; }
|
||||
body.ddragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
|
||||
.dlist { display: flex; flex-direction: column; gap: 4px; }
|
||||
.dlist hr { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid var(--line); }
|
||||
.drow { display: flex; align-items: center; gap: 8px; min-height: 26px; font-size: 13px; min-width: 0; }
|
||||
.dlink { width: 100%; justify-content: flex-start; min-height: 42px; padding: 5px 9px; text-align: left; font-weight: 400; background: var(--panel2); }
|
||||
.dname { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
|
||||
.dname b, .dname small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.dname small { color: var(--dim); font-size: 11px; }
|
||||
.dtag { flex: none; padding: 1px 6px; border-radius: 5px; font-size: 10px; font-weight: 700; letter-spacing: .05em; }
|
||||
.dtag.mute { color: #fff; background: var(--mute); }
|
||||
.dlab { flex: none; min-width: 3.1em; color: var(--dim); font-size: 12px; }
|
||||
.dsub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-size: 12px; }
|
||||
.dval { flex: none; min-width: 3.4em; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12px; }
|
||||
.dbar { --cc: var(--accent); flex: 1; position: relative; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; min-width: 30px; }
|
||||
.dbar i { position: absolute; inset: 0 auto 0 0; background: var(--cc); opacity: .85; }
|
||||
.dbar u { position: absolute; left: 70%; top: 0; bottom: 0; width: 1px; background: #ffffff66; }
|
||||
.dgain.muted .dbar i { background: var(--dim); opacity: .4; }
|
||||
.dgain.muted .dval { color: #f87171; font-size: 10px; }
|
||||
.drow.zero { opacity: .5; }
|
||||
.dmeters { flex: 1; display: flex; gap: 18px; flex-wrap: wrap; }
|
||||
.dmgroup { flex: 1 1 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
||||
.dmgroup .sub { margin: 0; }
|
||||
.dms { display: flex; gap: 6px; }
|
||||
.dm { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 20px; flex: 1 1 0; max-width: 60px; }
|
||||
.dm .led { height: 150px; }
|
||||
.dm small { color: var(--dim); font-size: 11px; }
|
||||
.dm.muted .led { opacity: .35; }
|
||||
.dm .limled { width: 18px; height: 4px; min-height: 4px; margin: 0; font-size: 0; }
|
||||
.dnav { 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); }
|
||||
.dnavname b { color: var(--text); }
|
||||
canvas.dcurve { display: block; width: 100%; height: 170px; background: var(--bg2); border-radius: 8px; }
|
||||
.dmod.w12 canvas.dcurve, .dmod.w8 canvas.dcurve { height: 200px; }
|
||||
.dbands { display: flex; gap: 3px; margin-top: 6px; overflow-x: auto; }
|
||||
.dband { flex: 1 0 34px; flex-direction: column; gap: 0; min-height: 34px; padding: 2px; font-weight: 400; background: var(--panel2); }
|
||||
.dband b { font-size: 12px; }
|
||||
.dband small { color: var(--dim); font-size: 10px; }
|
||||
.dband.act b { color: var(--accent); }
|
||||
.dband.off { opacity: .45; }
|
||||
.dband.on { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--panel2)); }
|
||||
.dbandinfo { margin: 6px 2px 0; min-height: 1.3em; }
|
||||
.dkvs { display: flex; flex-direction: column; }
|
||||
.dkv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
|
||||
.dkv:last-child { border-bottom: 0; }
|
||||
.dkv span { color: var(--dim); flex: none; }
|
||||
.dkv b { font-weight: 600; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.dkv.bad b { color: #f87171; }
|
||||
.dmatrix { display: grid; grid-template-columns: minmax(3.4em, auto) repeat(var(--n), minmax(16px, 1fr)); gap: 4px 3px; align-items: center; justify-items: center; font-size: 12px; }
|
||||
.dmatrix span { justify-self: start; color: var(--dim); white-space: nowrap; }
|
||||
.dmatrix b { font-size: 11px; }
|
||||
.dmatrix i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
|
||||
.dmatrix i.on { background: var(--c); box-shadow: 0 0 6px var(--c); }
|
||||
.dnote { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.45; }
|
||||
.dform textarea { width: 100%; resize: vertical; min-height: 110px; font: inherit; }
|
||||
Reference in new issue
Block a user