sirius/js/profile-menu.js

268 lines
13 KiB
JavaScript
Raw Normal View History

feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
// Transforms the "🔑 Sign in" nav pill on every Sirius.X page into a wallet
// dropdown. Reads siriusProfile from localStorage; when null shows the three
// onboarding actions (New wallet / Import a phrase / WizardConnect), when
// present shows the signed-in menu (address, My names, Admin, Sign out).
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
//
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
// Each onboarding action deep-links portal.html?mode=new|import|wc; portal.html
// picks that up and immediately runs the matching flow — no extra click on
// arrival. Signed-in state changes flip the button label without a reload:
// the storage event covers cross-tab, a custom 'siriusProfileChanged' event
// covers same-tab (portal.html and tld.html both dispatch it on write/clear).
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
(() => {
const anchor = document.querySelector(".topnav a.portal");
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
if (!anchor) return;
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
// Base URL for local links — the nav's brand link is already set with the
// right relative path per page (./ at root, ../ in subdirs). Reuse it so
// absolute /sirius-x/... paths (which break under the BCNR route) never
// slip in.
2026-09-07 20:32:14 +02:00
const PORTAL_URL = anchor.getAttribute("href") || "./portal.html";
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
const BASE = PORTAL_URL.replace(/portal\.html.*$/, "");
const ADMIN_URL = BASE + "admin/";
2026-09-07 20:32:14 +02:00
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
const readProfile = () => {
try { return JSON.parse(localStorage.getItem("siriusProfile") || "null"); } catch { return null; }
};
// Build wrapper + button + (empty) menu around the existing pill.
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
const wrap = document.createElement("div");
wrap.className = "profile-wrap";
const btn = document.createElement("button");
btn.type = "button";
btn.className = anchor.className; // reuse .portal (and .here if present)
btn.setAttribute("aria-haspopup", "menu");
btn.setAttribute("aria-expanded", "false");
const menu = document.createElement("div");
menu.className = "profile-menu";
menu.setAttribute("role", "menu");
menu.hidden = true;
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
// ---------- render ----------
// Re-renders the button label AND the menu innerHTML from the current
// profile in localStorage. Called at load, on every open(), and whenever
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
// another tab or this tab updates the storage key.
function render() {
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
const p = readProfile();
if (p) {
const dot = `<span class="wallet-dot ok" aria-hidden="true"></span>`;
const label = shortAddr(p.address);
const sourceBadge = p.source === "wc"
? `<span class="wallet-src">WC</span>`
: `<span class="wallet-src">seed</span>`;
btn.innerHTML = `${dot}<span class="wallet-label">${escapeAttr(label)}</span>${sourceBadge}<span class="wallet-caret" aria-hidden="true">▾</span>`;
btn.setAttribute("aria-label", `Wallet ${label}, signed in via ${p.source || "seed"}`);
menu.innerHTML = `
<div class="profile-header">
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
<span class="profile-hint">Signed in via ${escapeAttr(p.source === "wc" ? "WizardConnect" : "seed phrase")}</span>
<code>${escapeAttr(p.address)}</code>
</div>
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
<a href="${PORTAL_URL}" role="menuitem">
<span class="mi-ic">📋</span>
<span class="mi-body"><b>My names</b><span class="mi-hint">records & holdings</span></span>
</a>
<a href="${ADMIN_URL}" role="menuitem">
<span class="mi-ic">🛠</span>
<span class="mi-body"><b>Admin panel</b><span class="mi-hint">operator tools</span></span>
</a>
<hr>
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
<a href="#" role="menuitem" data-action="signout">
<span class="mi-ic">🚪</span>
<span class="mi-body"><b>Sign out</b><span class="mi-hint">clear this browser</span></span>
</a>
`;
} else {
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
const dot = `<span class="wallet-dot" aria-hidden="true"></span>`;
btn.innerHTML = `${dot}<span class="wallet-label">Wallet</span><span class="wallet-caret" aria-hidden="true">▾</span>`;
btn.setAttribute("aria-label", "Wallet — not signed in");
feat(sirius-x): 🔓 Unlock my wallet in nav dropdown when a saved wallet exists Previously, the only way to unlock a wallet that had been saved in this browser was to click Register (name or TLD), open the modal, and pick 'Unlock my browser wallet' from the wallet-choice step. From the nav dropdown you could only start onboarding fresh (New / Import / WC). profile-menu.js now checks localStorage for the BuiltInWallet's storage key (bns.wallet.v1) at every render, and when a saved wallet is present inserts a '🔓 Unlock my wallet' item at the top of the not-signed-in dropdown — with a divider below it, so it reads as the primary action and the Onboarding options stay available for adding a different wallet. The dropdown click handler already lazy-loads register-flow.js and calls window.siriusSignInWallet(action); register-flow.js's startSignIn grew an 'unlock' mode that opens the modal directly at stepUnlock (the password prompt). Same success path as every other sign-in: on unlock success, siriusProfile is written and the modal closes with '✓ Signed in' — the nav pill flips to the address without a reload. Verified end-to-end on landing: saved wallet detected -> dropdown shows Unlock as first item -> click -> password -> '✓ Signed in' -> pill becomes 'qqyx49…zx8x seed ▾' with no reload. TLD mint from tld.html also verified end-to-end: search 'e2etldtest' -> Register -> modal -> Unlock -> password -> Fund -> Confirm (fee 1,250,000 sat + beacon dust ~1,300 sat) -> Register -> checking-availability -> loading-coins -> 'wallet is empty' (expected without chipnet funds; downstream code is the same registerTldWithBuiltInWallet path the CLI uses).
2026-09-08 00:24:54 +02:00
// If a saved encrypted wallet already exists in this browser (created
// in a previous session), surface an Unlock option as the first item so
// users can sign back into the same wallet the mint flow would use —
// instead of hunting for it inside the Register modal's wallet-choice.
const hasSaved = (() => {
try { return !!localStorage.getItem("bns.wallet.v1"); } catch { return false; }
})();
const unlockItem = hasSaved ? `
<a href="#" role="menuitem" data-action="unlock">
<span class="mi-ic">🔓</span>
<span class="mi-body"><b>Unlock my wallet</b><span class="mi-hint">one you already created on this device</span></span>
</a>
<hr>
` : "";
const headerHint = hasSaved
feat(sirius-x): admin TLD hide/unhide + tabbed sign-in modal (4 direct actions) Two features: 1. Operator can hide TLDs from the public /api/tlds listing so hidden TLDs stop appearing in name-search UIs. On-chain registrations under a hidden TLD keep resolving — this is a UX filter, not enforcement. Gateway (public-gateway.mjs): - Persistent HIDDEN_TLDS set backed by hidden-tlds.json next to the service script - GET /api/tld-visibility -> {hidden:[...]} (public) - POST /api/tld-visibility -> updates the list (operator-gated by Bearer BNS_OPERATOR_TOKEN env var; if unset, all writes refused so we default-deny) - /api/tlds filters out HIDDEN_TLDS; add ?include_hidden=1 to see everything (used by the admin panel to show all rows) - Operator token installed via systemd override on the VPS Admin panel: - New 'Operator token' card at the top of the TLD-registry section; token stored in sessionStorage (not localStorage) so a full browser close forgets it - Each TLD row got a 'Hidden from public' checkbox that POSTs on toggle and refreshes the table; failures roll back the checkbox and surface the error next to the token field 2. Wallet dropdown restored to 4 direct actions (Unlock / Create a wallet / Import a wallet / WizardConnect) and the shared mint/sign-in modal grew a tab strip so users can switch between the four wallet actions from any step without going back to a choice screen. register-flow.js: - renderTabs(active) prepended to stepCreate/stepImport/stepUnlock/ stepExternal when signInOnly is set. Unlock tab only appears when a saved wallet exists. - Delegated click handler on the sheet routes tab clicks to the matching step; switching away from a live WC session tears it down first so we don't leak WebSockets. profile-menu.js: - Restored 4-item onboarding menu (Create/Import/WC plus Unlock when saved). Each item is a direct entry point; the tabbed modal lets the user pivot to any other option without closing. Cache-buster bumped on all 8 sirius-x pages to ?v=20260908tabs.
2026-09-08 02:19:41 +02:00
? `<span class="profile-hint">Locked wallet on this device</span><span class="profile-sub">Unlock or pick another action</span>`
: `<span class="profile-hint">No wallet yet</span><span class="profile-sub">Pick how to sign in</span>`;
// Four direct actions — each opens the shared modal at the matching
// step (Unlock/Create/Import/WizardConnect) with tabs across the top
// of the modal so the user can switch between them without going back
// to a landing screen.
menu.innerHTML = `
feat(sirius-x): 🔓 Unlock my wallet in nav dropdown when a saved wallet exists Previously, the only way to unlock a wallet that had been saved in this browser was to click Register (name or TLD), open the modal, and pick 'Unlock my browser wallet' from the wallet-choice step. From the nav dropdown you could only start onboarding fresh (New / Import / WC). profile-menu.js now checks localStorage for the BuiltInWallet's storage key (bns.wallet.v1) at every render, and when a saved wallet is present inserts a '🔓 Unlock my wallet' item at the top of the not-signed-in dropdown — with a divider below it, so it reads as the primary action and the Onboarding options stay available for adding a different wallet. The dropdown click handler already lazy-loads register-flow.js and calls window.siriusSignInWallet(action); register-flow.js's startSignIn grew an 'unlock' mode that opens the modal directly at stepUnlock (the password prompt). Same success path as every other sign-in: on unlock success, siriusProfile is written and the modal closes with '✓ Signed in' — the nav pill flips to the address without a reload. Verified end-to-end on landing: saved wallet detected -> dropdown shows Unlock as first item -> click -> password -> '✓ Signed in' -> pill becomes 'qqyx49…zx8x seed ▾' with no reload. TLD mint from tld.html also verified end-to-end: search 'e2etldtest' -> Register -> modal -> Unlock -> password -> Fund -> Confirm (fee 1,250,000 sat + beacon dust ~1,300 sat) -> Register -> checking-availability -> loading-coins -> 'wallet is empty' (expected without chipnet funds; downstream code is the same registerTldWithBuiltInWallet path the CLI uses).
2026-09-08 00:24:54 +02:00
<div class="profile-header">${headerHint}</div>
${unlockItem}
feat(sirius-x): admin TLD hide/unhide + tabbed sign-in modal (4 direct actions) Two features: 1. Operator can hide TLDs from the public /api/tlds listing so hidden TLDs stop appearing in name-search UIs. On-chain registrations under a hidden TLD keep resolving — this is a UX filter, not enforcement. Gateway (public-gateway.mjs): - Persistent HIDDEN_TLDS set backed by hidden-tlds.json next to the service script - GET /api/tld-visibility -> {hidden:[...]} (public) - POST /api/tld-visibility -> updates the list (operator-gated by Bearer BNS_OPERATOR_TOKEN env var; if unset, all writes refused so we default-deny) - /api/tlds filters out HIDDEN_TLDS; add ?include_hidden=1 to see everything (used by the admin panel to show all rows) - Operator token installed via systemd override on the VPS Admin panel: - New 'Operator token' card at the top of the TLD-registry section; token stored in sessionStorage (not localStorage) so a full browser close forgets it - Each TLD row got a 'Hidden from public' checkbox that POSTs on toggle and refreshes the table; failures roll back the checkbox and surface the error next to the token field 2. Wallet dropdown restored to 4 direct actions (Unlock / Create a wallet / Import a wallet / WizardConnect) and the shared mint/sign-in modal grew a tab strip so users can switch between the four wallet actions from any step without going back to a choice screen. register-flow.js: - renderTabs(active) prepended to stepCreate/stepImport/stepUnlock/ stepExternal when signInOnly is set. Unlock tab only appears when a saved wallet exists. - Delegated click handler on the sheet routes tab clicks to the matching step; switching away from a live WC session tears it down first so we don't leak WebSockets. profile-menu.js: - Restored 4-item onboarding menu (Create/Import/WC plus Unlock when saved). Each item is a direct entry point; the tabbed modal lets the user pivot to any other option without closing. Cache-buster bumped on all 8 sirius-x pages to ?v=20260908tabs.
2026-09-08 02:19:41 +02:00
<a href="#" role="menuitem" data-action="new">
<span class="mi-ic">🆕</span>
<span class="mi-body"><b>Create a wallet</b><span class="mi-hint">generate a fresh 12-word phrase (sign up)</span></span>
</a>
<a href="#" role="menuitem" data-action="import">
<span class="mi-ic">📥</span>
<span class="mi-body"><b>Import a wallet</b><span class="mi-hint">seed phrase you already have (sign in)</span></span>
</a>
<a href="#" role="menuitem" data-action="wc">
<span class="mi-ic">🔗</span>
<span class="mi-body"><b>WizardConnect</b><span class="mi-hint">Cashonize / Paytaca via QR</span></span>
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
</a>
`;
}
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
}
render();
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
// ---------- open/close ----------
const open = () => { render(); menu.hidden = false; btn.setAttribute("aria-expanded", "true"); };
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
const close = () => { menu.hidden = true; btn.setAttribute("aria-expanded", "false"); };
btn.addEventListener("click", (e) => { e.stopPropagation(); menu.hidden ? open() : close(); });
document.addEventListener("click", (e) => { if (!wrap.contains(e.target)) close(); });
document.addEventListener("keydown", (e) => { if (e.key === "Escape") close(); });
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
// Cross-tab (storage event fires only in other tabs) + same-tab (portal.html
// dispatches this after writing/clearing) — either wakes render().
window.addEventListener("storage", (e) => { if (e.key === "siriusProfile") render(); });
window.addEventListener("siriusProfileChanged", render);
feat(sirius-x): inline wallet dropdown — no navigation, no portal detour Wallet dropdown items (New / Import / WizardConnect) were navigating to portal.html?mode=X and asking the user to click again on arrival. That is 'the sign in landing page which is not functioning' from the user's perspective — a whole redirect for one form. Now every dropdown item opens the mint modal (register-flow.js) inline at the matching step, on whatever page the user is on: New -> stepCreate ('Create your wallet' — password + generate) Import -> stepImport ('Import a recovery phrase' — textarea) WizardConnect -> stepExternal ('Open your wallet' — QR/URI) register-flow.js grew a signInOnly mode: state.name is null, the step Back buttons close instead of going to a wallet-choice step there is no context for, and on wallet-loaded the flow writes siriusProfile and shows a 'Signed in' confirmation instead of Fund -> Confirm -> Mint. WC signInOnly keeps the session alive (state.session) so a later record edit can reuse it without a fresh QR handshake. profile-menu.js: menu items became <a data-action='new|import|wc'> and the click handler lazy-loads register-flow.js on demand — the docs/brand/theseus pages don't ship it in their initial payload, so their nav pill loads it the first time a wallet button is clicked and caches it for subsequent opens. Falls back to portal.html?mode=X if the module can't load. Cache-buster bumped so cached copies pick up the new behavior. Importmap for @bitauth/libauth added to docs/, brand/, theseus/ so the bundle's bare specifier resolves when register-flow.js is lazy-loaded from those pages. Verified end-to-end on the live docs page: all three dropdown items open the modal inline at the correct step, no console errors, no navigation.
2026-09-07 23:52:12 +02:00
// ---------- menu actions ----------
// Sign-out clears siriusProfile; the wallet-onboarding items (new/import/wc)
// open the shared mint modal inline (register-flow.js). If the page did not
// ship register-flow.js in its own <script>, load it on demand.
const FLOW_URL = "js/register-flow.js?v=20260907signin";
async function ensureFlow() {
if (typeof window.siriusSignInWallet === "function") return true;
try {
// Same base as the nav portal anchor — works from root pages and
// subdirs equally (../ vs ./ handled by BASE).
await import(BASE + FLOW_URL);
// Its top-level code exposes the global synchronously after the
// module graph resolves; still, wait a tick for definiteness.
for (let i = 0; i < 50 && typeof window.siriusSignInWallet !== "function"; i++) {
await new Promise((r) => setTimeout(r, 30));
}
return typeof window.siriusSignInWallet === "function";
} catch { return false; }
}
menu.addEventListener("click", async (e) => {
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
const t = e.target.closest("[data-action]");
feat(sirius-x): inline wallet dropdown — no navigation, no portal detour Wallet dropdown items (New / Import / WizardConnect) were navigating to portal.html?mode=X and asking the user to click again on arrival. That is 'the sign in landing page which is not functioning' from the user's perspective — a whole redirect for one form. Now every dropdown item opens the mint modal (register-flow.js) inline at the matching step, on whatever page the user is on: New -> stepCreate ('Create your wallet' — password + generate) Import -> stepImport ('Import a recovery phrase' — textarea) WizardConnect -> stepExternal ('Open your wallet' — QR/URI) register-flow.js grew a signInOnly mode: state.name is null, the step Back buttons close instead of going to a wallet-choice step there is no context for, and on wallet-loaded the flow writes siriusProfile and shows a 'Signed in' confirmation instead of Fund -> Confirm -> Mint. WC signInOnly keeps the session alive (state.session) so a later record edit can reuse it without a fresh QR handshake. profile-menu.js: menu items became <a data-action='new|import|wc'> and the click handler lazy-loads register-flow.js on demand — the docs/brand/theseus pages don't ship it in their initial payload, so their nav pill loads it the first time a wallet button is clicked and caches it for subsequent opens. Falls back to portal.html?mode=X if the module can't load. Cache-buster bumped so cached copies pick up the new behavior. Importmap for @bitauth/libauth added to docs/, brand/, theseus/ so the bundle's bare specifier resolves when register-flow.js is lazy-loaded from those pages. Verified end-to-end on the live docs page: all three dropdown items open the modal inline at the correct step, no console errors, no navigation.
2026-09-07 23:52:12 +02:00
if (!t) return;
e.preventDefault();
const action = t.dataset.action;
if (action === "signout") {
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
try { localStorage.removeItem("siriusProfile"); } catch {}
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
window.dispatchEvent(new Event("siriusProfileChanged"));
feat(sirius-x): inline wallet dropdown — no navigation, no portal detour Wallet dropdown items (New / Import / WizardConnect) were navigating to portal.html?mode=X and asking the user to click again on arrival. That is 'the sign in landing page which is not functioning' from the user's perspective — a whole redirect for one form. Now every dropdown item opens the mint modal (register-flow.js) inline at the matching step, on whatever page the user is on: New -> stepCreate ('Create your wallet' — password + generate) Import -> stepImport ('Import a recovery phrase' — textarea) WizardConnect -> stepExternal ('Open your wallet' — QR/URI) register-flow.js grew a signInOnly mode: state.name is null, the step Back buttons close instead of going to a wallet-choice step there is no context for, and on wallet-loaded the flow writes siriusProfile and shows a 'Signed in' confirmation instead of Fund -> Confirm -> Mint. WC signInOnly keeps the session alive (state.session) so a later record edit can reuse it without a fresh QR handshake. profile-menu.js: menu items became <a data-action='new|import|wc'> and the click handler lazy-loads register-flow.js on demand — the docs/brand/theseus pages don't ship it in their initial payload, so their nav pill loads it the first time a wallet button is clicked and caches it for subsequent opens. Falls back to portal.html?mode=X if the module can't load. Cache-buster bumped so cached copies pick up the new behavior. Importmap for @bitauth/libauth added to docs/, brand/, theseus/ so the bundle's bare specifier resolves when register-flow.js is lazy-loaded from those pages. Verified end-to-end on the live docs page: all three dropdown items open the modal inline at the correct step, no console errors, no navigation.
2026-09-07 23:52:12 +02:00
// Reload so any signed-in section on the current page (portal, tld) resets.
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
location.reload();
feat(sirius-x): inline wallet dropdown — no navigation, no portal detour Wallet dropdown items (New / Import / WizardConnect) were navigating to portal.html?mode=X and asking the user to click again on arrival. That is 'the sign in landing page which is not functioning' from the user's perspective — a whole redirect for one form. Now every dropdown item opens the mint modal (register-flow.js) inline at the matching step, on whatever page the user is on: New -> stepCreate ('Create your wallet' — password + generate) Import -> stepImport ('Import a recovery phrase' — textarea) WizardConnect -> stepExternal ('Open your wallet' — QR/URI) register-flow.js grew a signInOnly mode: state.name is null, the step Back buttons close instead of going to a wallet-choice step there is no context for, and on wallet-loaded the flow writes siriusProfile and shows a 'Signed in' confirmation instead of Fund -> Confirm -> Mint. WC signInOnly keeps the session alive (state.session) so a later record edit can reuse it without a fresh QR handshake. profile-menu.js: menu items became <a data-action='new|import|wc'> and the click handler lazy-loads register-flow.js on demand — the docs/brand/theseus pages don't ship it in their initial payload, so their nav pill loads it the first time a wallet button is clicked and caches it for subsequent opens. Falls back to portal.html?mode=X if the module can't load. Cache-buster bumped so cached copies pick up the new behavior. Importmap for @bitauth/libauth added to docs/, brand/, theseus/ so the bundle's bare specifier resolves when register-flow.js is lazy-loaded from those pages. Verified end-to-end on the live docs page: all three dropdown items open the modal inline at the correct step, no console errors, no navigation.
2026-09-07 23:52:12 +02:00
return;
}
feat(sirius-x): admin TLD hide/unhide + tabbed sign-in modal (4 direct actions) Two features: 1. Operator can hide TLDs from the public /api/tlds listing so hidden TLDs stop appearing in name-search UIs. On-chain registrations under a hidden TLD keep resolving — this is a UX filter, not enforcement. Gateway (public-gateway.mjs): - Persistent HIDDEN_TLDS set backed by hidden-tlds.json next to the service script - GET /api/tld-visibility -> {hidden:[...]} (public) - POST /api/tld-visibility -> updates the list (operator-gated by Bearer BNS_OPERATOR_TOKEN env var; if unset, all writes refused so we default-deny) - /api/tlds filters out HIDDEN_TLDS; add ?include_hidden=1 to see everything (used by the admin panel to show all rows) - Operator token installed via systemd override on the VPS Admin panel: - New 'Operator token' card at the top of the TLD-registry section; token stored in sessionStorage (not localStorage) so a full browser close forgets it - Each TLD row got a 'Hidden from public' checkbox that POSTs on toggle and refreshes the table; failures roll back the checkbox and surface the error next to the token field 2. Wallet dropdown restored to 4 direct actions (Unlock / Create a wallet / Import a wallet / WizardConnect) and the shared mint/sign-in modal grew a tab strip so users can switch between the four wallet actions from any step without going back to a choice screen. register-flow.js: - renderTabs(active) prepended to stepCreate/stepImport/stepUnlock/ stepExternal when signInOnly is set. Unlock tab only appears when a saved wallet exists. - Delegated click handler on the sheet routes tab clicks to the matching step; switching away from a live WC session tears it down first so we don't leak WebSockets. profile-menu.js: - Restored 4-item onboarding menu (Create/Import/WC plus Unlock when saved). Each item is a direct entry point; the tabbed modal lets the user pivot to any other option without closing. Cache-buster bumped on all 8 sirius-x pages to ?v=20260908tabs.
2026-09-08 02:19:41 +02:00
if (["new", "import", "wc", "unlock"].includes(action)) {
feat(sirius-x): inline wallet dropdown — no navigation, no portal detour Wallet dropdown items (New / Import / WizardConnect) were navigating to portal.html?mode=X and asking the user to click again on arrival. That is 'the sign in landing page which is not functioning' from the user's perspective — a whole redirect for one form. Now every dropdown item opens the mint modal (register-flow.js) inline at the matching step, on whatever page the user is on: New -> stepCreate ('Create your wallet' — password + generate) Import -> stepImport ('Import a recovery phrase' — textarea) WizardConnect -> stepExternal ('Open your wallet' — QR/URI) register-flow.js grew a signInOnly mode: state.name is null, the step Back buttons close instead of going to a wallet-choice step there is no context for, and on wallet-loaded the flow writes siriusProfile and shows a 'Signed in' confirmation instead of Fund -> Confirm -> Mint. WC signInOnly keeps the session alive (state.session) so a later record edit can reuse it without a fresh QR handshake. profile-menu.js: menu items became <a data-action='new|import|wc'> and the click handler lazy-loads register-flow.js on demand — the docs/brand/theseus pages don't ship it in their initial payload, so their nav pill loads it the first time a wallet button is clicked and caches it for subsequent opens. Falls back to portal.html?mode=X if the module can't load. Cache-buster bumped so cached copies pick up the new behavior. Importmap for @bitauth/libauth added to docs/, brand/, theseus/ so the bundle's bare specifier resolves when register-flow.js is lazy-loaded from those pages. Verified end-to-end on the live docs page: all three dropdown items open the modal inline at the correct step, no console errors, no navigation.
2026-09-07 23:52:12 +02:00
close();
// Always route to the portal — it renders the tabbed sign-in INLINE
// as page content (?mode=X picks the starting tab). Prevents the
// "modal opens on top of the page" symptom the launcher used to have.
// Only stay on-page if we're already on portal.html.
const onPortal = /\/portal\.html(?:$|[?#])/.test(location.pathname + location.search);
if (onPortal && typeof window.siriusRenderSignInInline === "function") {
const hasSaved = (() => { try { return !!localStorage.getItem("bns.wallet.v1"); } catch { return false; } })();
const mode = (action === "unlock" && !hasSaved) ? "import" : action;
const mount = document.getElementById("signin-inline");
if (mount) {
window.siriusRenderSignInInline(mount, mode);
document.getElementById("signin")?.scrollIntoView({ behavior: "smooth", block: "start" });
return;
}
feat(sirius-x): inline wallet dropdown — no navigation, no portal detour Wallet dropdown items (New / Import / WizardConnect) were navigating to portal.html?mode=X and asking the user to click again on arrival. That is 'the sign in landing page which is not functioning' from the user's perspective — a whole redirect for one form. Now every dropdown item opens the mint modal (register-flow.js) inline at the matching step, on whatever page the user is on: New -> stepCreate ('Create your wallet' — password + generate) Import -> stepImport ('Import a recovery phrase' — textarea) WizardConnect -> stepExternal ('Open your wallet' — QR/URI) register-flow.js grew a signInOnly mode: state.name is null, the step Back buttons close instead of going to a wallet-choice step there is no context for, and on wallet-loaded the flow writes siriusProfile and shows a 'Signed in' confirmation instead of Fund -> Confirm -> Mint. WC signInOnly keeps the session alive (state.session) so a later record edit can reuse it without a fresh QR handshake. profile-menu.js: menu items became <a data-action='new|import|wc'> and the click handler lazy-loads register-flow.js on demand — the docs/brand/theseus pages don't ship it in their initial payload, so their nav pill loads it the first time a wallet button is clicked and caches it for subsequent opens. Falls back to portal.html?mode=X if the module can't load. Cache-buster bumped so cached copies pick up the new behavior. Importmap for @bitauth/libauth added to docs/, brand/, theseus/ so the bundle's bare specifier resolves when register-flow.js is lazy-loaded from those pages. Verified end-to-end on the live docs page: all three dropdown items open the modal inline at the correct step, no console errors, no navigation.
2026-09-07 23:52:12 +02:00
}
// Not on portal (or the inline mount is missing) — take the user
// there. portal.html?mode=X renders the tabbed sign-in as its main
// content, no modal.
location.href = PORTAL_URL + "?mode=" + action;
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
}
});
wrap.appendChild(btn);
wrap.appendChild(menu);
anchor.replaceWith(wrap);
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
// ---------- inline CSS ----------
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
if (!document.getElementById("profile-menu-css")) {
const s = document.createElement("style");
s.id = "profile-menu-css";
s.textContent = `
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
.topnav .profile-wrap{position:relative;margin-left:auto}
.topnav .profile-wrap button.portal{
display:inline-flex;align-items:center;gap:8px;
cursor:pointer;font-family:inherit;font-size:13.5px;font-weight:500;
padding:6px 12px 6px 10px;border-radius:999px;
background:rgba(214,255,61,.10);color:var(--acid);
border:1px solid rgba(214,255,61,.22);transition:background .1s,border-color .1s
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
}
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
.topnav .profile-wrap button.portal:hover{background:rgba(214,255,61,.16);border-color:rgba(214,255,61,.35)}
.topnav .profile-wrap button.portal[aria-expanded="true"]{background:rgba(214,255,61,.20)}
.topnav .profile-wrap .wallet-dot{
width:7px;height:7px;border-radius:50%;background:rgba(139,152,169,.45);
box-shadow:0 0 0 2px rgba(139,152,169,.10)
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
}
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
.topnav .profile-wrap .wallet-dot.ok{
background:#4fd1a5;box-shadow:0 0 0 2px rgba(79,209,165,.20)
}
.topnav .profile-wrap .wallet-label{font-family:ui-monospace,monospace;font-size:12.5px;letter-spacing:.2px}
.topnav .profile-wrap .wallet-src{
font-size:9.5px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;
padding:2px 6px;border-radius:4px;background:rgba(214,255,61,.15);color:var(--acid);
margin-left:2px
}
.topnav .profile-wrap .wallet-caret{opacity:.6;font-size:11px;margin-left:2px}
.topnav .profile-menu{
position:absolute;right:0;top:calc(100% + 8px);
min-width:280px;z-index:30;
background:rgba(18,24,34,.98);backdrop-filter:blur(12px);
border:1px solid rgba(255,255,255,.12);border-radius:14px;
padding:8px;display:flex;flex-direction:column;gap:2px;
box-shadow:0 12px 40px rgba(0,0,0,.55),0 0 0 1px rgba(0,0,0,.4)
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
}
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
.topnav .profile-menu[hidden]{display:none}
.topnav .profile-menu > a{
display:grid;grid-template-columns:24px 1fr;gap:12px;align-items:center;
padding:9px 11px;border-radius:9px;
color:#e7eaf1;text-decoration:none;transition:background .08s
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
}
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
.topnav .profile-menu > a:hover{background:rgba(214,255,61,.10)}
.topnav .profile-menu > a:hover .mi-ic{filter:brightness(1.2)}
.topnav .profile-menu .mi-ic{font-size:17px;line-height:1;text-align:center}
.topnav .profile-menu .mi-body{display:flex;flex-direction:column;gap:1px;font-size:13.5px;font-weight:600;color:#e7eaf1}
.topnav .profile-menu .mi-hint{font-weight:400;font-size:11.5px;color:#8b98a9;letter-spacing:.1px}
.topnav .profile-menu hr{border:0;border-top:1px solid rgba(255,255,255,.08);margin:4px 2px}
.topnav .profile-menu .profile-header{
padding:8px 11px 12px;display:flex;flex-direction:column;gap:4px;
border-bottom:1px solid rgba(255,255,255,.08);margin-bottom:4px
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
}
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
.topnav .profile-menu .profile-hint{
color:#8b98a9;font-size:11px;text-transform:uppercase;letter-spacing:.4px;font-weight:600
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
}
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
.topnav .profile-menu .profile-sub{color:#5e6678;font-size:12px}
.topnav .profile-menu code{
font-family:ui-monospace,monospace;font-size:11.5px;
color:#e7eaf1;word-break:break-all;background:transparent;padding:0;border:0
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
}
`;
document.head.appendChild(s);
}
// ---------- helpers ----------
function shortAddr(a) {
if (!a) return "wallet";
const i = a.indexOf(":");
const body = i > 0 ? a.slice(i + 1) : a;
return body.slice(0, 6) + "…" + body.slice(-4);
}
function escapeAttr(s) {
feat(sirius-x): footer everywhere, redesigned wallet button, dropdown auto-acts Three UX fixes: 1. Beautiful footer on every page. Extracted the 4-column landing footer into js/site-footer.js — reads the nav brand link to derive per-page base ('./' at root, '../' in subdirs) so links resolve from any depth without duplicating the HTML across 8 pages. Every page now ships an empty <footer id="site-footer"></footer> and includes the injector; inline footer + its CSS block removed from landing too so the source stays in one place. 2. Wallet button redesign. Pill now shows a state dot (dim when not signed in, green with subtle glow when signed in), a monospace short address label when signed in ('qra6rs…7yl2') OR 'Wallet' when not, a WC/seed badge on signed-in state, and a subtle caret. Full border and hover states, proper aria-expanded/aria-label wiring. Dropdown menu itself upgraded: grid layout per item (icon column + title + hint), heavier backdrop blur, larger min-width, clearer typography. 3. Dropdown options actually do something. Removed the redundant 'Open sign-in page →' item — the other three all land on portal too, so listing 'open the page' as a fourth option was noise. On portal arrival, the ?mode= handler now AUTO-TRIGGERS the primary action for each mode: new -> click Generate a phrase (12 words appear immediately) import -> focus the seed textarea (cursor ready to paste) wc -> click Connect wallet (WC session starts, URI shown) No extra clicks between dropdown choice and the flow it names. Cache-buster on the profile-menu.js include bumped to ?v=20260907wallet so cached copies pick up the new design; footer injector at ?v=20260907rel.
2026-09-07 22:00:21 +02:00
return String(s).replace(/[&<>"']/g, (c) => ({"&":"&amp;","<":"&lt;",">":"&gt;","\"":"&quot;","'":"&#39;"}[c]));
sirius.x: fix electrum listunspent + profile dropdown across all pages registrar.js: BNS.connect() now filters silentmode.st/electrum and coinspectrum.duckdns.org:50011 out of the default electrum list. Those endpoints are our own bns-indexer.js — beacon-only, serves get_history + transaction.get but NOT listunspent for arbitrary scripthashes. Every wallet op (getBalance, getUtxos, edit signing) needs listunspent, so picking a beacon indexer first (which we did for best reachability) broke every wallet unlock with "-32601 unsupported method: blockchain. scripthash.listunspent". New `beaconOk: true` opts back in for pure- resolution paths. Rebuilt the browser bundle (site/js/bns-register.js) so the fix reaches portal + admin + register.html + anything else that imports BNS.connect. site-sirius-x/js/profile-menu.js: a small shared script that transforms the "🔑 Sign in" nav pill into a dropdown menu on every sirius.x page. Signed-out shows New wallet / Add wallet / WizardConnect + a link to the sign-in page. Signed-in (reads localStorage 'siriusProfile') shows the short address, My names, Admin, Sign out. Included via one <script defer> tag on each of the 6 pages (landing / portal / admin / docs / theseus / brand); dropdown CSS is inlined by the script itself so consumers don't need a matching stylesheet. Portal.html writing to localStorage.'siriusProfile' after sign-in is a follow-up so the dropdown reflects state across pages — until then the menu always shows the onboarding options.
2026-09-06 18:53:17 +02:00
}
})();