/// // Point the verification email at the site instead of the admin console. // // 1794000000 translated all three account emails but deliberately left // verification and email-change aimed at `{APP_URL}/_/#/auth/…`, on the grounds // that "nobody has hit those yet". That was wrong on the facts: the app fires a // verification email on every registration (auth_service.dart, fire and forget), // and four of the nine accounts carry `verified: 1` — four family members opened // PocketBase's admin console and clicked a button in it. // // Nothing is gated on `verified`: the users collection has an empty authRule, // and five accounts including the owner's work fine unverified. The flag is kept // because it is the only evidence an address was typed correctly, which is // exactly the question that comes up when somebody reports a missing email. // // amber.petruzalekr.cz/?verify= now hosts the confirm step in Czech, the // same way `?reset=` does. // // Email-change is left alone on purpose: no surface in the app or the site can // trigger it today, so pointing it at a page nobody reaches would be motion // without a reader. const VERIFY_SUBJECT = "Ověření e-mailu pro Amber"; const VERIFY_BODY = `

Ahoj,

Potvrď prosím tímhle odkazem, že tenhle e-mail patří tobě:

Potvrdit e-mail

Není to povinné. Bez potvrzení se přihlásíš úplně stejně, jen Richard uvidí, že adresa opravdu funguje.

Amber

`; // What 1794000000 set, so the down migration lands where it started rather than // on PocketBase's English default. const PREVIOUS_BODY = `

Ahoj,

Potvrď prosím tímhle odkazem, že tenhle e-mail patří tobě:

Potvrdit e-mail

Amber

`; migrate( (app) => { const users = app.findCollectionByNameOrId("users"); users.verificationTemplate.subject = VERIFY_SUBJECT; users.verificationTemplate.body = VERIFY_BODY; app.save(users); }, (app) => { const users = app.findCollectionByNameOrId("users"); users.verificationTemplate.subject = VERIFY_SUBJECT; users.verificationTemplate.body = PREVIOUS_BODY; app.save(users); }, );