Two month of work

This commit is contained in:
2026-02-17 10:35:03 +01:00
parent 0ffbeeedff
commit d9fd3d1ccb
158 changed files with 5637 additions and 1512 deletions
+21 -26
View File
@@ -17,16 +17,16 @@ interface AuthConfigContent {
const authConfigContent = computed<AuthConfigContent>(() => {
if (showRecoveryInput.value) {
return {
title: 'Recovery Code',
description: 'Please confirm access to your account by entering one of your emergency recovery codes.',
toggleText: 'login using an authentication code',
title: 'Wiederherstellungscode',
description: 'Bitte bestätige den Zugriff auf Dein Konto, indem Du einen Deiner Notfall-Wiederherstellungscodes eingeben.',
toggleText: 'mit Authentifizierungscode anmelden',
};
}
return {
title: 'Authentication Code',
description: 'Enter the authentication code provided by your authenticator application.',
toggleText: 'login using a recovery code',
description: 'Bitte gib das Einmalkennwort aus Deiner Authentifizierungs-App ein.',
toggleText: 'mit einem Wiederherstellungscode anmelden',
};
});
@@ -44,51 +44,46 @@ const codeValue = computed<string>(() => code.value.join(''));
<template>
<AuthLayout :title="authConfigContent.title" :description="authConfigContent.description">
<Head title="Two-Factor Authentication" />
<div class="space-y-6">
<template v-if="!showRecoveryInput">
<Form v-bind="store.form()" class="space-y-4" reset-on-error @error="code = []" #default="{ errors, processing, clearErrors }">
<Form v-bind="store.form()" class="space-y-4" reset-on-error @error="code = []"
#default="{ errors, processing, clearErrors }">
<input type="hidden" name="code" :value="codeValue" />
<div class="flex flex-col items-center justify-center space-y-3 text-center">
<div class="flex w-full items-center justify-center">
<PinInput id="otp" placeholder="" v-model="code" type="number" otp>
<PinInput id="otp" placeholder="" v-model="code" type="number" otp>
<PinInputGroup>
<PinInputSlot v-for="(id, index) in 6" :key="id" :index="index" :disabled="processing" autofocus />
<PinInputSlot v-for="(id, index) in 6" :key="id" :index="index"
:disabled="processing" autofocus class="bg-background" />
</PinInputGroup>
</PinInput>
</div>
<InputError :message="errors.code" />
</div>
<Button type="submit" class="w-full" :disabled="processing">Continue</Button>
<Button type="submit" variant="action" class="w-full" :disabled="processing">Weiter</Button>
<div class="text-center text-sm text-muted-foreground">
<span>or you can </span>
<button
type="button"
class="text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500"
@click="() => toggleRecoveryMode(clearErrors)"
>
<Button type="button" variant="link" @click="() => toggleRecoveryMode(clearErrors)">
{{ authConfigContent.toggleText }}
</button>
</Button>
</div>
</Form>
</template>
<template v-else>
<Form v-bind="store.form()" class="space-y-4" reset-on-error #default="{ errors, processing, clearErrors }">
<Input name="recovery_code" type="text" placeholder="Enter recovery code" :autofocus="showRecoveryInput" required />
<Form v-bind="store.form()" class="space-y-4" reset-on-error
#default="{ errors, processing, clearErrors }">
<Input name="recovery_code" type="text" placeholder="Enter recovery code"
:autofocus="showRecoveryInput" required />
<InputError :message="errors.recovery_code" />
<Button type="submit" class="w-full" :disabled="processing">Continue</Button>
<Button type="submit" class="w-full" :disabled="processing">Weiter</Button>
<div class="text-center text-sm text-muted-foreground">
<span>or you can </span>
<button
type="button"
class="text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500"
@click="() => toggleRecoveryMode(clearErrors)"
>
<Button type="button" variant="link" @click="() => toggleRecoveryMode(clearErrors)">
{{ authConfigContent.toggleText }}
</button>
</Button>
</div>
</Form>
</template>