feat: enhance mobile compatibility and debugging across authentication and system metrics
All checks were successful
Build And Push Image / docker (push) Successful in 3m18s

This commit is contained in:
2025-08-07 16:08:39 +02:00
parent ec6958375c
commit 146b3c9400
7 changed files with 556 additions and 9 deletions

View File

@@ -128,9 +128,22 @@ definePageMeta({
// Use the auth composable
const { user, login, loading: authLoading, error: authError, checkAuth } = useAuth();
// Check if user is already authenticated
// Import mobile utilities for enhanced debugging
const { isMobileDevice, debugMobileLogin, runMobileDiagnostics } = await import('~/utils/mobile-utils');
// Check if user is already authenticated - with mobile-specific handling
if (user.value) {
await navigateTo('/dashboard');
const redirectUrl = '/dashboard';
if (isMobileDevice()) {
console.log('📱 Mobile browser detected, using delayed redirect');
debugMobileLogin('Already authenticated redirect');
setTimeout(() => {
window.location.href = redirectUrl;
}, 100);
} else {
await navigateTo(redirectUrl);
}
}
// Reactive data