Approved launch numbers; members earn for free; Boost = a 7-day board spot (placement only)
- config: 5 sponsor levels x 10% (company 20%), approved numbers labelled as such, POT_DAILY_CENTS display (2500). - Eligibility: a network member with a linked wallet earns a level or the resharer cut, Boost or not. /api/my/order drops line members with no wallet (compression); empty levels and the no-resharer cut go to the company. - shop.js: VASShop ABI after the contract fix (Purchase.boardDays, skus().boardDays, potDailyMaxCents, potCentsToday); purchase days from the chain. wire.js keeps the on-chain days. - Copy: removed "sponsor levels pay people who have bought a Boost / passed over / none qualified" and the proposal labels; Boost page, chatbot, contract page (split fixed forever, pot daily cap) say a Boost buys placement only. Assets ?v=2. - qa/e2e.mjs: deploys the new VASShop (5 x 10%, pot cap 2500, SKU 7 days); a no-wallet hub member between buyer and sponsor is skipped and both sponsors get exactly 10% without a Boost. 61/61. Chatbot QA 108/108. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,7 @@ window.VAS = (function () {
|
||||
+ '<nav class="links" aria-label="Main">' + links.map(l => '<a href="' + l[0] + '"' + (l[0] === active ? ' class="on" aria-current="page"' : '') + '>' + l[1] + '</a>').join('') + '</nav>'
|
||||
+ '<div class="row"><a class="btn sm" id="navSign" href="/my">Sign in</a><a class="btn sm ink" href="/my#post">Post your ad free</a></div></div>';
|
||||
document.body.prepend(h);
|
||||
getConfig().then(c => { if (c.staging) { const b = document.createElement('div'); b.className = 'stage-bar'; b.textContent = 'Staging copy for testing. Numbers marked as proposals are not final. No real payouts happen here.'; h.after(b); } }).catch(() => {});
|
||||
getConfig().then(c => { if (c.staging) { const b = document.createElement('div'); b.className = 'stage-bar'; b.textContent = 'Staging copy for testing. No real payouts happen here.'; h.after(b); } }).catch(() => {});
|
||||
getJSON('/api/me').then(m => { if (m.signedIn) { const a = $('navSign'); if (a) { a.textContent = m.username ? '@' + m.username : short(m.address); } } }).catch(() => {});
|
||||
if (framed) document.querySelectorAll('a[href^="/my"]').forEach(a => { a.target = '_blank'; a.rel = 'noopener'; });
|
||||
}
|
||||
@@ -105,18 +105,17 @@ window.VAS = (function () {
|
||||
async function copy(text, btn) { try { await navigator.clipboard.writeText(text); if (btn) { const o = btn.textContent; btn.textContent = 'Copied'; setTimeout(() => { btn.textContent = o; }, 1600); } } catch (e) { if (btn) { btn.textContent = 'Select the link above to copy it'; } } }
|
||||
return { MARK, $, esc, getConfig, short, framed, status, getJSON, post, n, pct, usd, renderNav, renderFooter, adCard, wire, featured, decorate, goHref, polOf, when, copy };
|
||||
})();
|
||||
// every page: header, footer and the numbers from /api/config (proposals are labelled as proposals)
|
||||
// every page: header, footer and the numbers from /api/config
|
||||
(function () {
|
||||
const boot = () => {
|
||||
VAS.renderNav(document.body.dataset.nav || ''); VAS.renderFooter();
|
||||
VAS.getConfig().then(c => {
|
||||
const sp = c.split || {}, rw = c.reward || {}, cr = c.credits || {}, b = c.boost || {};
|
||||
const prop = sp.live ? '' : '(proposal)';
|
||||
const lv = sp.levelBps || []; const lvTxt = lv.length ? (lv.every(x => x === lv[0]) ? lv.length + ' x ' + VAS.pct(lv[0]) : lv.map(VAS.pct).join(' / ')) : 'none';
|
||||
const tier = (rw.tiers || [])[0] || {};
|
||||
const V = { cut: VAS.pct(sp.resharerBps), pot: VAS.pct(sp.potBps), levels: lvTxt, signup: VAS.usd(rw.cents), cap: String(rw.dailyCap), lockDays: String(tier.lockDays || 14),
|
||||
creditsPer: String(cr.per), creditsViews: String(cr.views), boostDays: String(b.days), boostUsd: '$' + b.usd, headline: String((c.ad || {}).headline || 60),
|
||||
proposalTag: prop, proposalNote: sp.live ? '' : 'The percentages and amounts shown are proposals and are not final yet.',
|
||||
proposalTag: '', proposalNote: '',
|
||||
payoutsNote: rw.payouts ? '' : 'Sign-up reward payouts are switched off for now: verified rewards wait in the pending ledger.' };
|
||||
document.querySelectorAll('[data-cfg]').forEach(el => { const k = el.dataset.cfg; if (V[k] != null) el.textContent = V[k]; });
|
||||
}).catch(() => {});
|
||||
|
||||
Reference in New Issue
Block a user