Tool tiers for spin links and pages (Marty): Free 3, Starter (any own package) 10, Builder (2 qualifying buyers) 50, Leader (5) unlimited with a 500 fair-use ceiling; existing items above a cap are kept, only new ones wait; Links/Pages headers show N of M (tier); chatbot facts + KNOWLEDGE_DATE

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-21 06:58:16 -05:00
parent 33f3b9d337
commit a0daf7925a
6 changed files with 37 additions and 7 deletions
+2 -1
View File
@@ -75,7 +75,8 @@
try { const lh = await api('/api/my/link-hosts'); LH = (lh && lh.hosts) || []; } catch (e) { LH = []; } // link domains by channel (domains.js, 2026-10-10)
try { SRC = (await CR.get('/api/my/sources')).sources || []; } catch (e) { SRC = []; }
const tot7 = ROT.reduce((n, x) => n + clicks7(x), 0);
if (!/^#b/.test(location.hash)) CR.sub(ROT.length + ' link' + (ROT.length === 1 ? '' : 's') + ' · ' + fmt(tot7) + ' clicks in 7 days');
const TT = r.tier; const capTxt = TT ? (TT.unlimited ? ' links (' + TT.label + ', unlimited)' : ' of ' + TT.max + ' links (' + TT.label + ')') : (' link' + (ROT.length === 1 ? '' : 's'));
if (!/^#b/.test(location.hash)) CR.sub(ROT.length + capTxt + ' · ' + fmt(tot7) + ' clicks in 7 days');
renderList();
if (/^#b/.test(location.hash)) { renderList(); return; } // the Banner Spin view owns the page (banner-spin.js)
const want = SEL != null ? SEL : (Number(location.hash.slice(1)) || null);
+2 -1
View File
@@ -45,7 +45,8 @@
let r; try { r = await CR.get('/api/my/pages'); } catch (e) { CR.sub('could not load'); return; }
PAGES = r.pages || []; HOSTS = r.hosts || []; BASE = r.pageBase || ''; if (r.styles) STYLES = r.styles; PROVIDERS = r.providers || []; IMAGES = r.images || []; if (r.imageMax) IMG_MAX = r.imageMax; if (r.imageBytes) IMG_BYTES = r.imageBytes;
const pubd = PAGES.filter(p => p.status === 'published').length;
CR.sub(PAGES.length + ' page' + (PAGES.length === 1 ? '' : 's') + ' · ' + pubd + ' live');
const TT = r.tier; const capTxt = TT ? (TT.unlimited ? ' pages (' + TT.label + ', unlimited)' : ' of ' + TT.max + ' pages (' + TT.label + ')') : (' page' + (PAGES.length === 1 ? '' : 's'));
CR.sub(PAGES.length + capTxt + ' · ' + pubd + ' live');
const views = PAGES.reduce((n, p) => n + p.views, 0), leads = PAGES.reduce((n, p) => n + p.leads, 0), clicks = PAGES.reduce((n, p) => n + p.clicks, 0);
$('tiles').innerHTML = [['Pages', fmt(PAGES.length)], ['Live', fmt(pubd)], ['Views', fmt(views)], ['Clicks through', fmt(clicks)], ['Leads on your list', fmt(leads)]].map(([k, v], i) => '<div class="tile' + (i === 4 ? ' hi' : '') + '"><span class="k">' + k + '</span><span class="v">' + v + '</span></div>').join('');
$('gal').innerHTML = PAGES.length ? PAGES.map(p => '<div class="card' + (p.id === SEL ? ' on' : '') + '" data-id="' + p.id + '" role="button" tabindex="0"><div class="thumb"><i class="t"></i><i style="width:55%"></i><i style="width:65%"></i><i class="b"></i></div><div class="cap"><b>' + esc(p.title) + '</b><span class="mono muted" style="font-size:11px">' + p.type + ' · ' + (p.status === 'published' ? '<span class="ok">live</span>' : 'draft') + ' · ' + fmt(p.views) + ' views' + (p.leads ? ' · ' + fmt(p.leads) + ' leads' : '') + '</span></div></div>').join('')