Hub 2.10.0: emails laid out as Events' and Accounts'; FastPanel ^~ /api/

- src/utils/emailLayout.js: one layout for every Hub email (Cross Code
  header with the logo, heading, button with the link under it, notes,
  tables, job steps, code blocks, footer), HTML and plain text from the
  same blocks, everything escaped. mail.sendMail attaches the logo.
- Every email moved onto it: job reports, alerts, update requests, the
  SMTP test, notices, and all emails to site admins. Billing keeps its own.
- The FastPanel email and the install page give the backend as nginx config
  with location ^~ /api/ (FastPanel's static-file rule took /api/...png).
- Proxy done checks /api/proxy-check.png doesn't reach the frontend.
- deployment.md: ^~ for the Hub's own /api/ too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 14:40:55 +02:00
co-authored by Claude Opus 5.5
parent 92b61f0d0d
commit 14dd608e37
16 changed files with 685 additions and 87 deletions
+26
View File
@@ -5,6 +5,32 @@ versions follow [Semantic Versioning](https://semver.org/).
## [Unreleased]
## [2.10.0] - 2026-11-20
### Changed
- **Every email the Hub sends is laid out as Cross Events' and Accounts' are**
(`src/utils/emailLayout.js`): the Cross Code header with the logo, a white card with a heading,
a button for the one thing to do (with the link written out under it), coloured notes, tables,
a job's steps as ticks and crosses, log lines and nginx config in a code block, and a footer that
says why the email came. Each still has a plain-text version. That covers the job reports
(install, update, adopt, demo data, export, .env change, uninstall, batch stopped, missed job,
purge), the central server check, installs found on a server, install and server alerts, update
requests, an invoice that couldn't be sent, the SMTP test, notices to churches, and every email to
a site admin (update planned, reminder, done, didn't go through, postponed, cancelled, site ready,
data download, closing, maintenance), whose What's New notes are now a list. Billing emails keep
their own layout. `mail.sendMail` attaches the logo to any HTML that shows it.
- **The FastPanel email** (and the install's page) gives the backend location as nginx config to
paste, with `location ^~ /api/`. FastPanel's static-file handling adds a regex location for file
extensions that wins over a plain `/api`, so `/api/uploads/…/logo.png` reached the frontend and
logo uploads failed (Cross Events 3.6.1). deployment.md §8 uses `^~` for the Hub's own site too
(`/api/…/statement.pdf`).
### Added
- **Proxy done checks a file under /api** (`/api/proxy-check.png`): if the frontend answers
(`X-Powered-By: Next.js`), the site isn't made live and the page says to use `location ^~ /api/`.
## [2.9.0] - 2026-11-20
Needs `@crosscode/contracts` 1.13.0 (vendored). The checks need Cross Events 3.5.0 (older ones don't