Commit Graph

4 Commits

Author SHA1 Message Date
3f1c573a67 feat: Make menu context-aware and hide current page links
Implement intelligent menu filtering that hides self-referencing links and shows all applicable pages based on user role and authentication state.

Changes:
- Menu component now uses currentPath to filter out the current page link
- Added computed properties to detect which page user is on
- Fixed profile, admin, and users pages to dynamically detect admin status from API
- Added menu to forgot-password page for consistent navigation
- All pages now pass correct authentication state to Menu component

This ensures menus always show relevant navigation options while avoiding redundant links to the current page. Admin users now see all admin options (Manage Sermons, Manage Users) regardless of which page they're on, except the current one.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 09:40:42 -05:00
bcacf7d513 fix: Force page reload after logout to refresh authentication state
- Changed logout to use window.location.href for full page reload
- Ensures all components refresh and show correct unauthenticated state
- Fixes issue where logout appeared to do nothing until manual refresh
- Menu, notes section, and all auth-dependent UI now update immediately

Previously, using navigateTo() to the same page didn't trigger a refresh,
leaving stale authenticated UI visible. Full page reload ensures clean state.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 10:56:08 -05:00
160a4e58b3 feat: Redirect to current page after logout for better UX
- Updated logout handler to return user to current page instead of login
- Consistent with login behavior which redirects back to original page
- Allows users to continue browsing after logout without forced redirect
- Users who accidentally click logout can easily log back in and continue

This improves UX by keeping users on the page they were viewing,
rather than forcing them to the login page when they may have just
wanted to log out temporarily.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 10:26:22 -05:00
cee37c78c4 feat: Unify navigation with hamburger menu across all screen sizes
- Renamed MobileMenu to Menu component (no longer mobile-only)
- Added 500ms debounce to prevent accidental double-tap menu toggles
- Improved click-outside detection using ref-based containment check
- Removed mobile/desktop navigation split - menu now consistent everywhere
- All pages now use single hamburger menu on both mobile and desktop
- Simplified header layouts across index, sermon, profile, admin, and users pages

This provides a cleaner, more consistent UX with the hamburger menu available
on all screen sizes. The debounce prevents the menu from closing accidentally
when navigating between pages or double-tapping.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 09:51:09 -05:00