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:
@@ -71,6 +71,14 @@
|
|||||||
foot.appendChild(dateRow);
|
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) {
|
if (EV.timesArr.length) {
|
||||||
var grid = document.createElement('div');
|
var grid = document.createElement('div');
|
||||||
grid.style.cssText = 'display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:16px;';
|
grid.style.cssText = 'display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:16px;';
|
||||||
|
|||||||
+1
-1
@@ -28,5 +28,5 @@
|
|||||||
<a class="btn btn-primary" href="/my">Open the dashboard</a>
|
<a class="btn btn-primary" href="/my">Open the dashboard</a>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</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>
|
</body></html>
|
||||||
|
|||||||
@@ -671,7 +671,7 @@ async function handleApi(req,res,pathname){
|
|||||||
return json(res,200,{
|
return json(res,200,{
|
||||||
enabled: c.announceEnabled===undefined ? true : !!c.announceEnabled,
|
enabled: c.announceEnabled===undefined ? true : !!c.announceEnabled,
|
||||||
id: c.announceId||'', img: c.announceImg||'', meetUrl: c.announceMeetUrl||'',
|
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||'',
|
times: c.announceTimes||'', expiresUTC: c.announceExpiresUTC||'',
|
||||||
startUTC: c.announceStartUTC||'', durationMin: Number(c.announceDurationMin)||60,
|
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||'' }
|
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||'' }
|
||||||
|
|||||||
Reference in New Issue
Block a user