Compare commits

..

1 Commits

Author SHA1 Message Date
cd3d7e816f Recuperar implementado 2026-02-27 10:08:30 -07:00
2 changed files with 8 additions and 7 deletions

View File

@@ -17,13 +17,13 @@
});
// Guard reactivo global: redirige a /login si no está autenticado en rutas protegidas
const publicRoutes = ['/login', '/register', '/forgot-password', '/reset-password'];
$: if (browser && mounted && !$auth.isAuthenticated &&
!$page.url.pathname.startsWith('/login') &&
!$page.url.pathname.startsWith('/register')) {
!publicRoutes.some(r => $page.url.pathname.startsWith(r))) {
goto('/login');
}
$: showHeader = !$page.url.pathname.startsWith('/login') && !$page.url.pathname.startsWith('/register');
$: showHeader = !publicRoutes.some(r => $page.url.pathname.startsWith(r));
</script>
<div class="min-h-screen bg-gray-50 font-sans">

View File

@@ -216,12 +216,13 @@
>Recordar en este equipo</label
>
</div>
<a
href="/forgot-password"
class="text-sm font-medium text-blue-600 hover:text-blue-500"
<button
type="button"
class="text-sm font-medium text-blue-600 hover:text-blue-500 bg-transparent border-none p-0 cursor-pointer"
on:click={() => goto('/forgot-password')}
>
Olvide mi clave
</a>
</button>
</div>
</div>
{:else}