Retire the classic /my dashboard: control-room screens take over (links/ads/credits/wallet/team), leftover panes (welcome tour, line broadcast, pipeline, promo tools, training, profile) live at /tools as 'More' in the rail; /my redirects by #pane; every link and email retargeted
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
+ (c.status === 'active' ? '<button class="btn sm" type="button" data-pause="' + c.id + '">Pause</button>' : c.status === 'paused' ? '<button class="btn sm" type="button" data-resume="' + c.id + '">Resume</button>' : '')
|
||||
+ (['active', 'paused', 'out'].includes(c.status) ? '<button class="btn sm" type="button" data-top="' + c.id + '">Top up</button>' : '') + '</span></div>').join('')
|
||||
: '<div class="rw"><span class="muted">No ads yet. Launch one: a banner, a text ad or the login spot.</span></div>';
|
||||
if (D.gauntletPending) $('earnNote').insertAdjacentHTML('afterend', '<div class="muted" style="margin-top:8px">Your welcome credits unlock after the short welcome tour on <a href="/my">the classic dashboard</a>.</div>');
|
||||
if (D.gauntletPending) $('earnNote').insertAdjacentHTML('afterend', '<div class="muted" style="margin-top:8px">Your welcome credits unlock after the short welcome tour on <a href="/tools">the classic dashboard</a>.</div>');
|
||||
$('foot').textContent = 'views = timed views in the ad viewer plus member zones; network = the partner ad network · a paused ad keeps its credits · unspent credits return when an ad ends';
|
||||
$('rows').querySelectorAll('[data-pause]').forEach(b => b.addEventListener('click', () => act('/api/my/campaigns/' + b.dataset.pause + '/pause')));
|
||||
$('rows').querySelectorAll('[data-resume]').forEach(b => b.addEventListener('click', () => act('/api/my/campaigns/' + b.dataset.resume + '/resume')));
|
||||
|
||||
@@ -34,7 +34,7 @@ window.IAP = (function () {
|
||||
+ '<a href="/ledger" data-p="ledger">Live ledger</a>'
|
||||
+ '<a href="/leaderboard" data-p="leaderboard">Leaderboard</a>'
|
||||
+ '<a href="/contract" data-p="contract">The contract</a>'
|
||||
+ '<a href="/my" data-p="my">Members</a>'
|
||||
+ '<a href="/links" data-p="my">Members</a>'
|
||||
+ '</span><span id="navWallet" class="muted">…</span></div>';
|
||||
document.body.prepend(nav);
|
||||
if (c.rehearsal) {
|
||||
@@ -71,7 +71,7 @@ window.IAP = (function () {
|
||||
: (me.address ? '<span class="mono">' + me.address.slice(0, 6) + '…' + me.address.slice(-4) + '</span>' : 'signed in'));
|
||||
el.innerHTML = (me.memberId ? '<span class="badge">member #' + me.memberId + '</span> ' : '') + who;
|
||||
} else {
|
||||
el.innerHTML = '<a href="/my">Sign in</a>';
|
||||
el.innerHTML = '<a href="/links">Sign in</a>';
|
||||
}
|
||||
return me;
|
||||
} catch (e) { return null; }
|
||||
@@ -188,30 +188,30 @@ window.IAP = (function () {
|
||||
const m = me || {}, man = manualSet();
|
||||
const bc = Number(m.buyerCount || 0), refs = (m.referrals || []).length;
|
||||
return [
|
||||
{ key: 'username', title: 'Pick your username', done: !!m.username, href: '/my#profile', cta: 'Profile',
|
||||
{ key: 'username', title: 'Pick your username', done: !!m.username, href: '/tools#profile', cta: 'Profile',
|
||||
how: 'Profile tab. It becomes your invite link and your public page, and it is permanent.',
|
||||
why: 'Every link, banner and video you hand out this week carries it. Change it later and the links you already sent die.' },
|
||||
{ key: 'wallet', title: 'Link your wallet', done: !!m.address, href: '/my#wallet', cta: 'Wallet',
|
||||
{ key: 'wallet', title: 'Link your wallet', done: !!m.address, href: '/wallet', cta: 'Wallet',
|
||||
how: 'Wallet tab, Connect, sign the free message. MetaMask recommended. Never held crypto? The wallet guide in Training walks through buying POL with a card.',
|
||||
why: 'Payouts go to this address. No wallet, nowhere to pay you.' },
|
||||
{ key: 'payouts', title: 'Switch on payouts', done: !!m.memberId, href: '/my#wallet', cta: 'Wallet',
|
||||
{ key: 'payouts', title: 'Switch on payouts', done: !!m.memberId, href: '/wallet', cta: 'Wallet',
|
||||
how: 'Wallet tab, one small transaction. It registers your address with the contract.',
|
||||
why: 'The contract binds each buyer to their sponsor at their first purchase. If payouts are off when your first person buys, that commission is not yours.' },
|
||||
{ key: 'level2', title: 'Qualify: open level 2', done: bc >= 2, href: '/my#buy', cta: 'Buy packages',
|
||||
{ key: 'level2', title: 'Qualify: open level 2', done: bc >= 2, href: '/credits', cta: 'Buy packages',
|
||||
how: 'Two of your people buy a $20 or more package. Or use Qualified Start: add two positions from extra wallets in your own MetaMask and buy a $20 package from each (about $23 of POL in each wallet).',
|
||||
why: 'Until you have two qualifying buyers, every level 2 payment from your team climbs past you.',
|
||||
note: 'Qualifying buyers so far: <b>' + bc + '</b> of 2.' },
|
||||
{ key: 'level3', title: 'The leader play: open all three levels', done: bc >= 5, href: '/my#buy', cta: 'Qualified Start',
|
||||
{ key: 'level3', title: 'The leader play: open all three levels', done: bc >= 5, href: '/credits', cta: 'Qualified Start',
|
||||
how: 'Five qualifying buyers, real or Qualified Start, up to five linked positions. Once qualified, buy from your main wallet so your sponsor is paid in full.',
|
||||
why: 'A leader whose team goes three deep this week collects level 3 from day one instead of watching those 10% payments pass upward. Optional for members, the play for leaders.',
|
||||
note: 'Qualifying buyers so far: <b>' + bc + '</b> of 5.' },
|
||||
{ key: 'banner', title: 'Upload your line banner', done: !!m.lineBannerUrl, href: '/my#profile', cta: 'Profile',
|
||||
{ key: 'banner', title: 'Upload your line banner', done: !!m.lineBannerUrl, href: '/tools#profile', cta: 'Profile',
|
||||
how: 'Profile tab, line banner. It shows on the welcome tour to everyone in your next three levels.',
|
||||
why: 'Your first advertising to your own team, free, and it is live the moment they join.' },
|
||||
{ key: 'links', title: 'Copy your links and pick a play', done: man.has('links'), manual: true,
|
||||
how: 'Promo tools, Your links: the invite link and the five angle links, plus the matching hook videos. Then read the plays page and choose one.',
|
||||
why: 'On launch day you send links, not explanations. Having them ready is the whole difference between a launch and a scramble.' },
|
||||
{ key: 'two', title: 'Place your first two', done: refs >= 2, href: '/my#line', cta: 'My line',
|
||||
{ key: 'two', title: 'Place your first two', done: refs >= 2, href: '/tools#line', cta: 'My line',
|
||||
how: 'Two people you have actually talked to, joined through your link, walked through items 1 to 3 on their own accounts.',
|
||||
why: 'Your first two are the shape of your whole line. Choose them, do not wait for them.',
|
||||
note: 'Joined through you so far: <b>' + refs + '</b>.' }
|
||||
|
||||
@@ -15,10 +15,11 @@ window.CR = (function () {
|
||||
['reports', 'Reports', '/reports', '<path d="M4 19V9M10 19V5M16 19v-8M22 19H2"/>'],
|
||||
['team', 'Team', '/team', '<circle cx="9" cy="8" r="3"/><circle cx="17" cy="9" r="2.5"/><path d="M3 19c0-3 3-5 6-5s6 2 6 5M15 15c3 0 6 1.5 6 4"/>'],
|
||||
['wallet', 'Wallet', '/wallet', '<rect x="3" y="6" width="18" height="12" rx="2"/><path d="M16 12h3"/>'],
|
||||
['tools', 'More', '/tools', '<circle cx="5" cy="12" r="1.6"/><circle cx="12" cy="12" r="1.6"/><circle cx="19" cy="12" r="1.6"/>'],
|
||||
];
|
||||
// screens not built yet fall back to the classic dashboard pane so nothing is a dead end
|
||||
const FALLBACK = { pages: '/my#promo', zones: '/my#campaigns', team: '/my#line', wallet: '/my#wallet' };
|
||||
const BUILT = new Set(['links', 'pages', 'zones', 'ads', 'credits', 'reports', 'team', 'wallet']);
|
||||
const FALLBACK = {}; // the classic /my dashboard is retired (2026-10-08); its leftover panes live at /tools
|
||||
const BUILT = new Set(['links', 'pages', 'zones', 'ads', 'credits', 'reports', 'team', 'wallet', 'tools']);
|
||||
let ME = null, toastT;
|
||||
function toast(msg, bad) { let t = $('crToast'); if (!t) { t = document.createElement('div'); t.id = 'crToast'; t.className = 'toast'; t.setAttribute('role', 'status'); document.body.appendChild(t); } t.textContent = msg; t.classList.toggle('bad', !!bad); t.classList.add('on'); clearTimeout(toastT); toastT = setTimeout(() => t.classList.remove('on'), 2000); }
|
||||
async function api(path, body) { const r = await (await fetch(path, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body || {}) })).json(); if (r.error) throw new Error(r.error); return r; }
|
||||
@@ -70,7 +71,7 @@ window.CR = (function () {
|
||||
host.innerHTML = '<div class="modal-back"><div class="modal" role="dialog" aria-modal="true"><h2>Sign in</h2><div class="ink2">Email first. We send a six-digit code; no password to remember. New here? The same box creates your account.</div>'
|
||||
+ '<label class="lbl">Email<input class="field" id="siEmail" type="email" autocomplete="email" placeholder="you@example.com"></label>'
|
||||
+ '<div id="siCodeRow" hidden><label class="lbl">Code from the email<input class="field mono" id="siCode" inputmode="numeric" maxlength="6" placeholder="123456"></label></div>'
|
||||
+ '<div class="muted" id="siMsg"></div><div class="acts"><a class="btn" href="/my">Classic dashboard</a><button class="btn pri" type="button" id="siGo">Send code</button></div></div></div>';
|
||||
+ '<div class="muted" id="siMsg"></div><div class="acts"><a class="btn" href="/tools">More tools</a><button class="btn pri" type="button" id="siGo">Send code</button></div></div></div>';
|
||||
const email = $('siEmail'), code = $('siCode'), go = $('siGo'), msg = $('siMsg'); let stage = 'email';
|
||||
email.focus();
|
||||
const say = (t, bad) => { msg.textContent = t; msg.className = bad ? 'bad' : 'muted'; };
|
||||
|
||||
+3
-1
@@ -636,7 +636,9 @@
|
||||
const TITLES = { overview: 'Overview', line: 'My line', pipeline: 'Pipeline', rotator: 'Rotator', buy: 'Buy packages', campaigns: 'Campaigns',
|
||||
earn: 'Earn credits', earnings: 'Earnings', promo: 'Promo tools', training: 'Training',
|
||||
wallet: 'Wallet & account', profile: 'Profile' };
|
||||
const MOVED = { buy: '/credits', rotator: '/links', campaigns: '/ads', earn: '/ads', earnings: '/credits', wallet: '/wallet' }; // control-room screens (2026-10-08)
|
||||
function setPane(name) {
|
||||
if (MOVED[name]) { location.replace(MOVED[name]); return; }
|
||||
if (!PANES.includes(name)) name = 'overview';
|
||||
for (const p of PANES) {
|
||||
const el = $('pane-' + p);
|
||||
@@ -697,7 +699,7 @@
|
||||
// arrived from an invite page: run the welcome tour and login ad once
|
||||
if (/[?&]welcome=1/.test(location.search) && !render.welcomed) {
|
||||
render.welcomed = true;
|
||||
history.replaceState(null, '', '/my' + (location.hash || ''));
|
||||
history.replaceState(null, '', '/tools' + (location.hash || ''));
|
||||
(async () => {
|
||||
try { if (!(await showGauntlet())) await showLoginAd(); } catch (e) {}
|
||||
await render();
|
||||
|
||||
@@ -90,14 +90,14 @@
|
||||
// the tab is still here a moment later, take them back to the dashboard so
|
||||
// they are never stuck on a tab they can't close.
|
||||
setTimeout(() => {
|
||||
if (!window.closed) { setMsg('Taking you back to your dashboard…'); location.href = '/my#earn'; }
|
||||
if (!window.closed) { setMsg('Taking you back to your dashboard…'); location.href = '/ads'; }
|
||||
}, 400);
|
||||
});
|
||||
// When shown inside the dashboard's in-page overlay there is no tab to close:
|
||||
// hide "Close tab" and turn "Back to dashboard" into a close-the-overlay signal.
|
||||
if (framed) {
|
||||
const cb = $('vClose'); if (cb) cb.style.display = 'none';
|
||||
const back = document.querySelector('#vDone a[href="/my#earn"]');
|
||||
const back = document.querySelector('#vDone a[href="/ads"]');
|
||||
if (back) back.addEventListener('click', e => { e.preventDefault(); try { window.parent.postMessage({ t: 'iap-view-close' }, location.origin); } catch (x) {} });
|
||||
}
|
||||
(async () => {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
const hostEl = IAP.$('wallHost');
|
||||
if (!w || w.error) {
|
||||
title.textContent = 'No wall under that name.';
|
||||
IAP.$('wallJoin').href = '/my';
|
||||
IAP.$('wallJoin').href = '/links';
|
||||
return;
|
||||
}
|
||||
const safeName = String(w.name).replace(/[&<>]/g, '');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// LinkSpin Wallet: paid-to-this-wallet, credits, positions, payout history (engine APIs). Connect/buy stay on /my#wallet for now.
|
||||
// LinkSpin Wallet: paid-to-this-wallet, credits, positions, payout history (engine APIs). Connect/link a wallet and buy live on /credits.
|
||||
(function () {
|
||||
const $ = id => document.getElementById(id); const esc = CR.esc, fmt = CR.fmt;
|
||||
CR.mount({ active: 'wallet', title: 'Wallet', sub: 'loading' });
|
||||
|
||||
Reference in New Issue
Block a user