diff --git a/public/my.js b/public/my.js index 285fac0..dfd5455 100644 --- a/public/my.js +++ b/public/my.js @@ -123,14 +123,9 @@ document.getElementById('dIncome').innerHTML=inc.length ?`
${inc.map(p=>``).join('')}
WhenFrom memberForAmount
${date(p.ts)}#${p.fromId}${esc(p.desc)}${fmt(p.pol)} POL
` :'
No payments yet — they appear here the moment they land on-chain.
'; - renderNextStep(d); - renderUpgradeCTA(d); - renderGens(d); - renderPipeline(d); - renderCoach(d); - renderMessages(d); - renderAlerts(d); - renderShare(d); + // each panel renders independently — one panel's error must never blank + // the ones after it (bit us: share-card QR vanished behind an earlier throw) + [renderNextStep,renderUpgradeCTA,renderGens,renderPipeline,renderCoach,renderMessages,renderAlerts,renderShare].forEach(function(f){try{f(d);}catch(e){try{console.error('panel',f.name,e);}catch(_){}}}); document.getElementById('dLineage').innerHTML=d.uplineChain&&d.uplineChain.length ?`#${d.id} → ${d.uplineChain.map(i=>'#'+i).join(' → ')} (root)` :'You are at the top of your line.'; @@ -462,25 +457,47 @@ const el=document.getElementById('dShare'); if(!el)return; const dashUrl=`https://rmcircle.team/join/${d.id}`; - if(d.directCount>=2){ - const nx=d.nextInLine; - if(nx){ - const nxDash=`https://rmcircle.team/join/${nx.id}`; - el.innerHTML=`

★ Qualified The team play now moves down. Next in line: #${nx.id} (${nx.directCount}/2 directs). Help them get their 2 — share their invite page (the full team-build pitch, personalized to them) or send prospects the join button, which carries #${nx.id} as sponsor. (If someone still joins through your own link, that's a bonus — the entry reward is yours and they spill down your leg — but only #${nx.id}'s own directs can qualify them.)

Join under #${nx.id} →

${esc(nxDash)}

When #${nx.id} reaches 2/2 this rotates to the next position in your leg — the qualification wave keeps moving down. General traffic can still go through the team rotation.

`; - const qr=document.getElementById('dQr');if(qr)qr.innerHTML=qrSvg(nxDash); - const cp=document.getElementById('copyShare'); - if(cp)cp.addEventListener('click',async()=>{try{await navigator.clipboard.writeText(nxDash);cp.textContent='Copied ✓';setTimeout(()=>cp.textContent=`Copy #${nx.id}'s page link`,1400)}catch(e){}}); - return; - } - el.innerHTML=`

★ Qualified This position has its 2 directs and everyone in your leg is qualified too — outstanding. Send new members through the team rotation — the current sponsor is always live on the start page.

Team QR code
Open the Team Sponsor Page →

This QR sends prospects to the team rotation — show it or print it.

`; - return; - } - const need=2-d.directCount; - el.innerHTML=`

You need ${need} more direct${need===1?'':'s'} to qualify. Until then, share your personal invite page — the link and QR below. A prospect who opens it gets the full team-build story (video, strategy, live blockchain payouts) with your ID #${d.id} pinned as sponsor and your position's real results as proof. This dashboard stays yours; the invite page is what you share.

Join under #${d.id} →

${esc(dashUrl)}

When you reach 2/2 this page automatically retires your link from the team's focus and promotes the next position in your leg. Any late signup on your own link is a bonus — it pays you and spills down as depth.

`; + const q2=d.directCount>=2, nx=d.nextInLine; + // The personal QR is ALWAYS shown: /join/ self-rotates via the moving + // link, so a scan is always placed correctly — even after 2/2. This is the + // person-to-person flow: open your page, tap the QR, they scan, they see + // your pitch page with the video and the join button. + const guidance=q2 + ?(nx?`★ Qualified Your page now routes new joins to #${nx.id} (${nx.directCount||0}/2) — the team play moving down your leg automatically. Anyone who scans still lands on YOUR pitch page; placement is handled for you. A signup on your own link is always a bonus: the entry reward is yours.` + :`★ Qualified Your whole leg is qualified — your page routes new joins to the team rotation automatically.`) + :`Share this with your 2 — anyone who scans or clicks lands on your personal pitch page (video, live proof, join button) and joins under you.`; + el.innerHTML=`

${guidance}

+
+ +
+
📲 Show this QR to anyone, anywhere.
+

Tap the code to blow it up full-screen — they scan it with their phone camera and land on your invite page.

+
Preview my page →
+

${esc(dashUrl)}

+
+
`; const qr=document.getElementById('dQr');if(qr)qr.innerHTML=qrSvg(dashUrl); + const qb=document.getElementById('dQrBtn'); + if(qb)qb.addEventListener('click',function(){ + const ov=document.createElement('div'); + ov.style.cssText='position:fixed;inset:0;background:#fff;z-index:99999;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:24px;cursor:pointer'; + const big=document.createElement('div'); + big.style.cssText='width:min(78vw,78vh);height:min(78vw,78vh)'; + big.innerHTML=qrSvg(dashUrl); + const cap=document.createElement('div'); + cap.style.cssText='color:#0a1620;font-weight:800;font-size:18px;text-align:center'; + cap.textContent='Scan to see the RM Circle team build — join page for #'+d.id; + const hint=document.createElement('div'); + hint.style.cssText='color:#667;font-size:13px'; + hint.textContent='Tap anywhere to close'; + ov.appendChild(big);ov.appendChild(cap);ov.appendChild(hint); + ov.addEventListener('click',function(){try{document.body.removeChild(ov);}catch(e){}}); + document.body.appendChild(ov); + }); 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){}}); } + async function load(id){ try{ // after our own join/upgrade tx, force one cache-bypassing read so the