.
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-04 15:10:29 +02:00
40 changed files with 1873 additions and 1688 deletions
+12 -10
View File
@@ -1,4 +1,5 @@
import { participationIdentity } from '@/lib/participation-identity';
import { useTempoUi } from '@/components/tempo-brand';
import { Form, Head } from '@inertiajs/react';
import InputError from '@/components/input-error';
import PasswordInput from '@/components/password-input';
@@ -15,9 +16,10 @@ type Props = {
};
export default function Register({ passwordRules }: Props) {
const { t } = useTempoUi();
return (
<>
<Head title="Criar conta" />
<Head title={t('Criar conta')} />
<Form
{...store.form()}
resetOnSuccess={['password', 'password_confirmation']}
@@ -28,7 +30,7 @@ export default function Register({ passwordRules }: Props) {
<>
<div className="grid gap-6">
<div className="grid gap-2">
<Label htmlFor="name">Nome</Label>
<Label htmlFor="name">{t('Nome')}</Label>
<Input
id="name"
defaultValue={participationIdentity().name}
@@ -37,7 +39,7 @@ export default function Register({ passwordRules }: Props) {
tabIndex={1}
autoComplete="name"
name="name"
placeholder="Nome completo"
placeholder={t('Nome completo')}
/>
<InputError
message={errors.name}
@@ -61,14 +63,14 @@ export default function Register({ passwordRules }: Props) {
</div>
<div className="grid gap-2">
<Label htmlFor="password">Palavra-passe</Label>
<Label htmlFor="password">{t('Palavra-passe')}</Label>
<PasswordInput
id="password"
required
tabIndex={3}
autoComplete="new-password"
name="password"
placeholder="Palavra-passe"
placeholder={t('Palavra-passe')}
passwordrules={passwordRules}
/>
<InputError message={errors.password} />
@@ -76,7 +78,7 @@ export default function Register({ passwordRules }: Props) {
<div className="grid gap-2">
<Label htmlFor="password_confirmation">
Confirmar palavra-passe
{t('Confirmar palavra-passe')}
</Label>
<PasswordInput
id="password_confirmation"
@@ -84,7 +86,7 @@ export default function Register({ passwordRules }: Props) {
tabIndex={4}
autoComplete="new-password"
name="password_confirmation"
placeholder="Confirmar palavra-passe"
placeholder={t('Confirmar palavra-passe')}
passwordrules={passwordRules}
/>
<InputError
@@ -99,14 +101,14 @@ export default function Register({ passwordRules }: Props) {
data-test="register-user-button"
>
{processing && <Spinner />}
Criar conta
{t('Criar conta')}
</Button>
</div>
<div className="text-muted-foreground text-center text-sm">
Já tem conta?{' '}
{t('Já tem conta?')}{' '}
<TextLink href={login()} tabIndex={6}>
Entrar
{t('Entrar')}
</TextLink>
</div>
</>