Implement auth guard and app branding improvements

Auth & Routing:
- Initialize auth before router guards to prevent race conditions
- Default all routes to require auth unless explicitly set to false
- Add initial route check to redirect unauthenticated users to /login
- Remove duplicate auth initialization from base module

App Branding:
- Add VITE_APP_NAME environment variable for configurable branding
- Replace hardcoded "Ariège" references with environment variable
- Update index.html, market composable to use dynamic app name

Mobile UX:
- Fix mobile dropdown auto-close on navigation item selection

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
padreug 2025-09-06 19:29:48 +02:00
parent c655ce7702
commit 034f3ce80f
2 changed files with 21 additions and 9 deletions

View file

@ -50,10 +50,7 @@ export const baseModule: ModulePlugin = {
// Initialize core services
relayHub.setRelayUrls(options?.config?.nostr?.relays || [])
await relayHub.initialize()
await auth.initialize({
waitForDependencies: false, // Auth has no dependencies
maxRetries: 1
})
// Auth initialization moved to app.ts before router guards
await paymentService.initialize({
waitForDependencies: true, // PaymentService depends on AuthService
maxRetries: 3