vue · 1045 bytes Raw Blame History
1 <template>
2 <div id="app" class="min-h-screen bg-gray-50 dark:bg-gray-900">
3 <!-- Loading overlay -->
4 <div
5 v-if="authStore.loading"
6 class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"
7 >
8 <div class="bg-white dark:bg-gray-800 rounded-lg p-6 flex items-center space-x-3">
9 <div class="spinner w-5 h-5"></div>
10 <span class="text-gray-700 dark:text-gray-300">Loading...</span>
11 </div>
12 </div>
13
14 <!-- Main app -->
15 <RouterView />
16
17 <!-- Global notifications -->
18 <Teleport to="body">
19 <NotificationContainer />
20 </Teleport>
21 </div>
22 </template>
23
24 <script setup lang="ts">
25 import { onMounted } from 'vue'
26 import { RouterView } from 'vue-router'
27 import { useAuthStore } from '@/stores/auth'
28 import NotificationContainer from '@/components/NotificationContainer.vue'
29
30 const authStore = useAuthStore()
31
32 onMounted(async () => {
33 // Initialize authentication
34 await authStore.initializeAuth()
35 })
36 </script>
37
38 <style scoped>
39 /* Component styles */
40 </style>