UX-13 P3 review: truthful peak lines, a clock-proof test, Simple stays default
- The peak limit's Why and plan block need a real power request (floor above 0 W), not a blind or floor-limited guard. An Off battery gets the peak block only while it gives power. Why no longer says every battery gives. - test_batteries_screen pins the fixture clock: unpinned it failed every morning. New checks cover the trade and cycle filters, the blind guard and an Off battery that A covers alone. - Settings keeps only a picked view; a link to Installer is not remembered. - Browser check: badges, unsaved change across views, locked value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -473,9 +473,11 @@
|
||||
window.UX13.batteries(batts);
|
||||
fillNotes();
|
||||
}
|
||||
function setMode(v, redraw) {
|
||||
// `remember`: only the person's own pick of a view is kept for next time;
|
||||
// a jump to Installer (a link, a setting to fix) is not.
|
||||
function setMode(v, redraw, remember) {
|
||||
mode = v;
|
||||
try { localStorage.setItem("ux13.settings.view", v); } catch (e) { /* no storage */ }
|
||||
if (remember) try { localStorage.setItem("ux13.settings.view", v); } catch (e) { /* no storage */ }
|
||||
document.querySelectorAll("#set-view [role=radio]").forEach((b) => {
|
||||
const on = b.dataset.v === v;
|
||||
b.setAttribute("aria-checked", String(on)); b.tabIndex = on ? 0 : -1;
|
||||
@@ -486,13 +488,13 @@
|
||||
if (redraw && M && view === "settings") render();
|
||||
}
|
||||
document.querySelectorAll("#set-view [role=radio]").forEach((b, i, all) => {
|
||||
b.addEventListener("click", () => setMode(b.dataset.v, true));
|
||||
b.addEventListener("click", () => setMode(b.dataset.v, true, true));
|
||||
b.addEventListener("keydown", (e) => {
|
||||
const d = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 }[e.key];
|
||||
if (!d) return;
|
||||
e.preventDefault();
|
||||
const j = all[(i + d + all.length) % all.length];
|
||||
setMode(j.dataset.v, true); j.focus();
|
||||
setMode(j.dataset.v, true, true); j.focus();
|
||||
});
|
||||
});
|
||||
setMode(mode, false);
|
||||
|
||||
Reference in New Issue
Block a user