Members area menu: Overview / My line / Campaigns / Earnings / Wallet
Hash-routed pane tabs replace the single scrolling page. Overview keeps the stat cards, next-move guidance, and levels; My line holds the invite/share kit and roster; Campaigns gains a pre-purchase gate card; Earnings gains a pre-activation explainer; Wallet gathers account, credits, link, activate, logout. Deep links (/my#campaigns) land on the right pane. Browser-verified tab exclusivity, hash sync, deep links, and 390px overflow. Assets v=20260904q. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -58,12 +58,31 @@
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
// ── members-area menu: hash-routed panes ──────────────
|
||||
const PANES = ['overview', 'line', 'campaigns', 'earnings', 'wallet'];
|
||||
function setPane(name) {
|
||||
if (!PANES.includes(name)) name = 'overview';
|
||||
for (const p of PANES) {
|
||||
const el = $('pane-' + p);
|
||||
if (el) el.hidden = p !== name;
|
||||
}
|
||||
document.querySelectorAll('.subnav [data-pane]').forEach(b =>
|
||||
b.classList.toggle('on', b.dataset.pane === name));
|
||||
if (location.hash !== '#' + name) history.replaceState(null, '', '#' + name);
|
||||
}
|
||||
document.querySelectorAll('.subnav [data-pane]').forEach(b =>
|
||||
b.addEventListener('click', () => setPane(b.dataset.pane)));
|
||||
window.addEventListener('hashchange', () => setPane(location.hash.slice(1)));
|
||||
|
||||
async function render() {
|
||||
const me = await IAP.refreshNavWallet();
|
||||
const signedIn = me && me.signedIn;
|
||||
$('authArea').hidden = !!signedIn;
|
||||
$('memberArea').hidden = !signedIn;
|
||||
if (!signedIn) return;
|
||||
setPane(location.hash.slice(1) || 'overview');
|
||||
$('campGate').hidden = !!me.memberId;
|
||||
$('earnGate').hidden = !!me.memberId;
|
||||
loadDashboard();
|
||||
|
||||
const who = [];
|
||||
|
||||
@@ -222,6 +222,13 @@ input[type=range]{padding:0;border:0;background:transparent;accent-color:var(--m
|
||||
input:focus,select:focus{border-color:var(--mint)}
|
||||
:focus-visible{outline:2px solid var(--mint);outline-offset:2px}
|
||||
.hero-note{font-family:var(--mono);font-size:12px;color:var(--muted);margin-top:26px}
|
||||
/* member sub-navigation */
|
||||
.subnav{display:flex;gap:6px;flex-wrap:wrap;background:rgba(16,28,24,.7);border:1px solid var(--line);
|
||||
border-radius:999px;padding:6px 8px;width:fit-content;margin:0 0 22px}
|
||||
.subnav button{background:transparent;border:0;color:var(--muted);font:600 13.5px var(--disp);
|
||||
padding:8px 16px;border-radius:999px;cursor:pointer}
|
||||
.subnav button:hover{color:var(--ink)}
|
||||
.subnav button.on{color:var(--mint-ink);background:var(--mint)}
|
||||
/* member dashboard: qualification progress + roster */
|
||||
.qualbar{position:relative;height:12px;border-radius:999px;background:rgba(4,8,7,.7);border:1px solid var(--line-strong);
|
||||
margin:26px 0 30px;max-width:520px}
|
||||
|
||||
Reference in New Issue
Block a user