Login slots: purchased-only at charge time, resume obeys the cap, no top-up on slots
- chargeCredits takes opts.purchasedOnly (new poolShare helper, JSON + MySQL): the 1,000-credit slot charge draws only the credited purchased-grade pool, the rest burns on-chain; viewing credits never pay, even when the member holds enough of them. - setStatus: resuming a paused member login slot is refused while 3 are live (loginSlots() helper, exported). - topUpCampaign refuses login slots; the dashboard no longer offers Buy more views on one. - audit: the days-charged check skips 30-day slots (expires set). - JSON grantWelcome keeps the purchased grade, milestones and streak fields. - my.js cache tag bumped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1078,6 +1078,7 @@
|
||||
+ (['paused', 'out', 'done'].includes(c.status) ? ' <button class="btn small quiet" data-arch="' + c.id + '" data-archname="' + esc(c.name || ('#' + c.id)) + '" data-archleft="' + Math.max(0, (c.budget || 0) - (c.spent || 0)) + '" title="move it out of this list, keep its numbers">Archive</button>' : '')
|
||||
+ (c.type === 'featured' ? ' <button class="btn small sec" data-extend="' + c.id + '" title="book more days at the daily rate">Extend run</button>'
|
||||
: c.type === 'visits' ? ' <button class="btn small sec" data-morevisits="' + c.id + '" data-vper="' + placeCost(c.doorOnly ? c.placement : 'all', r.rates) + '" data-vdoor="' + (c.doorOnly ? (c.placement === 'golden' ? 'golden' : 'doors') : '') + '">' + (c.doorOnly ? 'Buy more doors' : 'Buy more visits') + '</button>'
|
||||
: c.type === 'login' ? '' // a login slot is a flat 30-day buy: nothing to top up
|
||||
: ' <button class="btn small sec" data-topup="' + c.id + '">Buy more views</button>')
|
||||
+ '</td></tr>').join('') + '</tbody></table>';
|
||||
el.appendChild(tbl);
|
||||
|
||||
Reference in New Issue
Block a user