Extracts the operator-local preferences (browser-notification toggle)
out of the dashboard tab strip into a standalone /settings.html page,
reached from the H0M3 hub — same minimal-chrome pattern as /flow.html
and /logs.html. The dashboard tab strip is now purely operational.
- new settings.{html,css,js}; settings.js binds NOTIF + renders the
shared server-warnings banner (matching the other standalone pages).
- drop the S3TT1NGS tab + pane from dashboard.html; the NOTIF.bind()
toggle wiring moves to settings.js. The dashboard keeps NOTIF.show()
(approvals / questions) — it reads the same browser permission +
localStorage mute flag the settings page sets, so firing still works.
- move .notif-row / .btn-notif from dashboard.css to settings.css.
- add a Settings tile to the H0M3 hub; wire the new entries into
build.mjs and update the nix/frontend.nix asset manifest comment.
First slice of #1464 step 2; the ST4TS page extraction follows separately.
15 lines
718 B
JavaScript
15 lines
718 B
JavaScript
// /settings.html — operator-local preferences page.
|
|
//
|
|
// Extracted from the dashboard S3TT1NGS tab. Today the only setting is
|
|
// the browser-notification toggle: NOTIF.bind() wires the enable / mute /
|
|
// unmute buttons and persists state to localStorage. The dashboard's
|
|
// NOTIF.show() calls (approvals / questions) read that same localStorage
|
|
// state + the browser-level permission, so firing still works from the
|
|
// dashboard even though the toggle UI now lives on its own page.
|
|
//
|
|
// initServerWarnings() renders the shared top-of-page warnings banner,
|
|
// matching the other stand-alone pages (FL0W / L0GS / H0M3).
|
|
import { NOTIF, initServerWarnings } from './common.js';
|
|
|
|
initServerWarnings();
|
|
NOTIF.bind();
|