diff --git a/public/assets/team.js b/public/assets/team.js index a51ea5b..50fa896 100644 --- a/public/assets/team.js +++ b/public/assets/team.js @@ -17,11 +17,15 @@ ms.sort((a, b) => (b.lastSeen || 0) - (a.lastSeen || 0)); return ms; } + // where a direct came from + how they joined (2026-11-13): src = first-touch referrer with the link's ?src= tag, via = the path + const VIA_LABEL = { carried: 'came over from InstantAdPay', btc4hits: 'moved over from BTC4Hits', direct: 'your invite link', stack: 'Stack POL', zones: 'an ad zone', tank: 'adopted from the holding tank' }; + const srcLabel = s => !s ? '' : s === 'direct' ? 'no referring site' : s === 'network' ? 'InstantAdPay' : /^legacy:/.test(s) ? s.split(':')[1] : s; + const originText = m => { const a = srcLabel(m.src), b = m.via ? (VIA_LABEL[m.via] || ('link "' + m.via + '"')) : ''; return (a ? 'from ' + a : '') + (a && b ? ' · ' : '') + (b ? 'via ' + b : ''); }; function render() { const ms = rows(); const L = (LINE && LINE.levels || []).find(x => x.level === LEVEL); const total = L ? L.members.length : 0; $('rows').innerHTML = ms.length ? ms.map(m => { const today = (m.lastSeen || 0) >= dayStart(); const sg = stageOf(m), q = quiet(m); - return '
' + esc(m.name) + (m.own ? ' YOURS' : '') + (m.founder ? ' FOUNDER' : '') + '
' + (m.memberId ? '#' + m.memberId + ' · ' : '') + 'joined ' + new Date(m.joined).toLocaleDateString() + (m.bought ? ' · $25+ buy' : '') + (m.buyers ? ' · ' + m.buyers + ' qualifying' : '') + '
' + return '
' + esc(m.name) + (m.own ? ' YOURS' : '') + (m.founder ? ' FOUNDER' : '') + '
' + (m.memberId ? '#' + m.memberId + ' · ' : '') + 'joined ' + new Date(m.joined).toLocaleDateString() + (m.bought ? ' · $25+ buy' : '') + (m.buyers ? ' · ' + m.buyers + ' qualifying' : '') + '' + (m.email && !m.own ? '
' + esc(m.email) + '' : '') + (!m.own && originText(m) ? '
' + esc(originText(m)) + '' : '') + '
' + '' + (today ? 'today' : ago(m.lastSeen)) + '' + '' + STAGE[sg] + '' + (q ? '
' + (m.lastSeen ? 'quiet ' + Math.floor((Date.now() - m.lastSeen) / 86400e3) + 'd' : 'never signed in') + '' : '') + '
' + '' + (m.earnedWei && m.earnedWei !== '0' ? '+' + pol(m.earnedWei) + ' POL' : '0') + '' diff --git a/public/team.html b/public/team.html index 71b4a4b..c84698d 100644 --- a/public/team.html +++ b/public/team.html @@ -39,6 +39,6 @@
- + diff --git a/server.js b/server.js index 4d18e14..c7349a0 100644 --- a/server.js +++ b/server.js @@ -3290,6 +3290,7 @@ const server = http.createServer(async (req, res) => { founder: !!m.founder, // Founder badge (cosmetic) ref: m.code || null, // opens the activity drop-down (Clinton's ask, 2026-09-14): any of the three levels email: L.level === 1 ? m.email : null, // directs only + src: L.level === 1 ? (m.joinedRef || null) : null, via: L.level === 1 ? (m.joinedVia || null) : null, // where a direct came from (2026-11-13) joined: m.created, qualified: idsOf(m).some(id => qualified.has(id)), earnedWei: idsOf(m).reduce((n, id) => n + BigInt(earnedBy[id] || '0'), 0n).toString() })) }));