Commit graph

56 commits

Author SHA1 Message Date
52d7a5e3e2 Admin shell: standalone login/preview, fixed admin theme
- /login and /preview no longer render the admin navbar (the login page
  showed Pages/Export/Logout to signed-out users; the page preview iframe
  showed the whole admin shell above the draft).
- Site colours from Globals were written onto --color-primary/--color-accent
  of the admin document, which are DaisyUI's theme variables — so the brand
  colour restyled every admin button (low-contrast white-on-sage) and flashed
  after hydration. Apply them only inside /preview; give the admin its own
  sage primary at ~5:1 contrast.
- Login page redesigned with DaisyUI 5 markup (full-width inputs, labels
  above), autocomplete hints, pending state.
- Navbar: active-route highlight, consistent button sizes, wraps instead of
  overflowing on narrow screens.
- Import: confirm before overwriting, show per-item errors instead of
  auto-reloading them away, friendly message for invalid JSON.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
2026-10-06 10:35:15 +00:00
1518f1bbbe Fix admin login/logout over HTTP and stale sessions
- Auth cookie was always exported with the SDK default `Secure` flag, so
  browsers dropped it over plain HTTP (CADDY_SCHEME=http) and login
  looped back to /login. Set `secure` from the real request scheme.
- Logout never ran: the hook redirected every authenticated request to
  /login (including POST /login?/logout) back to /pages. Only redirect GET.
- Refresh the token per request so revoked tokens log the user out instead
  of surfacing as 500s, and sessions slide instead of expiring mid-edit.
- Use `_superusers` instead of the deprecated `pb.admins` alias; keep the
  entered email on a failed login.
- docker-compose: fully-qualified image names (podman rejects short names).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
2026-10-06 10:35:15 +00:00
Jakub Dorfman
fd1afc5f3a fixed image upload 2026-09-28 19:52:24 +02:00
Jakub Dorfman
96828994e1 added mailing through Brevo and node mailer, also a email editor, with
their custom blocks and renderers
2026-09-28 19:25:19 +02:00
Jakub Dorfman
478a5fd466 moved shared code to the shared package 2026-08-19 19:18:10 +02:00
Jakub Dorfman
1027da989e moved page rendering to a different service and access is now behind
admin.DOMAIN
www.DOMAIN
db.DOMAIN
2026-08-19 17:58:19 +02:00