diff --git a/frontend/public/auth-bg.png b/frontend/public/auth-bg.png new file mode 100644 index 0000000..a304a07 Binary files /dev/null and b/frontend/public/auth-bg.png differ diff --git a/frontend/src/App.vue b/frontend/src/App.vue index a87bc5b..faca183 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -16,7 +16,11 @@ const authStore = useAuthStore() const favoritesStore = useFavoritesStore() const isSplashScreen = computed(() => route.name === 'splash') -const isAuthScreen = computed(() => route.name === 'auth' || route.path === '/login') +const isAuthScreen = computed(() => { + const name = route.name?.toString().toLowerCase() || '' + const path = route.path.toLowerCase() + return name.includes('auth') || path.includes('/login') || path.includes('/register') +}) onMounted(() => { themeStore.applyTheme() diff --git a/frontend/src/components/auth/LoginForm.vue b/frontend/src/components/auth/LoginForm.vue index 693c0d9..aa5cb67 100644 --- a/frontend/src/components/auth/LoginForm.vue +++ b/frontend/src/components/auth/LoginForm.vue @@ -25,7 +25,6 @@ const handleLogin = async () => { try { await authStore.login(email.value.trim().toLowerCase(), password.value, keepSession.value) - // Al iniciar sesión, el store ya tiene el rol. Redirigir según corresponda. const role = (authStore.role || 'PASSENGER').toUpperCase() if (role === 'ADMIN') router.push('/admin') else if (role === 'DRIVER') router.push('/driver') @@ -46,252 +45,288 @@ const handleLogin = async () => { diff --git a/frontend/src/views/AuthView.vue b/frontend/src/views/AuthView.vue index d62f634..3c491f3 100644 --- a/frontend/src/views/AuthView.vue +++ b/frontend/src/views/AuthView.vue @@ -1,5 +1,5 @@ diff --git a/frontend/src/views/MapView.vue b/frontend/src/views/MapView.vue index 936fd53..5f5d6b4 100644 --- a/frontend/src/views/MapView.vue +++ b/frontend/src/views/MapView.vue @@ -341,7 +341,7 @@ function clearMapMarkers() { limpiarTodoCentralizado() // Tras limpiar todo, si tenemos ubicación de usuario, la restauramos // porque el marcador celestre sonar es un overlay que el centralizado elimina - if (userCoords.value && authStore.userProfile?.auto_location) { + if (userCoords.value) { reDrawUserMarker(); } }