Theseus 0.3.124 (cont'd): the General row is Theseus ID, not Theseus Shield

The subagent's first pass took the Settings brief's parenthetical note
("previously Theseus ID") to mean "this row sits where Theseus ID used
to live", and wired the row to the Shield (adblocker) add-on with its
on/off toggle. The intent was simpler: just put Theseus ID back as a
regular chevron row in General. Dropped the Shield toggle/opener wiring
and reset the row to label and link Theseus ID, matching the Theseus ID
chevron that used to live below Updates (now consolidated).
This commit is contained in:
Local Dev 2026-10-27 21:59:07 +02:00
parent b1b393f02f
commit 1f394bb524

View file

@ -340,14 +340,11 @@
</div>
<label class="sw"><input type="checkbox" id="defaultBrowser"><span class="track"><span class="knob"></span></span></label>
</div>
<!-- Theseus Shield — chevron opens the Shield add-on's own panel; the
toggle on the right flips it on/off. State comes from listAddons(). -->
<div class="row" id="generalShieldRow">
<div class="txt" id="generalShieldOpen" role="button" tabindex="0" style="cursor:pointer" title="Open Theseus Shield">
<div class="t">Theseus Shield <span class="chev">›</span></div>
<div class="d">Click to open its own settings. Blocks third-party trackers and ads on every site.</div>
</div>
<label class="sw" title="Turn Shield on/off"><input type="checkbox" id="generalShieldOn"><span class="track"><span class="knob"></span></span></label>
<!-- Theseus ID — chevron to the ID sub-page. No toggle: identity is
not an on/off, it is managed on its own page. -->
<div class="row link" data-go="theseusid">
<div class="txt"><div class="t">Theseus ID</div><div class="d">Your Silent Mode account, kept in your Theseus Vault.</div></div>
<span class="chev">›</span>
</div>
<!-- Startup — the restoreSession toggle lives here as a one-line row. -->
<div class="row">
@ -360,11 +357,6 @@
<div class="txt"><div class="t">Updates</div><div class="d" id="updStatus">Loading…</div></div>
<div class="ctl"><button id="updCheck" class="btn">Check for updates</button></div>
</div>
<!-- Theseus ID moved out of the top nav — reach its sub-page from here. -->
<div class="row link" data-go="theseusid">
<div class="txt"><div class="t">Theseus ID</div><div class="d">Your Silent Mode account, kept in your Theseus Vault.</div></div>
<span class="chev">›</span>
</div>
<h2 class="sub">Appearance</h2>
<p class="subd">Choose a theme for the browser. <b>System</b> follows your operating system's light/dark setting.</p>
<div class="themeCards" id="theme" role="radiogroup" aria-label="Theme">
@ -1382,37 +1374,6 @@
openSys.addEventListener("click", () => cfg.openSystemDefaults());
refresh();
})();
// General › Theseus Shield row — chevron opens the Shield add-on's panel;
// toggle flips the blocker on/off. State comes from listAddons().
(function () {
const openEl = document.getElementById("generalShieldOpen");
const onEl = document.getElementById("generalShieldOn");
if (!openEl || !onEl) return;
const openShield = () => {
// Prefer the add-on's own panel; fall back to the Extensions page.
if (C && typeof C.openPanel === "function") {
try { C.openPanel("blocker:main"); return; } catch {}
}
try { showSection("addons"); } catch {}
};
openEl.addEventListener("click", openShield);
openEl.addEventListener("keydown", (e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); openShield(); } });
async function refresh() {
try {
const list = await (C.listAddons ? C.listAddons() : Promise.resolve({}));
const blocker = ((list && list.installed) || []).find((a) => a.id === "blocker");
onEl.checked = !!(blocker && blocker.enabled);
} catch {}
}
onEl.addEventListener("change", async () => {
try { if (C.setAddonEnabled) await C.setAddonEnabled("blocker", onEl.checked); } catch {}
// Give the host a moment to flip, then refresh so the toggle shows the
// real state (an add-on that refused the flip stays as it was).
setTimeout(refresh, 400);
});
refresh();
document.addEventListener("section", (e) => { if (e.detail === "general") refresh(); });
})();
// Aegis landing-section chevron — opens Aegis's own sidebar panel. Falls
// back to the plug-in sub-page if the panel isn't registered.
(function () {