DJ Brake only shows the limiter acting; presets without a look start empty

The distance to the limiter, its bar, the warn-earlier slider and the learning
are gone: the page follows the DSP's limiter bits, with one second hold. Left out
limiters stay.
A preset without colours and group names of its own no longer inherits the ones
from the preset before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
GivouandClaude Opus 5.5 committed 2026-11-02 22:18:09 +01:00
1 parent 63b3c17fb7
commit 4a6eb2f513
9 files changed
+110 -304

No files matched your search

+3 -21
View File
@@ -2422,26 +2422,8 @@ function djBrakeCard() {
try { await navigator.clipboard.writeText(url); toast(t("Address copied")); } catch { toast(url); }
} }, t("Copy")))) : null,
S.djbrake && reachable ? djLimiters() : null,
S.djbrake && reachable ? djMarginOption() : null,
S.djbrake && reachable ? djHintOptions() : null,
S.djbrake && reachable ? h("p", { class: "info" }, t("Anyone in your network can open it without a PIN. It shows only the light and the distance to the limiter and changes nothing.")) : null);
}
function djMarginOption() {
const val = h("b", {}, `${S.djMargin} dB`);
const input = h("input", { type: "range", min: 0, max: 12, step: 1, value: S.djMargin, "aria-label": t("Warn earlier"),
oninput: () => { val.textContent = `${input.value} dB`; },
onchange: async () => {
try { S.djMargin = (await api("PUT", "/api/djbrake", { margin: +input.value })).margin; }
catch (e) { toast(t("Error: ") + trMsg(e.message)); render(); }
} });
return h("div", { class: "djlim" }, h("div", { class: "row" }, h("b", { class: "grow" }, t("Warn earlier")), val), input,
h("p", { class: "info" }, t("The page acts as if the limiter came this much earlier, so the DJ stays below the real one. The limiter itself does not change and the page does not show this setting.")),
h("p", { class: "info" }, t("With every real limiter hit the page learns where the limiter sits on the meter, so the distance gets more accurate.")),
h("button", { class: "small", onclick: async () => {
try { await api("PUT", "/api/djbrake", { relearn: true }); toast(t("Learned limiter levels forgotten")); }
catch (e) { toast(t("Error: ") + trMsg(e.message)); }
} }, t("Forget learned levels")));
S.djbrake && reachable ? h("p", { class: "info" }, t("Anyone in your network can open it without a PIN. It shows only the light and changes nothing.")) : null);
}
function djHintOptions() {
@@ -2726,7 +2708,7 @@ function connectEvents() {
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;
S.djbrake = !!ev.djbrake; S.djIgnore = ev.dj_ignore || {}; S.djHint = ev.dj_hint !== false; S.djHintEn = ev.dj_hint_en !== false; S.djMargin = ev.dj_margin || 0;
S.djbrake = !!ev.djbrake; S.djIgnore = ev.dj_ignore || {}; S.djHint = ev.dj_hint !== false; S.djHintEn = ev.dj_hint_en !== false;
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]));
@@ -2764,7 +2746,7 @@ function connectEvents() {
case "reset":
appWasReset(); break;
case "djbrake":
S.djbrake = ev.enabled; S.djIgnore = ev.ignore; S.djHint = ev.hint; S.djHintEn = ev.hint_en; S.djMargin = ev.margin; if (S.settings && !S.busy) render(); break;
S.djbrake = ev.enabled; S.djIgnore = ev.ignore; S.djHint = ev.hint; S.djHintEn = ev.hint_en; if (S.settings && !S.busy) render(); break;
case "logo":
S.logo = ev.data; showLogo(); if (S.settings) render(); break;
case "muteall":