Direct link option: opt out of moving-link rotation to build personal spillover (Team link default, Direct link alternate)

This commit is contained in:
martbost
2026-08-26 14:24:32 -05:00
parent 6282e8c768
commit 4b53dd5326
5 changed files with 30 additions and 6 deletions
+9
View File
@@ -537,6 +537,7 @@
const el=document.getElementById('dShare');
if(!el)return;
const dashUrl=`https://rmcircle.team/join/${d.id}`;
const directUrl=`${dashUrl}?direct=1`;
const q2=d.directCount>=2, nx=d.nextInLine;
// The personal QR is ALWAYS shown: /join/<id> self-rotates via the moving
// link, so a scan is always placed correctly — even after 2/2. This is the
@@ -555,6 +556,12 @@
<div style="display:flex;gap:8px;flex-wrap:wrap"><button id="copyShare" class="btn btn-secondary btn-sm">Copy my page link</button><a class="btn btn-teal btn-sm" href="${esc(dashUrl)}" target="_blank" rel="noopener">Preview my page →</a></div>
<p class="micro" style="margin:10px 0 0;word-break:break-all">${esc(dashUrl)}</p>
</div>
</div>
<div style="margin-top:16px;padding-top:14px;border-top:1px solid var(--line)">
<div style="font-weight:800;font-size:14px;margin-bottom:4px">🔀 Two ways to share</div>
<p class="micro" style="margin:0 0 8px">The link above is your <strong style="color:var(--text)">Team link</strong> ${q2?'— now that you’re qualified it routes new joins to the next teammate who needs directs, building your team in order (recommended).':'— it credits you and builds your first two.'} Want new people to land <strong style="color:var(--text)">under YOU</strong> as spillover instead? Use your <strong style="color:var(--text)">Direct link</strong>:</p>
<div style="display:flex;gap:8px;flex-wrap:wrap;align-items:center"><button id="copyDirect" class="btn btn-secondary btn-sm">Copy Direct link</button><span class="micro" style="word-break:break-all;color:var(--muted)">${esc(directUrl)}</span></div>
<p class="micro" style="margin:8px 0 0"><strong style="color:var(--text)">Team link</strong> helps your team qualify. <strong style="color:var(--text)">Direct link</strong> places every join under you (own spillover). Either way you keep the entry reward on anyone you personally bring.</p>
</div>`;
const qr=document.getElementById('dQr');if(qr)qr.innerHTML=qrSvg(dashUrl);
const qb=document.getElementById('dQrBtn');
@@ -576,6 +583,8 @@
});
const cp=document.getElementById('copyShare');
if(cp)cp.addEventListener('click',async()=>{try{await navigator.clipboard.writeText(dashUrl);cp.textContent='Copied ✓';setTimeout(()=>cp.textContent='Copy my page link',1400)}catch(e){}});
const cd=document.getElementById('copyDirect');
if(cd)cd.addEventListener('click',async()=>{try{await navigator.clipboard.writeText(directUrl);cd.textContent='Copied ✓';setTimeout(()=>cd.textContent='Copy Direct link',1400)}catch(e){}});
}
async function load(id){