Announcement card: a notice can explain itself

The cancellation card could only say two lines, an eyebrow and a date label,
because the card has no prose field and the API never passed one. A notice needs
to say what happened and what comes next, so it now carries a body.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-24 12:46:25 -05:00
parent 9ac2384e87
commit 1555d4ef6f
3 changed files with 2079 additions and 2071 deletions
+8
View File
@@ -71,6 +71,14 @@
foot.appendChild(dateRow);
}
// a notice (cancellation, change of plan) carries prose where an invitation carries times
if (EV.body) {
var bodyEl = document.createElement('p');
bodyEl.textContent = EV.body;
bodyEl.style.cssText = 'margin:10px 0 2px;text-align:center;color:#c8d6e2;font-size:14.5px;line-height:1.5;';
foot.appendChild(bodyEl);
}
if (EV.timesArr.length) {
var grid = document.createElement('div');
grid.style.cssText = 'display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:16px;';
+1 -1
View File
@@ -28,5 +28,5 @@
<a class="btn btn-primary" href="/my">Open the dashboard</a>
</div>
</main>
<script src="/app.js"></script> <script src="/announce.js?v=20260922a"></script>
<script src="/app.js"></script> <script src="/announce.js?v=20260924a"></script>
</body></html>
+1 -1
View File
@@ -671,7 +671,7 @@ async function handleApi(req,res,pathname){
return json(res,200,{
enabled: c.announceEnabled===undefined ? true : !!c.announceEnabled,
id: c.announceId||'', img: c.announceImg||'', meetUrl: c.announceMeetUrl||'',
eyebrow: c.announceEyebrow||'', dateLabel: c.announceDateLabel||'',
eyebrow: c.announceEyebrow||'', dateLabel: c.announceDateLabel||'', body: c.announceBody||'',
times: c.announceTimes||'', expiresUTC: c.announceExpiresUTC||'',
startUTC: c.announceStartUTC||'', durationMin: Number(c.announceDurationMin)||60,
promo: { enabled: !!c.promoEnabled, id: c.promoId||'', img: c.promoImg||'', eyebrow: c.promoEyebrow||'', ctaText: c.promoCtaText||'', ctaUrl: c.promoCtaUrl||'/my', pages: c.promoPages||'my,app', expiresUTC: c.promoExpiresUTC||'' }