edaf98c8f6
Watershed look from the approved mockup (hero, topo pattern, icons). Network sign-in through the hub, hub membership, activity ping. Reshare links per member per ad with branch/step tracking; family-tree dashboard (branch, step, reshares, views, clicks, sign-ups, Boosts). Verified views earn ad credits for the branch's resharer (L3). L2 sign-up pipeline (hub-new, confirmed email, not self device/IP, throwaway block, daily cap, fraud score) with keeper-signed reward vouchers and a pending-rewards ledger; payouts OFF (REWARD_PAYOUTS). L1 Boosts through VASShop with signed orders naming the sponsor line and the resharer. Trust pack, chatbot, promo kit, PolHunter embed. All numbers are PROPOSALS until Marty sets them. qa/e2e.mjs 59/59 on a local anvil chain, chatbot test 108/108. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
1.3 KiB
JavaScript
21 lines
1.3 KiB
JavaScript
// Join the network free (/join) and confirm the email (/confirm?t=). The join is booked to the reshare link the visitor came through.
|
|
(async function () {
|
|
const $ = VAS.$;
|
|
if ($('joinForm')) {
|
|
const f = await VAS.getJSON('/api/join/form');
|
|
if (f.via && f.via.resharer) $('viaNote').textContent = 'You came through @' + f.via.resharer + '\'s reshare of "' + f.via.headline + '". One free account for every network site.';
|
|
$('joinForm').addEventListener('submit', async e => {
|
|
e.preventDefault();
|
|
const r = await VAS.post('/api/join', { email: $('email').value.trim(), username: $('username').value.trim(), form: f.form });
|
|
if (r.error) return VAS.status(r.error, 'err');
|
|
$('joinForm').hidden = true;
|
|
VAS.status(r.mailed ? 'Check your inbox: open the link we sent to confirm your email.' : 'Thanks. This is the staging copy, so no email is sent: the confirm link is on the admin page for testing.', 'ok');
|
|
});
|
|
} else {
|
|
const t = new URLSearchParams(location.search).get('t') || '';
|
|
const r = await VAS.post('/api/confirm', { t });
|
|
if (r.error) return VAS.status(r.error, 'err');
|
|
VAS.status('Your email is confirmed. Welcome to the network. Sign in with your network account to post your own ad.', 'ok');
|
|
}
|
|
})();
|