Commit Graph

8 Commits

Author SHA1 Message Date
zetaloop d76866ac3b fix(auth): persist login state to localStorage
Save user data, role, and verification status on login so that
page refresh does not lose the session. On mount, AuthBootstrap
always verifies against the backend via getCurrentUserForLogin
to confirm the cookie JWT is still valid.

Remove unused verification store methods (submitVerification,
approveVerification, rejectVerification) — the verify page
already calls lib/api/users.ts directly.
2026-05-01 17:32:06 +08:00
zetaloop ff03532da4 feat: restore auth state from backend session on app load
Call GET /api/v1/users/me on startup to rehydrate Zustand auth store
from the existing JToken cookie, so login survives page refresh.
2026-04-24 05:07:44 +08:00
zetaloop 336aa36d5a feat(theme): add dark mode with next-themes and settings toggle 2026-02-25 20:01:52 +08:00
zetaloop 2d42473910 chore(format): add prettier-plugin-organize-imports and sort imports 2026-02-25 15:34:33 +08:00
zetaloop 7bcb73f139 refactor(data): add mock API adapters, id utility, and toast feedback 2026-02-22 08:02:48 +08:00
zetaloop 07754069c1 feat: global login dialog with useRequireAuth hook for 401 auth gating 2026-02-20 18:50:46 +08:00
zetaloop f7c76db00f feat: global shell — header, footer, sidebars, and layout integration 2026-02-20 13:27:33 +08:00
zetaloop 3093da1665 feat: route structure, providers, layouts, and placeholder pages 2026-02-20 12:43:34 +08:00