Downline Banners (Marty 2026-11-13: keep the name): renamed everywhere members see it, new stacked-banner logo + favicon; network sign-in (arrive signed in from InstantAdPay/LinkSpin as your wallet); share links, sponsor and directs use network usernames (?ref=username resolves through InstantAdPay)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,8 +18,8 @@ window.BL = (function () {
|
||||
const c = await getConfig().catch(() => ({}));
|
||||
const n = document.createElement('nav');
|
||||
const links = [['/', 'Home'], ['/board', 'Board'], ['/how', 'How it works'], ['/join', 'Get a spot'], ['/my', 'My Spots']];
|
||||
n.innerHTML = '<div class="wrap"><div class="logo-wrap"><a class="logo" href="/">Banner <b>Line</b></a>'
|
||||
+ '<span class="byline">Part of the <b>Crypto Team Build</b> Network</span></div><div class="links">'
|
||||
n.innerHTML = '<div class="wrap"><a class="brand" href="/"><img src="/art/mark.svg" alt="" width="38" height="38"><span class="logo-wrap"><span class="logo">Downline <b>Banners</b></span>'
|
||||
+ '<span class="byline">Part of the <b>Crypto Team Build</b> Network</span></span></a><div class="links">'
|
||||
+ links.map(l => '<a href="' + l[0] + '"' + (l[0] === active ? ' class="active"' : '') + '>' + l[1] + '</a>').join('') + '</div></div>';
|
||||
document.body.prepend(n);
|
||||
if (c && c.chainId && c.chainId !== 137) {
|
||||
|
||||
@@ -45,3 +45,6 @@ nav .links a.active{color:var(--mint-ink);background:var(--mint)}
|
||||
.logo b{background:linear-gradient(92deg,var(--mint),var(--cyan));-webkit-background-clip:text;background-clip:text;color:transparent}
|
||||
.btn{box-shadow:0 6px 28px -6px rgba(198,244,50,.45)}
|
||||
.steps li.on{background:var(--mint-soft)}
|
||||
.brand{display:flex;align-items:center;gap:11px;color:var(--ink);text-decoration:none!important;min-width:0}
|
||||
.brand img{flex:none;filter:drop-shadow(0 4px 14px rgba(155,123,255,.35))}
|
||||
.brand .logo{letter-spacing:-.02em}
|
||||
|
||||
+4
-2
@@ -7,6 +7,8 @@
|
||||
const c = await BL.getConfig();
|
||||
const me = await BL.getJSON('/api/me');
|
||||
if (!me.signedIn) {
|
||||
// network sign-in (2026-11-13): signed in on InstantAdPay already? One quick hop there and back signs you in here too
|
||||
try { const ss = await BL.getJSON('/api/sso/status'); if (ss && ss.check) { location.replace('/sso/start?mode=check&to=' + encodeURIComponent('/my' + location.hash)); return; } } catch (e) {}
|
||||
$('signin').hidden = false;
|
||||
$('signBtn').onclick = async () => {
|
||||
try { BL.status('Check your wallet for the sign-in message.'); await BLWallet.signIn(); location.reload(); }
|
||||
@@ -18,7 +20,7 @@
|
||||
async function load() {
|
||||
const d = await BL.getJSON('/api/my');
|
||||
if (d.error) return BL.status(d.error, 'err');
|
||||
$('dash').hidden = false; $('me').textContent = d.address;
|
||||
$('dash').hidden = false; $('me').textContent = d.username ? '@' + d.username + ' (' + BL.short(d.address) + ')' : d.address;
|
||||
const delivered = d.spots.reduce((t, s) => t + s.views, 0);
|
||||
$('stats').innerHTML = [['Spots owned', d.spots.length], ['Views delivered', delivered + ' of ' + d.spots.filter(s => s.kind !== 3).length * c.viewsOwed],
|
||||
['POL paid in', BL.fmtPol(d.paidInWei)], ['POL paid out to you', BL.fmtPol(d.paidOutWei)]]
|
||||
@@ -30,7 +32,7 @@
|
||||
for (const s of d.spots) box.appendChild(editor('spot', s));
|
||||
$('defaults').innerHTML = ''; $('defaults').appendChild(editor('default', { img: d.defaults.img || '', link: d.defaults.link || '', showing: { img: d.defaults.img || '/art/house-line.svg' } }));
|
||||
$('payouts').innerHTML = d.payouts.length ? '<table class="tbl"><tr><th>Spot sold</th><th>Why</th><th>POL</th><th>Tx</th></tr>' + d.payouts.map(p => '<tr><td>#' + p.spotId + '</td><td>' + esc(ROLE[p.role] || p.role) + '</td><td>' + BL.fmtPol(p.amount, 6) + '</td><td class="mono small">' + txLink(p.tx) + '</td></tr>').join('') + '</table>' : '<p class="muted">No payments yet. You are paid when spots sell after yours, or when someone you referred buys.</p>';
|
||||
$('directs').innerHTML = d.directs.length ? '<table class="tbl"><tr><th>Member</th><th>Joined</th><th>Spots</th><th>Paid spots</th><th>POL paid in</th></tr>' + d.directs.map(m => '<tr><td class="mono small">' + esc(BL.short(m.address)) + '</td><td>' + new Date(m.joinedAt).toLocaleDateString() + '</td><td>' + m.spots + '</td><td>' + m.paidSpots + '</td><td>' + BL.fmtPol(m.paidInWei) + '</td></tr>').join('') + '</table>' : '<p class="muted">Nobody has joined through your link yet.</p>';
|
||||
$('directs').innerHTML = d.directs.length ? '<table class="tbl"><tr><th>Member</th><th>Joined</th><th>Spots</th><th>Paid spots</th><th>POL paid in</th></tr>' + d.directs.map(m => '<tr><td class="mono small">' + esc(m.username ? '@' + m.username : BL.short(m.address)) + '</td><td>' + new Date(m.joinedAt).toLocaleDateString() + '</td><td>' + m.spots + '</td><td>' + m.paidSpots + '</td><td>' + BL.fmtPol(m.paidInWei) + '</td></tr>').join('') + '</table>' : '<p class="muted">Nobody has joined through your link yet.</p>';
|
||||
}
|
||||
const txLink = h => c.explorer ? '<a target="_blank" rel="noopener" href="' + esc(c.explorer + '/tx/' + h) + '">' + esc(h.slice(0, 10)) + '...</a>' : esc(h.slice(0, 10)) + '...';
|
||||
function editor(kind, s) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Banner Line wallet plumbing: InstantAdPay's wallet.js (same AppKit build, chain guard, fee fix, dead-session
|
||||
// Downline Banners wallet plumbing: InstantAdPay's wallet.js (same AppKit build, chain guard, fee fix, dead-session
|
||||
// recovery), with buy(sponsor) / buyFor(owner, sponsor) in place of the IAP product buy. Selectors come from
|
||||
// /api/config (server abi.js), so the ABI lives in one module.
|
||||
// Wallet plumbing via Reown AppKit — the universal connector every wallet is
|
||||
@@ -49,7 +49,7 @@ window.BLWallet = (function () {
|
||||
const wagmiAdapter = new WagmiAdapter({ networks: allNets, projectId });
|
||||
modal = createAppKit({
|
||||
adapters: [wagmiAdapter], networks: allNets, projectId, defaultNetwork: net,
|
||||
metadata: { name: 'Banner Line', description: 'Spots on the board, split on-chain when spots sell.',
|
||||
metadata: { name: 'Downline Banners', description: 'Spots on the board, split on-chain when spots sell.',
|
||||
url: location.origin, icons: [location.origin + '/logo-icon.png'] },
|
||||
features: { analytics: false, email: false, socials: [] },
|
||||
// Picker order: wallets without Trust's balance-proportion block go first.
|
||||
|
||||
Reference in New Issue
Block a user