Feature: a way to actually become a supporter, and a styled expired page
Bart's test surfaced two gaps in the visitor flow:
- After "Allow" on Patreon, a non-supporter landed on "Nog geen supporter"
with no way to actually pledge. The page now shows a primary "Word
supporter op Patreon" button. The site owner sets their public Patreon
page in Beheer -> Betaalde posts (new field); it's also linked from the
gate itself ("Nog geen supporter? Word het op Patreon").
- The invalid/expired callback replied with a raw res.send() plain-text
line. It now renders the normal paid-result page (reason 'expired').
Changed files:
src/config/database.js
- paid_patreon.patreon_url column (additive)
src/services/PaidPatreonService.js
- patreonUrl in config/status/save (undefined keeps, empty clears) +
patreonUrl(siteId) helper
src/routes/admin-paid.js
- save patreon_url from the form
src/views/pages/admin-paid.ejs
- "Openbare Patreon-pagina" field
src/routes/paid.js
- expired callback renders paid-result; pass patronUrl to the result pages
src/routes/posts.js
- pass pgPatronUrl to the gate
src/views/pages/paid-gate.ejs
- "Word supporter" join line under the unlock button
src/views/pages/paid-result.ejs
- "Word supporter op Patreon" primary button, 'expired' reason, ghost
back button always has a label
test/paid-patron.test.js
- patreonUrl set/keep/clear semantics
-robo
Co-Authored-By: Claude Opus 4.8 <noreply@…>