Looks per preset, steadier DJ Brake, no zoom on phones, simple dashboard on touch

Colours and link group names now belong to the preset (by name, the DSP has no
IDs) and travel in preset files. DJ Brake: limiters are left out instead of
chosen; a slowly falling peak mark, an average bar, a warning before the limit,
and it learns from real hits where the limiter sits on the meter. Pinch and
double tap zoom are off. On touchscreens the dashboard only offers widget settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
GivouandClaude Opus 5.5 committed 2026-11-02 21:09:16 +01:00
1 parent 99613327f8
commit cf35a1faa1
11 files changed
+232 -48

No files matched your search

+8 -6
View File
@@ -10,6 +10,8 @@ const DASH_DEFAULT = () => [
].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());
@@ -377,15 +379,15 @@ function dashModule(m) {
const controls = dashEdit ? (() => {
return h("div", { class: "dctl" },
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: () => {
dashTouch() ? null : h("button", { class: "small danger", "aria-label": t("Remove"), title: t("Remove"), onclick: () => {
dashMods().splice(dashMods().indexOf(m), 1); dashSave(); render();
} }, "×"));
})() : null;
const head = h("h3", { title: dashEdit ? t("Drag to move") : null }, svgIcon(def.icon), h("span", { class: "grow dtitle" }, m.cfg.title || def.title()),
const head = h("h3", { title: dashEdit && !dashTouch() ? t("Drag to move") : null }, 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);
const el = h("section", { class: `card dmod dt-${m.type}`, style: dashSizeStyle(m.w, dashHeight(m, d)) },
head, h("div", { class: "dbody" }, body));
if (dashEdit) {
if (dashEdit && !dashTouch()) {
head.addEventListener("pointerdown", e => { if (!e.target.closest("button")) dashDrag(e, { mod: m }, head); });
const handle = (axes, cls, arrow, label) => {
const g = h("span", { class: "dgrab " + cls, title: label }, arrow);
@@ -403,9 +405,9 @@ function viewDash() {
const mods = dashMods();
return [
h("div", { class: "dhead" }, h("h2", {}, "Dashboard"),
viewOnly() ? 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))
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."))),
];
}