refactor: Transition to authentication system and remove identity management
- Replace identity management with a new authentication system across the application. - Update App.vue to integrate LoginDialog and remove PasswordDialog. - Modify Navbar.vue to handle user authentication state and logout functionality. - Enhance Home.vue to display user information upon login. - Implement routing changes in index.ts to enforce authentication requirements for protected routes.
This commit is contained in:
parent
5ceb12ca3b
commit
be4ab13b32
11 changed files with 1065 additions and 96 deletions
|
|
@ -2,26 +2,23 @@
|
|||
<div class="container py-8 space-y-6">
|
||||
<PWAInstallPrompt auto-show />
|
||||
<NotificationPermission auto-show />
|
||||
<NostrFeed feed-type="announcements" />
|
||||
|
||||
<!-- Welcome Section -->
|
||||
<div class="text-center space-y-4">
|
||||
<h1 class="text-3xl font-bold tracking-tight">Welcome back!</h1>
|
||||
<p class="text-lg text-muted-foreground">
|
||||
You are logged in as {{ auth.userDisplay.value?.name }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- User Profile Card -->
|
||||
<UserProfile />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue'
|
||||
import NostrFeed from '@/components/nostr/NostrFeed.vue'
|
||||
import NotificationPermission from '@/components/notifications/NotificationPermission.vue'
|
||||
import PWAInstallPrompt from '@/components/pwa/PWAInstallPrompt.vue'
|
||||
import { useNostrFeedPreloader } from '@/composables/useNostrFeedPreloader'
|
||||
|
||||
// Preload the announcements feed for better UX
|
||||
const feedPreloader = useNostrFeedPreloader({
|
||||
feedType: 'announcements',
|
||||
limit: 50,
|
||||
includeReplies: false
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
// Auto-preload if we have stored data
|
||||
await feedPreloader.autoPreload()
|
||||
})
|
||||
import UserProfile from '@/components/auth/UserProfile.vue'
|
||||
import { auth } from '@/composables/useAuth'
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue