You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.7 KiB

<script lang="ts">
import { goto } from '$app/navigation';
import { getNexoContext } from './_lib/context';
const nexo = getNexoContext();
// Landing is purely a router. The shell layout has already kicked
// off the `/api/session` probe; once it resolves we send the user
// to the right surface and never render content here. While the
// probe is in flight we show a minimal pulse so the page isn't
// blank during a slow network hop.
$effect(() => {
const session = nexo.session();
if (session === null) return;
if (!session.authenticated) {
void goto('/dating/login', { replaceState: true });
return;
}
if (session.profile === null || !session.profile.completed) {
void goto('/dating/onboarding', { replaceState: true });
return;
}
void goto('/dating/discover', { replaceState: true });
});
</script>
<div class="splash" role="status" aria-live="polite">
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="sr">Cargando Nexo…</span>
</div>
<style>
.splash {
display: flex;
gap: 0.4rem;
align-items: center;
justify-content: center;
min-height: 40vh;
}
.dot {
width: 8px;
height: 8px;
border-radius: 999px;
background: color-mix(in srgb, currentColor 60%, transparent);
animation: pulse 1.2s ease-in-out infinite;
}
.dot:nth-child(2) {
animation-delay: 0.2s;
}
.dot:nth-child(3) {
animation-delay: 0.4s;
}
.sr {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
@keyframes pulse {
0%,
80%,
100% {
transform: scale(0.6);
opacity: 0.4;
}
40% {
transform: scale(1);
opacity: 1;
}
}
</style>

Powered by TurnKey Linux.