feat(web): sign in by emailed code on the account page

Adds the email form (address, code, resend timer, aria-live status) shown only when
/v1/info reports email_auth enabled, RU/EN strings, privacy policy update, API
helpers, tests and browser QA with a mocked Hub.
This commit is contained in:
Loki 2026-10-24 17:49:41 +02:00
parent 309b77e63c
commit a4cae66336
Signed by: boba
GPG key ID: 253067914055423B
9 changed files with 528 additions and 28 deletions

View file

@ -108,3 +108,16 @@ test("app templates avoid inline style attributes blocked by the site CSP", asyn
const source = await Bun.file("src/app.ts").text();
assert.doesNotMatch(source, /style="/);
});
test("privacy text describes email sign-in in both languages", () => {
for (const [name, catalog] of Object.entries(messages)) {
const text = [
catalog.privacyCollectText,
catalog.privacyTrackText,
catalog.privacyCookiesText,
].join(" ");
assert.match(text, /HMAC/, name);
assert.match(text, /10/, name);
assert.match(text, /SMTP/, name);
}
});