Thema-fundament: variant (B/E) x modus (licht/donker), tijdreis-knop en overgang
Vervangt rood/paars door tokens per variant en modus, voegt ModeToggle en icoon-knop VariantToggle toe, VariantRenderer met lazy E-chunk, dither-overgang (uit bij minder beweging), theme-init.js tegen themaflits en tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -50,7 +50,7 @@ Request body:
|
||||
| `email` | string | yes | trimmed, 1–254 chars, regex `^[^\s@]+@[^\s@]+\.[^\s@]{2,}$`, no control characters |
|
||||
| `subject` | string | yes | trimmed, 1–100 chars; **opaque value** chosen by the site (a package id, slug, or `other`); no slug regex; stored as given, never validated against offerings. The label of `other` is per site (ASF: "Overig"). |
|
||||
| `message` | string | yes | trimmed, 1–2000 chars |
|
||||
| `hpCheck` | string | yes (key present) | **honeypot**; must be empty. Deliberately implausible name (not `website`/`url`) to avoid password-manager autofill; field is configurable per site; render with `autocomplete="off"`, `tabindex="-1"`, `aria-hidden`, off-screen |
|
||||
| `hpCheck` | string | no (a missing key counts as empty; CMS-U3) | **honeypot**; must be empty. The JSON name is fixed `hpCheck`; the DOM name/id in the site is free. Deliberately implausible name (not `website`/`url`) to avoid password-manager autofill; render with `autocomplete="off"`, `tabindex="-1"`, `aria-hidden`, off-screen |
|
||||
| `token` | string | yes | from 2.1 |
|
||||
| `captchaToken` | string \| null | when `captcha` enabled | verified server-side |
|
||||
|
||||
@@ -71,7 +71,7 @@ Responses:
|
||||
"errors": { "name": ["required"], "email": ["invalid"], "message": ["tooLong"] }
|
||||
}
|
||||
```
|
||||
The `type` URI is configurable per host (`Contact:ProblemTypeBase`), default `about:blank`, so no site domain is hard-coded in a module used by two sites; clients map on `errors`, never on `type`. Codes: `required`, `tooLong`, `invalid`, `expired` (token only; also for forged/other-site tokens). The `errors` mapping is custom (not the default ASP.NET `ValidationProblemDetails`). Messages are **not** localized by the API; the client maps `messages[field][code]`. Client-side validation uses the same limits and codes.
|
||||
The `type` URI is configurable per host (`Contact:ProblemTypeBase`), default `about:blank`, so no site domain is hard-coded in a module used by two sites; clients map on `errors`, never on `type`. Codes: `required`, `tooLong`, `invalid`, `expired` (token only; also for forged/other-site tokens). A body that cannot be bound (broken JSON, wrong types) answers `400` with `errors.body = ["invalid"]` in the same problem shape, without echoing values (implemented in CMS-U3). The `errors` mapping is custom (not the default ASP.NET `ValidationProblemDetails`). Messages are **not** localized by the API; the client maps `messages[field][code]`. Client-side validation uses the same limits and codes.
|
||||
|
||||
## 4. Server behaviour agreements
|
||||
1. **Store first, mail after commit.** Validate → store and commit (`status: new`, `mailStatus: pending`) → respond 202. Mail is **not fire-and-forget** in the request scope: a `BackgroundService`/queue picks up `pending` rows, sends via `IEmailSender`/`IMailAvailability` (returns `MailSendResult`, does not throw) and updates `mailStatus` and `mailAttempts`. A short sweep (every few minutes) catches `pending` rows left by a crash; `failed` rows are retried with **backoff** up to a configurable max attempts (so a first outage does not mean 24 h delay). A mail failure never fails the request. If `Email:Smtp:Host` is not configured: store only, show a notice in the admin.
|
||||
|
||||
Reference in New Issue
Block a user