Commit Graph

166 Commits

Author SHA1 Message Date
hykocx 227b05a61e refactor(auth): extract shared page header into AuthPageHeader component
- add AuthPageHeader component to centralize title/description markup
- replace inline header divs in LoginPage, RegisterPage, LogoutPage, ForgotPasswordPage, ResetPasswordPage, and ConfirmEmailPage with AuthPageHeader
2026-04-24 17:11:37 -04:00
hykocx d0e407b67d fix(admin): update session data check to use sessions property 2026-04-24 17:01:50 -04:00
hykocx a92b4334f1 feat(admin): add session management tab to profile page
- add sessions tab with active session list in ProfilePage
- fetch and display sessions with current session highlight
- implement single and bulk session revocation with redirect on self-revoke
- add session-related api helpers in auth api
2026-04-24 16:59:54 -04:00
hykocx f60137011d style(admin): simplify password reset button markup and remove border separator 2026-04-24 16:50:39 -04:00
hykocx 4549299d50 style(admin): update dark mode border color to neutral-800 in UserEditModal 2026-04-24 16:48:18 -04:00
hykocx 3f5bbfda0b style(admin): clean up password section layout in user edit modal 2026-04-24 16:47:56 -04:00
hykocx ec0edf89b9 fix(admin): require current password for self password change and fix field ordering
- initialize `newPassword` in form state on load
- add `needsCurrentPassword` flag triggered by email or password change when editing self
- route self password change to profile endpoint with current password verification
- move role tag input above password section and update current password field visibility logic
2026-04-24 15:52:34 -04:00
hykocx c844bc5e86 feat(admin): add password management to user edit modal and profile page
- add new password field in UserEditModal with optional admin-set password on save
- add send password reset link button with loading state in UserEditModal
- add password change section with strength indicator in ProfilePage
- expose sendPasswordResetEmail utility in auth api
2026-04-24 15:45:56 -04:00
hykocx 25f93526a5 feat(admin): add RoleBadge component and integrate it in user management views
- add new RoleBadge shared component for consistent role display
- export RoleBadge from shared components index
- replace inline Badge usage with RoleBadge in UsersPage role column
- use RoleBadge via renderTag prop in UserEditModal role TagInput
- simplify TagInput Pill to a generic unstyled pill, removing color logic
2026-04-24 15:31:28 -04:00
hykocx 69bc05944c fix(ui): render TagInput dropdown via portal to avoid overflow clipping
- import createPortal from react-dom
- add dropdownStyle state to track fixed position coordinates
- calculate and update dropdown position on open, scroll, and resize
- render dropdown and empty-state divs into document.body using createPortal
2026-04-24 15:24:56 -04:00
hykocx 70000e0761 refactor(admin): embed roles data in user list query and update role display
- remove separate `/zen/api/roles` fetch and `roleColorMap` state from UsersPage
- update SQL query to include aggregated roles array per user via subquery
- replace single role badge with multi-badge display supporting overflow indicator
2026-04-24 15:20:51 -04:00
hykocx 48755c03f3 refactor(admin): remove email_verified field from user edit modal 2026-04-24 15:17:00 -04:00
hykocx b88f84e2a1 refactor(admin): wrap profile page content in fragment 2026-04-24 15:13:06 -04:00
hykocx 87990390c1 refactor(admin): replace inline email form with modal dialog
- import Modal component from shared components
- rename emailFormOpen state to emailModalOpen for clarity
- convert handleEmailSubmit from form event handler to plain async function
- move email change form into a Modal instead of inline collapsible form
- pass pendingEmailMessage as Input description prop instead of separate paragraph
- simplify toggle button to only show when no pending message
2026-04-24 15:11:29 -04:00
hykocx 66c862cf73 feat(admin): add email change flow with confirmation for users
- add `ConfirmEmailChangePage.client.js` for email change token confirmation
- add `emailChange.js` core utility to generate and verify email change tokens
- add `EmailChangeConfirmEmail.js` and `EmailChangeNotifyEmail.js` email templates
- update `UserEditModal` to handle email changes with password verification for self-edits
- update `ProfilePage` to support email change initiation
- update `UsersPage` to pass `currentUserId` to `UserEditModal`
- add email change API endpoints in `auth/api.js` and `auth/email.js`
- register `ConfirmEmailChangePage` in `AdminPage.client.js`
2026-04-24 15:04:36 -04:00
hykocx 995edae513 feat(auth): expose individual auth page components as a public entry point 2026-04-23 19:55:35 -04:00
hykocx 362804b650 style(auth): replace "E-mail" label with "Courriel" in auth pages 2026-04-23 19:38:57 -04:00
hykocx 4b27c1efea style(auth): update form placeholders to french localization 2026-04-23 19:38:16 -04:00
hykocx 472c6ebd7f style(ui): replace focus:ring-0 with focus:[box-shadow:none] for fullghost button variant 2026-04-23 19:24:21 -04:00
hykocx e4a0967203 style(ui): remove focus ring from fullghost button variant 2026-04-23 19:22:24 -04:00
hykocx f48f002fcd refactor(auth): replace anchor tags with fullghost Button variant for navigation links 2026-04-23 19:21:27 -04:00
hykocx dbea58a978 refactor(auth): replace anchor navigation links with Button components and improve auth page styling 2026-04-23 18:21:21 -04:00
hykocx 1aac03c2dc refactor(auth): remove GET /users/me endpoint and related exports 2026-04-23 18:16:46 -04:00
hykocx ad4847e1c5 fix(auth): hide error/success messages when user is authenticated or conflicting states exist 2026-04-22 20:41:35 -04:00
hykocx 189dcfc726 style(auth): replace inline card styles with Card component and clean up comments in ConfirmEmailPage 2026-04-22 20:39:05 -04:00
hykocx bbb55605c3 refactor(admin): simplify ProfilePage with tabs and component cleanup 2026-04-22 20:26:45 -04:00
hykocx 68d97c81da style(admin): increase settings card min-width from 1/2 to 3/5 2026-04-22 20:22:54 -04:00
hykocx f082ef4fda style(ui): adjust layout alignment and sizing in settings page and tab nav 2026-04-22 20:22:07 -04:00
hykocx 3e7e0387a1 refactor(admin): generalize breadcrumb fallback to handle unknown single-segment routes 2026-04-22 20:16:07 -04:00
hykocx 3b04971483 feat(admin): add position parameter to registerNavItem 2026-04-22 20:14:29 -04:00
hykocx ccdd309414 feat(admin): add bottom navigation items and settings page to admin panel 2026-04-22 20:12:18 -04:00
hykocx fef71aaf92 refactor(admin): remove quick links section and replace anchor tags with Next.js Link components 2026-04-22 19:58:43 -04:00
hykocx e99970b9b2 style(admin): update logout button text and hover colors for better contrast 2026-04-22 19:54:48 -04:00
hykocx 45ce8fda59 style(ui): increase dark mode opacity for danger, success, and warning button variants 2026-04-22 19:52:16 -04:00
hykocx 5d4d1866b5 style(ui): add flex alignment classes to button text span 2026-04-22 19:49:15 -04:00
hykocx b60514aebc style(ui): wrap button children in span with size-aware min-height class 2026-04-22 19:48:23 -04:00
hykocx 354cac3b27 style(ui): increase button md size text from 12px to 13px 2026-04-22 19:46:34 -04:00
hykocx 18f1fcdbd0 style(ui): change default button size from sm to md and remove explicit size="sm" props 2026-04-22 19:45:56 -04:00
hykocx ad7b907e57 refactor(ui): apply size class directly to icon component instead of wrapper span 2026-04-22 19:42:39 -04:00
hykocx 0dc6092780 refactor(ui): change Button icon prop to accept component reference instead of JSX element 2026-04-22 19:41:57 -04:00
hykocx 9ca3e0a83b refactor(admin): pass icon components as references instead of JSX elements 2026-04-22 19:40:28 -04:00
hykocx 173cea270f style(ui): add leading-none to button base class 2026-04-22 19:39:10 -04:00
hykocx e2dd60843f style(ui): add icon-only button sizing and fix action column alignment 2026-04-22 19:38:02 -04:00
hykocx 0fd01d2b68 fix(ui): add right alignment support for table columns using align prop 2026-04-22 19:35:39 -04:00
hykocx 52f8ea2b13 style(ui): update dark mode background color from #090909 to #0B0B0B across auth and admin components 2026-04-22 19:33:40 -04:00
hykocx 869afbcb85 style(ui): update dark mode background colors to use #090909 instead of neutral variants 2026-04-22 19:32:14 -04:00
hykocx 312c8e0239 fix(admin): remove active section override on collapsed state 2026-04-22 19:30:05 -04:00
hykocx 456b1746bd feat(admin): extract AdminLayout as a separate server component 2026-04-22 19:22:14 -04:00
hykocx cc4527d488 feat(admin): persist sidebar collapsed sections state in sessionStorage 2026-04-22 19:13:00 -04:00
hykocx 35cfa8b51a fix(admin): collapse inactive sidebar sections by default and fix toggle logic 2026-04-22 19:10:17 -04:00