@@ -4,8 +4,8 @@ import { Button } from '@/components/ui/button';
4
4
import { Input } from ' @/components/ui/input' ;
5
5
import { PinInput , PinInputGroup , PinInputSlot } from ' @/components/ui/pin-input' ;
6
6
import AuthLayout from ' @/layouts/AuthLayout.vue' ;
7
- import { Form , Head } from ' @inertiajs/vue3' ;
8
7
import { store } from ' @/routes/two-factor/login' ;
8
+ import { Form , Head } from ' @inertiajs/vue3' ;
9
9
import { computed , ref } from ' vue' ;
10
10
11
11
interface AuthConfigContent {
@@ -48,13 +48,7 @@ const codeValue = computed<string>(() => code.value.join(''));
48
48
49
49
<div class =" space-y-6" >
50
50
<template v-if =" ! showRecoveryInput " >
51
- <Form
52
- v-bind =" store.form()"
53
- class =" space-y-4"
54
- reset-on-error
55
- @error =" code = []"
56
- #default =" { errors, processing, clearErrors }"
57
- >
51
+ <Form v-bind =" store.form()" class =" space-y-4" reset-on-error @error =" code = []" #default =" { errors, processing, clearErrors }" >
58
52
<input type =" hidden" name =" code" :value =" codeValue" />
59
53
<div class =" flex flex-col items-center justify-center space-y-3 text-center" >
60
54
<div class =" flex w-full items-center justify-center" >
@@ -81,12 +75,7 @@ const codeValue = computed<string>(() => code.value.join(''));
81
75
</template >
82
76
83
77
<template v-else >
84
- <Form
85
- v-bind =" store.form()"
86
- class =" space-y-4"
87
- reset-on-error
88
- #default =" { errors, processing, clearErrors }"
89
- >
78
+ <Form v-bind =" store.form()" class =" space-y-4" reset-on-error #default =" { errors, processing, clearErrors }" >
90
79
<Input name =" recovery_code" type =" text" placeholder =" Enter recovery code" :autofocus =" showRecoveryInput" required />
91
80
<InputError :message =" errors.recovery_code" />
92
81
<Button type =" submit" class =" w-full" :disabled =" processing" >Continue</Button >
0 commit comments