Staging test mode (Marty's rule: test apps never touch real people): TANK_MODE=iap with DRAFT_LIVE not 1 reads the pool + statuses from InstantAdPay but every pick (5 instant picks on a purchase, the Monday draft) and release is a preview kept here: no tank.adopt(), no sponsor change, no email. Yellow 'TEST MODE, nobody is adopted' strip on every page (/api/config testMode). Admin view: testMode, previewPicks, adoptionMailsSkipped. iap-tank 35/35 (new section 6 against the real draftpartner.js), unit 62/62, smoke 156/156. common.js/fx.css ?v=3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,9 @@ window.FX = (function () {
|
||||
+ links.map(l => '<a href="' + l[0] + '"' + (l[0] === active ? ' class="on" aria-current="page"' : '') + '>' + l[1] + '</a>').join('') + '</div></div>';
|
||||
document.body.prepend(nav);
|
||||
if (week) setWeek(week);
|
||||
// staging test mode (DRAFT_LIVE not 1): say so on every page, plainly
|
||||
getConfig().then(c => { if (!c || !c.testMode || $('testMode')) return; const b = document.createElement('div'); b.id = 'testMode'; b.className = 'testmode'; b.setAttribute('role', 'status');
|
||||
b.innerHTML = '<div class="wrap"><b>TEST MODE, nobody is adopted.</b> Picks on this site are previews: no one gets a new sponsor and no email is sent.</div>'; nav.after(b); }).catch(() => {});
|
||||
}
|
||||
// ISO-ish week number of a Monday date (the mockup's "DRAFT WEEK 46")
|
||||
function weekNo(monday) { const d = new Date(monday + 'T12:00:00Z'); const t = new Date(Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate() + 3)); const y = new Date(Date.UTC(t.getUTCFullYear(), 0, 4)); return 1 + Math.round(((t - y) / 86400000 - 3 + ((y.getUTCDay() + 6) % 7)) / 7); }
|
||||
|
||||
@@ -217,3 +217,7 @@ footer.foot p{margin:4px 0}footer.foot a{color:var(--gold)}footer.foot .here{col
|
||||
.kit-pre{white-space:pre-wrap;font:inherit;font-size:14px;color:var(--muted);margin:0;background:var(--bar);padding:12px}
|
||||
.ccard .l .kvr{color:var(--muted)}.ccard .l .kvr span{color:var(--muted)}.ccard .l .kvr b{font-family:var(--text);font-size:15px;color:#fff;word-break:normal}
|
||||
.splitbar div{font-size:11px;padding:0 4px}
|
||||
|
||||
/* staging test mode strip (DRAFT_LIVE not 1) */
|
||||
.testmode{background:#ffc93c;color:#0b1530;font-size:14px;padding:8px 0;border-bottom:2px solid #0b1530}
|
||||
.testmode b{letter-spacing:.04em}
|
||||
|
||||
Reference in New Issue
Block a user