Files
linkspin/public/pages.html
T
martbost e545343fe0 Michael Camire fixes + hub shells in the tank (Marty 2026-11-14, LinkSpin Support)
1. Top-up across positions: an ad burns from ONE position, and topUpCampaign only looked at the ad's
   own position (or the main one when the list row had no memberId), so credits bought on a linked
   position could never top up the ad. Ported from InstantAdPay 2026-09-27 (Jim Watts): the ad's real
   member id is read from the campaign row; when it cannot cover, the refusal names where the free
   credits are and offers switchOptions; with the member's yes (switchTo, only a position on the
   account) moveFunding settles what the ad already ran up on the OLD position, moves the ad, then
   tops up. Ads screen asks in-page (own dialog) and retries. Create already had the largest-position guard.
2. Toasts: errors stay until closed (close button, role=alert), other notes 3.5 to 9 s by length.
3. Banner Spin per-banner clicks: his 3 clicks were all unmatched (no view on record for that browser),
   so they landed on the fallback row and every banner said 0. Click matching now also tries the same
   connection (daily-salted IP-only hash) when the browser key finds nothing (mail/exchange app view,
   click opened in the phone browser), view notes last 60 min instead of 15, and the stats split
   'Fallback shown' from 'Clicks not tied to a banner' so the rows add up to the total. History is not
   backfilled: views were never stored per visitor, so old clicks cannot be tied reliably.
4. Holding tank: hub-made waiting accounts with no sponsor are in the tank (waiting, rescue, readyTick
   read listAll with { shells: true }; 'hub-shell' no longer holds anyone back). Locked / sponsored /
   unknown, grace, 2-adoption cap unchanged; readyTick still never switches a shell on;
   accounts.listAll default unchanged (mailings skip shells).

Assets: cr.css, cr-shell.js, ads-screen.js ?v=20261114tu, banner-spin.js ?v=20261114bc.
QA: walk member 0 bugs (36 ok), netconv 57/57, networksso ALL PASSED, tank-hold all passed (new hub
shell part), profile policy 16/16, new topup-positions 8/8, new bannerspin-attrib 7/7, bannerspin e2e
75/75, hubsync 15 checks, tank-cap 15/15, sponsorfollow 30/30.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 11:59:38 -06:00

80 lines
8.9 KiB
HTML

<!doctype html>
<html lang="en" data-theme-base="light">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="robots" content="noindex, nofollow">
<title>Pages · LinkSpin</title>
<!--theme-head--><script>(function(){var A=0,h=document.documentElement,b=h.getAttribute("data-theme-base")||"light",m=window.matchMedia?matchMedia("(prefers-color-scheme: dark)"):{matches:false},v;function g(){try{v=localStorage.getItem("ls.theme")}catch(e){v=null}return v==="light"||v==="dark"||v==="auto"?v:(A?"auto":b)}function ap(){var c=g();h.setAttribute("data-theme",c==="auto"?(m.matches?"dark":"light"):c);h.setAttribute("data-theme-choice",c)}ap();if(m.addEventListener)m.addEventListener("change",ap);else if(m.addListener)m.addListener(ap);window.LSTheme={base:b,get:g,apply:ap,set:function(c,quiet){try{if(c==="light"||c==="dark"||c==="auto")localStorage.setItem("ls.theme",c);else localStorage.removeItem("ls.theme")}catch(e){}ap();if(!quiet)try{dispatchEvent(new CustomEvent("ls-theme",{detail:g()}))}catch(e){}}}})()</script><!--/theme-head-->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Rajdhani:wght@600;700&family=Manrope:wght@400;500;700&family=JetBrains+Mono:wght@500;700&display=swap">
<link rel="stylesheet" href="/assets/cr.css?v=20261114tu">
<style>
.look{display:grid;gap:10px;margin:6px 0 10px}.lk-row{display:flex;gap:10px;align-items:flex-start}.lk-k{flex:none;width:64px;font:700 11px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--muted);padding-top:9px}
.lk-opts{display:flex;gap:6px;flex-wrap:wrap}.lk-opts button{font:600 12px var(--body);padding:7px 10px;border-radius:7px;border:1px solid var(--line);background:transparent;color:var(--fg);cursor:pointer}.lk-opts button.on{border-color:var(--accent);background:var(--accent-soft)}
.heroes{display:flex;gap:6px;flex-wrap:wrap}.heroes button{width:72px;height:48px;border-radius:7px;border:2px solid var(--line);padding:0;overflow:hidden;cursor:pointer;background:#000}.heroes button img{width:100%;height:100%;object-fit:cover;display:block;opacity:.8}.heroes button.on{border-color:var(--accent)}.heroes button.on img{opacity:1}
.pal{display:flex;gap:8px;flex-wrap:wrap}.pal button{width:34px;height:26px;border-radius:7px;border:2px solid transparent;cursor:pointer;padding:0;overflow:hidden;display:grid;grid-template-columns:1fr 1fr 1fr}.pal button i{display:block}.pal button.on{border-color:var(--fg)}
.ws{display:grid;grid-template-columns:minmax(0,1fr) 440px;min-height:calc(100vh - 94px)}
.body{padding:16px 24px;display:grid;gap:14px;align-content:start}
.gal{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;cursor:pointer;display:grid}
.card{box-shadow:var(--sh)} .card.on{border-color:var(--sig);box-shadow:0 0 0 1px var(--sig),var(--sh)}
.thumb{height:96px;background:var(--panel-2);padding:12px;display:grid;gap:6px;align-content:start} .thumb i{display:block;background:var(--line);height:6px;border-radius:2px} .thumb i.t{background:var(--accent-dim);height:10px;width:70%} .thumb i.b{background:linear-gradient(90deg,var(--accent-hi),var(--accent));height:14px;width:40%;margin-top:auto}
.card .cap{padding:10px 12px;display:grid;gap:3px} .card .cap b{font-size:13px}
.side{border-left:1px solid var(--line);padding:16px;display:grid;gap:12px;align-content:start;background:var(--panel-glass)}
.side h2{font-family:var(--display);font-size:18px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;margin:0}
.types{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px} .types button{background:transparent;border:1px solid var(--line);border-radius:var(--r);color:var(--ink);padding:8px 6px;cursor:pointer;display:grid;gap:2px;text-align:left} .types button.on{border-color:var(--accent)} .types small{color:var(--muted);font-size:11px}
.ed{display:grid;gap:10px} .ed textarea{min-height:90px;resize:vertical}
.pal{display:flex;gap:6px} .pal button{width:28px;height:28px;border-radius:50%;border:2px solid transparent;cursor:pointer} .pal button.on{border-color:var(--ink)}
.leads .rw{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) 110px}
.imgrow{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:-4px 0 0}
.imgstrip{display:flex;gap:6px;flex-wrap:wrap;align-items:flex-start;min-height:12px}.imgstrip .im{position:relative;width:64px;height:48px;border:1px solid var(--line);border-radius:7px;overflow:hidden;cursor:pointer;background:var(--panel-2);display:block}.imgstrip .im img{width:100%;height:100%;object-fit:cover;display:block}.imgstrip .im:hover{border-color:var(--accent)}
.imgstrip .x{position:absolute;top:2px;right:2px;width:18px;height:18px;border-radius:50%;border:0;background:rgba(0,0,0,.65);color:#fff;font:700 13px/18px var(--body);padding:0;cursor:pointer}.imgstrip .x:hover{background:var(--bad,#c0392b)}
@media (max-width:900px){.ws{grid-template-columns:1fr}.side{border-left:0;border-top:1px solid var(--line)}.body{padding:12px 16px}.types{grid-template-columns:1fr}}
</style>
</head>
<body>
<div id="page">
<div class="ws">
<div class="body">
<div class="tiles" id="tiles"></div>
<div class="sec">Your pages · click one to edit</div>
<div class="gal" id="gal"></div>
<div class="tbl leads" id="leadsBox" hidden><div class="hd"><span>Lead</span><span>Page</span><span>When</span></div><div id="leadRows"></div><div class="ft" style="display:flex;justify-content:space-between;align-items:center"><span id="leadFoot"></span><a class="btn sm" id="leadCsv" href="/api/my/pages/leads.csv">Download CSV</a></div></div>
</div>
<div class="side" id="side">
<div id="wizard">
<h2>New page</h2>
<label class="lbl">Paste the page you are sending people to<input class="field mono" id="scanUrl" type="url" placeholder="https://"></label>
<button class="btn pri" type="button" id="scanBtn">Scan it</button>
<div id="scanOut" class="panel" hidden></div>
<div class="sec">Page type</div>
<div class="types" id="types"><button type="button" class="on" data-t="bridge"><b>Bridge</b><small>Your story, then the link</small></button><button type="button" data-t="review"><b>Review</b><small>Pros, cons, verdict</small></button><button type="button" data-t="squeeze"><b>Squeeze</b><small>Email first, then the link</small></button></div>
<label class="lbl">Angle, one line<input class="field" id="angle" type="text" maxlength="160" placeholder="I got paid before I finished my coffee"></label>
<div style="display:flex;gap:8px"><button class="btn pri" type="button" id="writeBtn">Write it</button><button class="btn" type="button" id="blankBtn">Start blank</button></div>
<div class="muted">A published page carries tracking and goes straight into any spin. Forms: our own capture (leads stay on your list) or your provider's plain HTML form, checked before it is used.</div>
</div>
<div id="editor" hidden>
<div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap"><h2 id="edTitle">Page</h2><span class="grow"></span><button class="btn sm" type="button" id="edClose">Close</button></div>
<div style="display:flex;gap:8px;flex-wrap:wrap;align-items:center"><span id="edStatus"></span><a class="btn sm" id="edPreview" href="#" target="_blank" rel="noopener">Preview</a><button class="btn sm pri" type="button" id="edPublish">Publish</button><button class="btn sm" type="button" id="edSpin">Put it in a spin</button><button class="btn sm danger" type="button" id="edDelete">Delete</button></div>
<div class="code" id="edUrl" hidden></div>
<div class="ed" id="edFields"></div>
<div class="look" id="look">
<div class="sec">Look</div>
<label class="lbl">Niche preset<select class="field" id="niche"><option value="">None (set it yourself)</option></select></label>
<div class="lk-row" id="heroRow" hidden><span class="lk-k">Hero</span><div class="heroes" id="heroes"></div></div>
<div class="lk-row"><span class="lk-k">Design</span><div class="lk-opts" id="designs"></div></div>
<div class="lk-row"><span class="lk-k">Colours</span><div class="pal" id="pal"></div></div>
<div class="lk-row"><span class="lk-k">Layout</span><div class="lk-opts" id="layouts"></div></div>
<div class="muted" id="lookNote">Pick a niche for a ready-made combo, then change any knob. The split hero shows your image, the niche image, or a card built from your copy.</div>
</div>
<div style="display:flex;gap:8px;align-items:center"><span class="grow"></span><button class="btn sm" type="button" id="edRewrite">Write again</button><button class="btn pri" type="button" id="edSave">Save</button></div>
</div>
</div>
</div>
</div>
<script src="/assets/cr-shell.js?v=20261114tu"></script>
<script src="/assets/pages-screen.js?v=20261021t"></script>
</body>
</html>