.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { participationIdentity } from '@/lib/participation-identity';
|
||||
import { useTempoUi } from '@/components/tempo-brand';
|
||||
import { Form, Head, usePage } from '@inertiajs/react';
|
||||
import InputError from '@/components/input-error';
|
||||
import PasswordInput from '@/components/password-input';
|
||||
@@ -24,11 +25,12 @@ type Props = {
|
||||
};
|
||||
|
||||
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 (
|
||||
<>
|
||||
<Head title="Entrar" />
|
||||
<Head title={t('Entrar')} />
|
||||
|
||||
{qaAccount && (
|
||||
<aside
|
||||
@@ -48,9 +50,9 @@ export default function Login({ status, canResetPassword, qaAccount }: Props) {
|
||||
|
||||
{/* @chisel-passkeys */}
|
||||
<PasskeyVerify
|
||||
label="Entrar com chave de acesso"
|
||||
loadingLabel="A autenticar…"
|
||||
separator="Ou continuar com email"
|
||||
label={t('Entrar com chave de acesso')}
|
||||
loadingLabel={t('A autenticar…')}
|
||||
separator={t('Ou continuar com email')}
|
||||
/>
|
||||
{/* @end-chisel-passkeys */}
|
||||
|
||||
@@ -85,7 +87,7 @@ export default function Login({ status, canResetPassword, qaAccount }: Props) {
|
||||
<div className="grid gap-2">
|
||||
<div className="flex items-center">
|
||||
<Label htmlFor="password">
|
||||
Palavra-passe
|
||||
{t('Palavra-passe')}
|
||||
</Label>
|
||||
{canResetPassword && (
|
||||
<TextLink
|
||||
@@ -93,7 +95,7 @@ export default function Login({ status, canResetPassword, qaAccount }: Props) {
|
||||
className="ml-auto text-sm"
|
||||
tabIndex={5}
|
||||
>
|
||||
Esqueceu a palavra-passe?
|
||||
{t('Esqueceu a palavra-passe?')}
|
||||
</TextLink>
|
||||
)}
|
||||
</div>
|
||||
@@ -103,7 +105,7 @@ export default function Login({ status, canResetPassword, qaAccount }: Props) {
|
||||
required
|
||||
tabIndex={2}
|
||||
autoComplete="current-password"
|
||||
placeholder="Palavra-passe"
|
||||
placeholder={t('Palavra-passe')}
|
||||
/>
|
||||
<InputError message={errors.password} />
|
||||
</div>
|
||||
@@ -115,7 +117,7 @@ export default function Login({ status, canResetPassword, qaAccount }: Props) {
|
||||
tabIndex={3}
|
||||
/>
|
||||
<Label htmlFor="remember">
|
||||
Manter sessão iniciada
|
||||
{t('Manter sessão iniciada')}
|
||||
</Label>
|
||||
</div>
|
||||
|
||||
@@ -127,15 +129,15 @@ export default function Login({ status, canResetPassword, qaAccount }: Props) {
|
||||
data-test="login-button"
|
||||
>
|
||||
{processing && <Spinner />}
|
||||
Entrar
|
||||
{t('Entrar')}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{/* @chisel-registration */}
|
||||
<div className="text-muted-foreground text-center text-sm">
|
||||
Ainda não tem conta?{' '}
|
||||
{t('Ainda não tem conta?')}{' '}
|
||||
<TextLink href={register()} tabIndex={5}>
|
||||
Criar conta
|
||||
{t('Criar conta')}
|
||||
</TextLink>
|
||||
</div>
|
||||
{/* @end-chisel-registration */}
|
||||
|
||||
Reference in New Issue
Block a user