Reset all app settings, dashboard starts empty
The reset disconnects all DSPs first and sends them nothing, asks for two random letters (and the PIN on the web), keeps a copy of the old config and reloads a fresh app. Refused during an audio test or mute all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6d53069380
commit
29a89af562
8 files changed
+117
-7
No files matched your search
+2
-6
@@ -4,17 +4,13 @@
|
||||
// Every module only looks: nothing here changes a DSP. Browsing (channel, EQ band) stays in this session.
|
||||
|
||||
const DASH_ROW = 40; // grid row + gap in px, see .dash
|
||||
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;
|
||||
// dragging modules around is no good on a touchscreen: there only their settings can be changed
|
||||
const dashTouch = () => matchMedia("(pointer: coarse)").matches;
|
||||
const dashBrowse = new Map(); // module id -> { kind, idx, band }
|
||||
|
||||
const dashMods = () => S.dash || (S.dash = DASH_DEFAULT());
|
||||
const dashMods = () => S.dash || (S.dash = []);
|
||||
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];
|
||||
@@ -408,7 +404,7 @@ function viewDash() {
|
||||
viewOnly() ? null : h("button", { class: dashEdit ? "on" : "", onclick: () => { dashEdit = !dashEdit; render(); } }, dashEdit ? t("Done") : dashTouch() ? t("Widget settings") : t("Customise"))),
|
||||
dashEdit && !dashTouch() ? dashPalette() : null,
|
||||
mods.length ? h("div", { class: "dash" + (dashEdit && !dashTouch() ? " editing" : "") }, mods.map(dashModule))
|
||||
: h("div", { class: "dash" + (dashEdit ? " editing" : "") }, h("div", { class: "dmod dblank", style: dashSizeStyle(12, 4) }, t("Nothing here yet – press “Customise” and add modules."))),
|
||||
: h("div", { class: "dash" + (dashEdit ? " editing" : "") }, h("div", { class: "dmod dblank", style: dashSizeStyle(12, 4) }, dashTouch() ? t("Nothing here yet – you can add modules on a computer.") : t("Nothing here yet – press “Customise” and add modules."))),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user