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:
martbost
2026-10-08 15:37:00 -05:00
parent 4ac95bd0c0
commit 8ec82bd282
29 changed files with 76 additions and 74 deletions
+15 -11
View File
@@ -615,7 +615,7 @@ async function notifyNewReferral(ref, newAcct) {
+ 'They count toward your qualification once they make a $20+ purchase.\n\n';
if (!owner.address) body += 'Make sure payouts are switched on (one free wallet step) so you never miss a commission — '
+ 'the contract locks each buyer to their sponsor at their first purchase.\n\n';
body += 'See your team: ' + SITE_URL + '/my\n\nLinkSpin';
body += 'See your team: ' + SITE_URL + '/team\n\nLinkSpin';
mailer.send(owner.email, 'You have a new referral on LinkSpin', body)
.catch(e => console.error('referral notify failed', e.message));
} catch (e) {}
@@ -647,7 +647,7 @@ async function sendWelcome(email, ref) {
+ '1. Pick your username and fill out your profile.\n'
+ '2. Grab your invite link and start sharing to build your line.\n'
+ '3. Explore the ad packages when you are ready. Every payout settles on-chain, straight to your wallet.\n\n'
+ 'Sign in anytime: ' + SITE_URL + '/my\n\nLinkSpin').catch(() => {});
+ 'Sign in anytime: ' + SITE_URL + '/links\n\nLinkSpin').catch(() => {});
} catch (e) {}
}
// on-chain event emails: a payout received, or a payout that passed you by
@@ -704,7 +704,7 @@ async function emailOnEvent(ev) {
: ' (Purchases under $20 do not count toward qualification.)';
mailer.send(sp.email, bn + ' just bought a ' + usd + ' ad package',
'Your referral ' + bn + ' (member #' + ev.buyerId + ') just purchased a package (' + usd + ' — ' + ev.creditAmount + ' credits).' + qual + '\n\n' +
'See your team and the live ledger: ' + SITE_URL + '/my\n\nLinkSpin').catch(() => {});
'See your team and the live ledger: ' + SITE_URL + '/team\n\nLinkSpin').catch(() => {});
}
}
} catch (e) {}
@@ -715,9 +715,9 @@ async function emailOnEvent(ev) {
const pol = weiToPol(ev.amountWei);
await tell(ev.recipientId, 'You just got paid ' + pol + ' POL on LinkSpin',
buyer + ' just bought an ad package on your level ' + ev.tier + (pur ? ' ($' + (pur.priceCents / 100).toFixed(2).replace(/\.00$/, '') + ')' : '') + '. Your ' + pct + ' percent share, ' + pol + ' POL' + usdShare(pur, pct) + ', landed in your wallet in the same transaction' + (ev.hops ? ', passed up to you because someone between you was not qualified for this level' : '') + '.\n\n' +
'Transaction: ' + txUrlOf(ev.tx) + '\n\nYour dashboard: ' + SITE_URL + '/my');
'Transaction: ' + txUrlOf(ev.tx) + '\n\nYour wallet and payouts: ' + SITE_URL + '/wallet');
}
else if (ev.type === 'AwardPaid') await tell(ev.toId, 'You just got paid ' + weiToPol(ev.amountWei) + ' POL on LinkSpin', weiToPol(ev.amountWei) + ' POL just landed in your wallet.\n\nTransaction: ' + txUrlOf(ev.tx) + '\n\nYour dashboard: ' + SITE_URL + '/my');
else if (ev.type === 'AwardPaid') await tell(ev.toId, 'You just got paid ' + weiToPol(ev.amountWei) + ' POL on LinkSpin', weiToPol(ev.amountWei) + ' POL just landed in your wallet.\n\nTransaction: ' + txUrlOf(ev.tx) + '\n\nYour wallet and payouts: ' + SITE_URL + '/wallet');
else if (ev.type === 'PassedUp' && ev.reason === 'send-failed') {
// the member WAS qualified but their wallet rejected the POL (usually a smart-contract
// wallet that needs more than the capped gas): tell them and the admin, loudly
@@ -737,7 +737,7 @@ async function emailOnEvent(ev) {
buyer + ' just bought an ad package on your level ' + ev.tier + '. Your share was ' + what + ', and it passed you by because level ' + ev.tier + ' is not open on your account yet. The contract paid it to the next qualified person above you.\n\n' +
'Level ' + ev.tier + ' opens at ' + need + ' qualifying buyers (people you referred who bought a $20 or larger package). You have ' + bc + (short ? ', so you are ' + short + ' buyer' + (short === 1 ? '' : 's') + ' away.' : '.') + '\n\n' +
'Two ways to close the gap: bring ' + (short || 1) + ' more buyer' + (short === 1 ? '' : 's') + ' from your My line page, or use Qualified Start under Buy packages to be your own buyer today. Every package on level ' + ev.tier + ' pays you ' + pct + ' percent once it is open, and the next one is coming whether you are ready or not.\n\n' +
'Transaction: ' + txUrlOf(ev.tx) + '\n\nYour dashboard: ' + SITE_URL + '/my');
'Transaction: ' + txUrlOf(ev.tx) + '\n\nYour wallet and payouts: ' + SITE_URL + '/wallet');
}
}
// payment-proof Telegram feed (same pattern as the RM Circle proof channel): one compact
@@ -782,7 +782,7 @@ async function tankNotifyTick() {
const named = fresh.filter(w => w.username).map(w => '@' + w.username);
const who = named.length ? ': ' + named.slice(0, 8).join(', ') + (named.length > 8 ? ' and ' + (named.length - 8) + ' more' : '') : '';
const text = '\u{1FAA3} <b>LinkSpin</b> \u00b7 ' + fresh.length + ' new member' + (fresh.length === 1 ? '' : 's') + ' waiting for a sponsor in the holding tank' + who
+ '\nAdopt from My line \u203a Holding tank: <a href="' + SITE_URL + '/my#line">' + SITE_HOST + '/my</a>';
+ '\nAdopt from Team \u203a Waiting on a wallet: <a href="' + SITE_URL + '/team">' + SITE_HOST + '/team</a>';
await telegramSend(sc.telegramEchoChatId, text, sc.telegramEchoTopicId);
}
// one sendMessage call; never throws, never logs the token
@@ -1002,7 +1002,7 @@ const server = http.createServer(async (req, res) => {
const r = await drip.unsubscribe(u.searchParams.get('e'), u.searchParams.get('t'));
const msg = r.error ? r.error : 'Done. You will not get any more follow-up emails from LinkSpin. Your account is unchanged.';
res.writeHead(r.error ? 400 : 200, baseHeaders({ 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-store' }));
return res.end('<!doctype html><html><head><meta charset="utf-8"><title>LinkSpin</title><link rel="stylesheet" href="/assets/site.css?v=20260909a"></head><body><div class="wrap" style="max-width:560px;padding:80px 22px"><a href="/"><img src="/logo.png" alt="LinkSpin" style="height:34px"></a><h1 style="font-size:30px;margin:26px 0 12px">' + (r.error ? 'Hmm.' : 'Unsubscribed.') + '</h1><p>' + msg + '</p><p><a class="btn small sec" href="/my">Member area</a></p></div></body></html>');
return res.end('<!doctype html><html><head><meta charset="utf-8"><title>LinkSpin</title><link rel="stylesheet" href="/assets/site.css?v=20260909a"></head><body><div class="wrap" style="max-width:560px;padding:80px 22px"><a href="/"><img src="/logo.png" alt="LinkSpin" style="height:34px"></a><h1 style="font-size:30px;margin:26px 0 12px">' + (r.error ? 'Hmm.' : 'Unsubscribed.') + '</h1><p>' + msg + '</p><p><a class="btn small sec" href="/links">Member area</a></p></div></body></html>');
}
// -- public API
@@ -2258,7 +2258,7 @@ const server = http.createServer(async (req, res) => {
const from = who && who.username ? '@' + who.username : 'your sponsor';
for (const to of recipients) {
mailer.send(to, 'Message from ' + from + ': ' + subject,
plain + '\n\n— sent via your LinkSpin upline. Read it in your dashboard: ' + SITE_URL + '/my#line')
plain + '\n\n— sent via your LinkSpin upline. Read it in your dashboard: ' + SITE_URL + '/tools#line')
.catch(() => {});
}
}
@@ -2372,7 +2372,7 @@ const server = http.createServer(async (req, res) => {
const who = await accounts.byEmail(me);
const from = who && who.username ? '@' + who.username : 'someone in your LinkSpin line';
mailer.send(to, 'New message from ' + from,
text.slice(0, 400) + '\n\n— reply in your dashboard: ' + SITE_URL + '/my').catch(() => {});
text.slice(0, 400) + '\n\n— reply in your dashboard: ' + SITE_URL + '/tools').catch(() => {});
}
}
} catch (e) {}
@@ -3040,7 +3040,11 @@ const server = http.createServer(async (req, res) => {
if (p === '/terms') return sendFile(res, path.join(PUBLIC_DIR, 'terms.html'));
if (p === '/privacy') return sendFile(res, path.join(PUBLIC_DIR, 'privacy.html'));
if (p === '/disclaimer') return sendFile(res, path.join(PUBLIC_DIR, 'disclaimer.html'));
if (p === '/my') return sendFile(res, path.join(PUBLIC_DIR, 'my.html'));
if (p === '/tools') return sendFile(res, path.join(PUBLIC_DIR, 'my.html')); // classic panes the control room lacks (More)
if (p === '/my') { // retired 2026-10-08: old links/emails/bookmarks land on the right control-room screen by #pane
res.writeHead(200, baseHeaders({ 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-store' }));
return res.end('<!doctype html><html><head><meta charset="utf-8"><title>LinkSpin</title><meta name="robots" content="noindex"></head><body><script>var M={"": "/links", "overview": "/tools", "line": "/team", "pipeline": "/tools#pipeline", "buy": "/credits", "rotator": "/links", "campaigns": "/ads", "earn": "/ads", "earnings": "/credits", "promo": "/tools#promo", "training": "/tools#training", "wallet": "/wallet", "profile": "/tools#profile"};var h=(location.hash||\'\').slice(1);location.replace(M[h]||(\'/tools#\'+h))</script><noscript><a href="/links">Open the control room</a></noscript></body></html>');
}
if (p === '/links') return sendFile(res, path.join(PUBLIC_DIR, 'links.html')); // Control Room: the links workspace, first screen of the new front end (2026-09-29)
if (p === '/reports') return sendFile(res, path.join(PUBLIC_DIR, 'reports.html'));
if (p === '/pages') return sendFile(res, path.join(PUBLIC_DIR, 'pages.html'));