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;';
+32 -32
View File
@@ -1,32 +1,32 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="robots" content="noindex"><title>RM Circle</title><link rel="icon" type="image/png" href="/favicon.png"><link rel="stylesheet" href="/styles.css">
<!-- Telegram Mini App entry point. Vendored WebApp JS (CSP: script-src 'self'). -->
<script src="/telegram-web-app.js"></script></head>
<body>
<main class="wrap hero" style="text-align:center;padding-top:14vh">
<div id="st-loading">
<img src="/logo.jpg" alt="RM Circle" style="width:72px;height:72px;border-radius:18px;box-shadow:0 6px 24px rgba(0,0,0,.45)">
<h1 style="font-size:22px;margin:18px 0 6px">Opening your dashboard…</h1>
<p style="color:var(--muted)">Verifying your Telegram link.</p>
</div>
<div id="st-unlinked" style="display:none">
<div class="eyebrow">One-time setup</div>
<h1 style="font-size:22px">Link your position first</h1>
<p style="color:var(--muted);max-width:420px;margin:10px auto">This app shows YOUR live dashboard — payments, team, coaching. To prove a position is yours, link it once with your wallet (a free signature, it can't move funds):</p>
<p style="color:var(--muted);max-width:420px;margin:10px auto;text-align:left">1. Open <b>rmcircle.team/my</b> in your browser<br>2. Enter your member ID → <b>Messages</b> → sign in with your wallet<br>3. Tap <b>“Connect Telegram”</b> — it deep-links right back to this bot</p>
<p style="margin:18px 0 8px"><button id="btn-open-site" class="btn btn-primary">Open the dashboard to link ↗</button></p>
<p><button id="btn-join" class="btn btn-primary" style="background:linear-gradient(135deg,var(--gold),var(--gold2))">Not a member yet? Join the team</button></p>
<p><button id="btn-browse" class="btn">Just looking? See how it works</button></p>
</div>
<div id="st-error" style="display:none">
<h1 style="font-size:22px">Hmm, that didn't verify</h1>
<p id="err-detail" style="color:var(--muted);max-width:420px;margin:10px auto">Could not verify the Telegram launch data.</p>
<p><button id="btn-retry" class="btn btn-primary">Try again</button></p>
</div>
<div id="st-notg" style="display:none">
<h1 style="font-size:22px">This page opens inside Telegram</h1>
<p style="color:var(--muted);max-width:420px;margin:10px auto">It's the RM Circle Mini App — open the companion bot in Telegram and tap the ☰ menu button. In a normal browser, use the regular dashboard instead.</p>
<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>
</body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="robots" content="noindex"><title>RM Circle</title><link rel="icon" type="image/png" href="/favicon.png"><link rel="stylesheet" href="/styles.css">
<!-- Telegram Mini App entry point. Vendored WebApp JS (CSP: script-src 'self'). -->
<script src="/telegram-web-app.js"></script></head>
<body>
<main class="wrap hero" style="text-align:center;padding-top:14vh">
<div id="st-loading">
<img src="/logo.jpg" alt="RM Circle" style="width:72px;height:72px;border-radius:18px;box-shadow:0 6px 24px rgba(0,0,0,.45)">
<h1 style="font-size:22px;margin:18px 0 6px">Opening your dashboard…</h1>
<p style="color:var(--muted)">Verifying your Telegram link.</p>
</div>
<div id="st-unlinked" style="display:none">
<div class="eyebrow">One-time setup</div>
<h1 style="font-size:22px">Link your position first</h1>
<p style="color:var(--muted);max-width:420px;margin:10px auto">This app shows YOUR live dashboard — payments, team, coaching. To prove a position is yours, link it once with your wallet (a free signature, it can't move funds):</p>
<p style="color:var(--muted);max-width:420px;margin:10px auto;text-align:left">1. Open <b>rmcircle.team/my</b> in your browser<br>2. Enter your member ID → <b>Messages</b> → sign in with your wallet<br>3. Tap <b>“Connect Telegram”</b> — it deep-links right back to this bot</p>
<p style="margin:18px 0 8px"><button id="btn-open-site" class="btn btn-primary">Open the dashboard to link ↗</button></p>
<p><button id="btn-join" class="btn btn-primary" style="background:linear-gradient(135deg,var(--gold),var(--gold2))">Not a member yet? Join the team</button></p>
<p><button id="btn-browse" class="btn">Just looking? See how it works</button></p>
</div>
<div id="st-error" style="display:none">
<h1 style="font-size:22px">Hmm, that didn't verify</h1>
<p id="err-detail" style="color:var(--muted);max-width:420px;margin:10px auto">Could not verify the Telegram launch data.</p>
<p><button id="btn-retry" class="btn btn-primary">Try again</button></p>
</div>
<div id="st-notg" style="display:none">
<h1 style="font-size:22px">This page opens inside Telegram</h1>
<p style="color:var(--muted);max-width:420px;margin:10px auto">It's the RM Circle Mini App — open the companion bot in Telegram and tap the ☰ menu button. In a normal browser, use the regular dashboard instead.</p>
<a class="btn btn-primary" href="/my">Open the dashboard</a>
</div>
</main>
<script src="/app.js"></script> <script src="/announce.js?v=20260924a"></script>
</body></html>
+2039 -2039
View File
File diff suppressed because one or more lines are too long