refactor(frontend): move S3TT1NGS to its own /settings.html page (#1464 step 2)
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.
This commit is contained in:
parent
8006dd2809
commit
d9c66de069
9 changed files with 124 additions and 62 deletions
|
|
@ -78,15 +78,9 @@
|
|||
into the log viewer (an agent's logs, a build entry's log)
|
||||
still live inside the relevant dashboard content. -->
|
||||
|
||||
<!-- S3TT1NGS: lock-bump + matrix-gui config. A regular tab in the
|
||||
strip now (the responsive overflow ⋮ menu was dropped — if the
|
||||
strip ever runs out of room we move panes to their own pages
|
||||
rather than hide them). -->
|
||||
<a class="tab" id="tab-settings" href="#settings" role="tab"
|
||||
aria-controls="tab-pane-settings"
|
||||
data-tab="settings">
|
||||
<span class="tab-label">◆ S3TT1NGS ◆</span>
|
||||
</a>
|
||||
<!-- S3TT1NGS lives on its own page now (`/settings.html`), reached
|
||||
from the H0M3 hub — operator-local prefs don't need a slot in
|
||||
the operational tab strip. -->
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
|
|
@ -282,26 +276,11 @@
|
|||
tabs.js boots on this page the corresponding renderers
|
||||
no-op silently (each guard is `if (!el) return`). -->
|
||||
|
||||
<!-- S3TT1NGS: operator-local preferences. Today this is just the
|
||||
browser-notification toggle (per-browser localStorage state).
|
||||
The same IDs that used to live in the tab strip migrated
|
||||
here unchanged so `NOTIF.bind()` in common.js wires them
|
||||
without any JS change. -->
|
||||
<section class="tab-pane" id="tab-pane-settings" data-tab-pane="settings" hidden
|
||||
role="tabpanel" aria-labelledby="tab-settings">
|
||||
<h2>◆ S3TT1NGS ◆</h2>
|
||||
<div class="divider">══════════════════════════════════════════════════════════════</div>
|
||||
<p class="meta">operator-local preferences. these live in the browser's localStorage — they do not sync between devices and do not survive a profile wipe.</p>
|
||||
|
||||
<h3>◇ browser notifications</h3>
|
||||
<p class="meta">desktop notifications for new approvals, new operator questions, and broker messages addressed to you. requires a secure context (https or localhost). mute silences the notifications without revoking the OS-level permission.</p>
|
||||
<div id="notif-row" class="notif-row">
|
||||
<button type="button" id="notif-enable" class="btn btn-notif" hidden>🔔 enable notifications</button>
|
||||
<button type="button" id="notif-mute" class="btn btn-notif" hidden>🔕 mute</button>
|
||||
<button type="button" id="notif-unmute" class="btn btn-notif" hidden>🔔 unmute</button>
|
||||
<span id="notif-status" class="meta" hidden></span>
|
||||
</div>
|
||||
</section>
|
||||
<!-- S3TT1NGS: operator-local preferences (browser-notification
|
||||
toggle) live on their own page now (`/settings.html`), reached
|
||||
from the H0M3 hub. The notif buttons moved there verbatim;
|
||||
`NOTIF.show()` on this page still fires (it reads the same
|
||||
localStorage + browser permission the settings page sets). -->
|
||||
|
||||
</main>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue