/
Codename-Nik
/
WebApp
Обзор
Документация
Войти
/
Codename-Nik
/
WebApp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
frontend/src/App.vue
40 строк
901 B
Nikolay Pokhodnya
first commit
03 ноя 2025, 19:47
03 ноя 2025, 19:47
a9fbdee
Код
Авторство
О чём код?
<template> <div v-if="loading" style="padding: 2rem; text-align: center;"> <h1>TaskFlow Loading...</h1> <p>Если это сообщение видно долго, проверьте консоль на ошибки</p> </div> <AppLayout v-else> <router-view /> </AppLayout> </template> <script setup lang="ts"> import { ref, onMounted } from 'vue' import { useAuthStore } from '@/stores/auth' import AppLayout from '@/components/layout/AppLayout.vue' const auth = useAuthStore() const loading = ref(true) onMounted(async () => { console.log('App mounted successfully') try { if (auth.token && auth.getCurrentUser) { await auth.getCurrentUser() } } catch (error) { console.error('Auth initialization failed:', error) } finally { loading.value = false } }) </script> <style> body { margin: 0; font-family: Arial, sans-serif; } </style>