Training: section pills; /plays member page (three plays + Qualified Start) with the member's own link in the scripts

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-10 07:06:19 -05:00
parent f785016cb5
commit 16a9f76f50
5 changed files with 199 additions and 2 deletions
+12
View File
@@ -0,0 +1,12 @@
// Team-building plays page: members only, and the scripts carry the member's own link.
(async function () {
try { await IAP.renderNav('training'); } catch (e) {}
let me = null;
try { me = await (await fetch('/api/me')).json(); } catch (e) {}
const signedIn = !!(me && me.signedIn && me.email);
document.getElementById('gate').style.display = signedIn ? 'none' : 'block';
document.getElementById('body').style.display = signedIn ? 'block' : 'none';
if (!signedIn) return;
const tok = me.username || me.refCode || me.memberId;
if (tok) document.querySelectorAll('[data-link]').forEach(el => { el.textContent = location.origin + '/join/' + tok; });
})();