Releases with what's new, notices to churches, withdrawn update requests

- Releases page: each Cross Events version with notes and an urgent flag; the
  newest is the latest version (moved off Settings; the old setting becomes the
  first release). Installs get the notes for every newer version.
- Notices page: a banner for site admins and supervisors (with a time window),
  an email to the customer and admin contact, or both; for every install or
  chosen ones.
- POST /api/installs/update-request/cancel resolves the request and emails Joshua.
- Protocol doc: releases and notices in the heartbeat/register replies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 08:54:35 +02:00
co-authored by Claude Opus 5.5
parent 26e12a199a
commit 1449e5046e
18 changed files with 900 additions and 12 deletions
+23
View File
@@ -119,3 +119,26 @@ export function Tabs<K extends string>({ tabs, active, onChange }: { tabs: { key
</div>
);
}
/** Release notes as the installs show them: lines starting with "- " are a list, the rest paragraphs. */
export function ReleaseNotes({ notes, className = "" }: { notes: string; className?: string }) {
const blocks: ({ list: false; text: string } | { list: true; items: string[] })[] = [];
for (const raw of notes.split(/\r?\n/)) {
const line = raw.trim();
if (!line) continue;
const item = /^[-*•]\s+(.*)$/.exec(line);
const last = blocks[blocks.length - 1];
if (item) {
if (last?.list) last.items.push(item[1]);
else blocks.push({ list: true, items: [item[1]] });
} else blocks.push({ list: false, text: line });
}
if (!blocks.length) return <p className={`text-sm italic text-slate-400 ${className}`}>No notes.</p>;
return (
<div className={`space-y-2 text-sm text-slate-700 ${className}`}>
{blocks.map((b, i) => (b.list
? <ul key={i} className="list-disc space-y-0.5 pl-5">{b.items.map((t, j) => <li key={j}>{t}</li>)}</ul>
: <p key={i}>{b.text}</p>))}
</div>
);
}