Compare commits
2
Commits
43def4480c
...
763a8781f4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
763a8781f4 | ||
|
|
9c6d2d6e35 |
No files matched your search
@@ -247,10 +247,7 @@ class App:
|
|||||||
if self.config_path.exists():
|
if self.config_path.exists():
|
||||||
cfg = json.loads(self.config_path.read_text(encoding="utf-8"))
|
cfg = json.loads(self.config_path.read_text(encoding="utf-8"))
|
||||||
else:
|
else:
|
||||||
cfg = {"devices": [
|
cfg = {"devices": []}
|
||||||
{"id": "dsp204", "name": "DSP 204", "host": "192.168.1.101", "model": "204", "autoconnect": False},
|
|
||||||
{"id": "dsp408", "name": "DSP 408", "host": "192.168.1.102", "model": "408", "autoconnect": False},
|
|
||||||
]}
|
|
||||||
now = time.time()
|
now = time.time()
|
||||||
self.sessions = {k: v for k, v in cfg.get("sessions", {}).items() if v > now}
|
self.sessions = {k: v for k, v in cfg.get("sessions", {}).items() if v > now}
|
||||||
self.locked = bool(cfg.get("locked"))
|
self.locked = bool(cfg.get("locked"))
|
||||||
|
|||||||
+14
-2
@@ -2409,6 +2409,17 @@ function viewSettings() {
|
|||||||
// ------------------------------------------------------------------ render
|
// ------------------------------------------------------------------ render
|
||||||
|
|
||||||
const H_SCROLL = ".mixer, .bands, .geq, .routing";
|
const H_SCROLL = ".mixer, .bands, .geq, .routing";
|
||||||
|
// first start: nothing added yet
|
||||||
|
function noDspView() {
|
||||||
|
return h("div", { class: "empty nodsp" }, svgIcon('<rect x="3" y="7" width="18" height="10" rx="2"/><path d="M7 12h.01M11 12h6"/>'),
|
||||||
|
h("b", {}, t("No DSP added yet")),
|
||||||
|
h("p", {}, t("Add your DSP over the network or USB. To look around first, switch on demo mode in the settings.")),
|
||||||
|
h("button", { class: "on", "data-view-ok": "", onclick: () => {
|
||||||
|
S.settings = true; S.addDev = true; render();
|
||||||
|
document.getElementById("set-devices")?.scrollIntoView({ block: "start" });
|
||||||
|
} }, t("Add a DSP")));
|
||||||
|
}
|
||||||
|
|
||||||
function render() {
|
function render() {
|
||||||
if (S.busy) { S.dirty = true; return; }
|
if (S.busy) { S.dirty = true; return; }
|
||||||
if ($("#app").hidden) return;
|
if ($("#app").hidden) return;
|
||||||
@@ -2429,10 +2440,11 @@ function render() {
|
|||||||
const d = dev();
|
const d = dev();
|
||||||
const field = !S.settings && S.view === "soundfield"; // the room plan works without a connected DSP
|
const field = !S.settings && S.view === "soundfield"; // the room plan works without a connected DSP
|
||||||
const dash = !S.settings && S.view === "dash"; // shows all DSPs, works without any
|
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;
|
document.body.dataset.view = field ? "soundfield" : dash ? "dash" : S.settings ? "settings" : S.view;
|
||||||
if (field) content = viewSoundField();
|
if (field) content = viewSoundField();
|
||||||
else if (dash) content = viewDash();
|
else if (dash) content = viewDash();
|
||||||
else if (S.settings || !d) content = viewSettings();
|
else if (S.settings) content = viewSettings();
|
||||||
|
else if (!d) content = noDspView();
|
||||||
else if (d.status !== "online" || !d.state)
|
else if (d.status !== "online" || !d.state)
|
||||||
content = h("div", { class: "empty" }, h("div", { class: "spinner" + (["loading", "connecting"].includes(d.status) ? "" : " off") }),
|
content = h("div", { class: "empty" }, h("div", { class: "spinner" + (["loading", "connecting"].includes(d.status) ? "" : " off") }),
|
||||||
d.status === "loading" ? t("Loading the configuration from the DSP…")
|
d.status === "loading" ? t("Loading the configuration from the DSP…")
|
||||||
|
|||||||
+8
-2
@@ -95,8 +95,13 @@ const DASH_MODULES = {
|
|||||||
title: () => t("Levels"), w: 8, min: [3, 5], max: [12, 14], h: 7,
|
title: () => t("Levels"), w: 8, min: [3, 5], max: [12, 14], h: 7,
|
||||||
icon: '<path d="M5 20V10M10 20V4M15 20v-7M20 20V8"/>',
|
icon: '<path d="M5 20V10M10 20V4M15 20v-7M20 20V8"/>',
|
||||||
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: `grid-column:${i + 1}` },
|
// limiter as one more segment on top; inputs keep the room so all scales line up
|
||||||
ledMeter(d.id, k, i), k === "out" ? limLed(d.id, i) : h("span", { class: "limled ph", "aria-hidden": "true" }));
|
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 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 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)));
|
const named = ["in", "out"].some(k => linkedGroups(d, k).some(g => linkName(d, k, g)));
|
||||||
@@ -383,6 +388,7 @@ function dashModule(m) {
|
|||||||
|
|
||||||
function viewDash() {
|
function viewDash() {
|
||||||
if (viewOnly()) dashEdit = false;
|
if (viewOnly()) dashEdit = false;
|
||||||
|
if (!dashDevs().length) return noDspView();
|
||||||
const mods = dashMods();
|
const mods = dashMods();
|
||||||
return [
|
return [
|
||||||
h("div", { class: "dhead" }, h("h2", {}, "Dashboard"),
|
h("div", { class: "dhead" }, h("h2", {}, "Dashboard"),
|
||||||
|
|||||||
@@ -581,6 +581,8 @@ const DE = {
|
|||||||
"Read-only": "Nur ansehen",
|
"Read-only": "Nur ansehen",
|
||||||
"Edit mode – changes go to the DSP": "Bearbeiten – Änderungen gehen an den DSP",
|
"Edit mode – changes go to the DSP": "Bearbeiten – Änderungen gehen an den DSP",
|
||||||
"Read-only – switch to edit at the top": "Nur ansehen – oben auf Bearbeiten umschalten",
|
"Read-only – switch to edit at the top": "Nur ansehen – oben auf Bearbeiten umschalten",
|
||||||
|
"No DSP added yet": "Noch kein DSP angelegt",
|
||||||
|
"Add your DSP over the network or USB. To look around first, switch on demo mode in the settings.": "Lege deinen DSP über Netzwerk oder USB an. Zum Ausprobieren gibt es in den Einstellungen den Demo-Modus.",
|
||||||
};
|
};
|
||||||
|
|
||||||
const DE_PATTERNS = [
|
const DE_PATTERNS = [
|
||||||
|
|||||||
+8
-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 { 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.muted .led { opacity: .35; }
|
.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 { 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; }
|
.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 { flex: 1; min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--dim); }
|
||||||
@@ -881,3 +884,7 @@ canvas.dcurve { display: block; width: 100%; flex: 1 1 0; min-height: 70px; back
|
|||||||
.guard.on .guardtrack { background: var(--accent); }
|
.guard.on .guardtrack { background: var(--accent); }
|
||||||
.guard.on .guardtrack i { left: 14px; }
|
.guard.on .guardtrack i { left: 14px; }
|
||||||
body.locked #main input[type=range] { pointer-events: none; }
|
body.locked #main input[type=range] { pointer-events: none; }
|
||||||
|
.nodsp { gap: 10px; }
|
||||||
|
.nodsp svg { width: 44px; height: 44px; fill: none; stroke: var(--dim); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
|
||||||
|
.nodsp b { color: var(--text); font-size: 18px; }
|
||||||
|
.nodsp p { max-width: 420px; margin: 0 0 6px; line-height: 1.45; }
|
||||||
Reference in new issue
Block a user