import { participationIdentity } from '@/lib/participation-identity'; import { useTempoUi } from '@/components/tempo-brand'; import { Form, Head, usePage } from '@inertiajs/react'; import { Check, LogIn } from 'lucide-react'; import InputError from '@/components/input-error'; import PasswordInput from '@/components/password-input'; import TextLink from '@/components/text-link'; import { Button } from '@/components/ui/button'; import { Checkbox } from '@/components/ui/checkbox'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Spinner } from '@/components/ui/spinner'; /* @chisel-registration */ import { register } from '@/routes'; /* @end-chisel-registration */ import { store } from '@/routes/login'; import { request } from '@/routes/password'; /* @chisel-passkeys */ import PasskeyVerify from '@/components/passkey-verify'; /* @end-chisel-passkeys */ type Props = { status?: string; canResetPassword: boolean; qaAccount?: { id: number; email: string }; }; const controlClass = 'h-auto rounded-xl border-slate-300 bg-white px-3.5 py-3 text-sm text-slate-900 shadow-sm placeholder:text-slate-400 hover:border-slate-400 focus-visible:border-[#ed1c24] focus-visible:ring-4 focus-visible:ring-[#ed1c24]/10'; const labelClass = 'mb-1.5 block text-xs leading-normal font-bold text-slate-800'; const inlineLabelClass = 'block text-xs leading-normal font-bold text-slate-800'; export default function Login({ status, canResetPassword, qaAccount }: Props) { const { t } = useTempoUi(); // A redirect from another page (e.g. MFA) creates a new Form with empty local errors. const pageErrors = usePage<{ errors: { email?: string } }>().props.errors; return ( <>
Tempo
{t('Área reservada')}

{t('Entrar na sua conta')}

{t('Aceda à sua conta Tempo.')}

{qaAccount && ( )} {status && (
{status}
)} {/* @chisel-passkeys */} {/* @end-chisel-passkeys */}
{({ processing, errors }) => ( <>
{canResetPassword && ( {t( 'Esqueceu a palavra-passe?', )} )}
)}
{/* @chisel-registration */}
{t('Ainda não tem conta?')}{' '} {t('Criar conta')}
{/* @end-chisel-registration */}
); } Login.layout = { variant: 'tempo-card', title: 'Entrar na sua conta', description: 'Aceda à sua conta Tempo.', };