chart data loading

This commit is contained in:
2026-03-24 21:37:49 -04:00
parent f6bd22a8ef
commit c76887ab92
65 changed files with 6350 additions and 713 deletions

View File

@@ -40,11 +40,18 @@ watch(isMobile, (mobile) => {
// Check if user is already authenticated on page load
onMounted(async () => {
// Try to restore session from stored token
if (authService.getToken()) {
const token = authService.getToken()
if (token) {
const sessionValid = await authService.checkAuth()
if (sessionValid) {
isAuthenticated.value = true
await initializeApp()
// Connect WebSocket with existing token
try {
await wsManager.connect(token)
await initializeApp()
} catch (err) {
console.error('Failed to connect WebSocket on session restore:', err)
}
}
}
@@ -70,9 +77,8 @@ const handleAuthenticate = async (email: string, password: string) => {
return
}
// Step 2: Connect WebSocket with JWT token (if WebSocket is used for real-time sync)
// For now, we're not connecting WebSocket until it's implemented in the gateway
// await wsManager.connect(result.token)
// Step 2: Connect WebSocket with JWT token for real-time sync
await wsManager.connect(result.token)
// Step 3: Initialize application
await initializeApp()