adata-ui 2.0.28 → 2.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nuxtrc +1 -1
- package/.playground/app.config.ts +5 -5
- package/README.md +75 -75
- package/components/elements/README.md +1 -1
- package/components/forms/README.md +1 -1
- package/components/modals/AConfirmationEmail.vue +40 -40
- package/components/modals/Resend.vue +81 -81
- package/components/modals/id/IdConfirmAccountOtpModal.vue +77 -40
- package/components/modals/id/IdConfirmSuccessfulModal.vue +7 -2
- package/components/modals/id/IdLoginModal.vue +45 -128
- package/components/modals/id/IdModals.vue +6 -2
- package/components/modals/id/IdNewPasswordModal.vue +7 -5
- package/components/modals/{two-factor/otp-input.vue → id/IdOtpInput.vue} +14 -2
- package/components/modals/id/IdRegistrationModal.vue +22 -21
- package/components/modals/id/IdResetPasswordOtpModal.vue +27 -28
- package/components/modals/id/IdTwoFactorModal.vue +122 -0
- package/components/navigation/README.md +1 -1
- package/components/overlays/README.md +1 -1
- package/icons/google.vue +41 -41
- package/icons/linkedin.vue +24 -24
- package/icons/mailru.vue +34 -34
- package/icons/sun.vue +14 -14
- package/icons/yandex.vue +28 -28
- package/lang/en.ts +351 -330
- package/lang/kk.ts +352 -331
- package/lang/ru.ts +42 -66
- package/layouts/default.vue +13 -13
- package/package.json +1 -1
- package/components/modals/two-factor/two-factor.vue +0 -79
package/.nuxtrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
typescript.includeWorkspace = true
|
|
1
|
+
typescript.includeWorkspace = true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export default defineAppConfig({
|
|
2
|
-
myLayer: {
|
|
3
|
-
name: 'My amazing Nuxt layer (overwritten)'
|
|
4
|
-
}
|
|
5
|
-
})
|
|
1
|
+
export default defineAppConfig({
|
|
2
|
+
myLayer: {
|
|
3
|
+
name: 'My amazing Nuxt layer (overwritten)'
|
|
4
|
+
}
|
|
5
|
+
})
|
package/README.md
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
# Adata UI with Nuxt 3 using Layers
|
|
2
|
-
|
|
3
|
-
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
|
4
|
-
|
|
5
|
-
## Setup
|
|
6
|
-
|
|
7
|
-
Make sure to install the dependencies:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
# npm
|
|
11
|
-
npm install
|
|
12
|
-
|
|
13
|
-
# pnpm
|
|
14
|
-
pnpm install
|
|
15
|
-
|
|
16
|
-
# yarn
|
|
17
|
-
yarn install
|
|
18
|
-
|
|
19
|
-
# bun
|
|
20
|
-
bun install
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Development Server
|
|
24
|
-
|
|
25
|
-
Start the development server on `https://localhost:3000`:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
# npm
|
|
29
|
-
npm run dev
|
|
30
|
-
|
|
31
|
-
# pnpm
|
|
32
|
-
pnpm run dev
|
|
33
|
-
|
|
34
|
-
# yarn
|
|
35
|
-
yarn dev
|
|
36
|
-
|
|
37
|
-
# bun
|
|
38
|
-
bun run dev
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Production
|
|
42
|
-
|
|
43
|
-
Build the application for production:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
# npm
|
|
47
|
-
npm run build
|
|
48
|
-
|
|
49
|
-
# pnpm
|
|
50
|
-
pnpm run build
|
|
51
|
-
|
|
52
|
-
# yarn
|
|
53
|
-
yarn build
|
|
54
|
-
|
|
55
|
-
# bun
|
|
56
|
-
bun run build
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Locally preview production build:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
# npm
|
|
63
|
-
npm run preview
|
|
64
|
-
|
|
65
|
-
# pnpm
|
|
66
|
-
pnpm run preview
|
|
67
|
-
|
|
68
|
-
# yarn
|
|
69
|
-
yarn preview
|
|
70
|
-
|
|
71
|
-
# bun
|
|
72
|
-
bun run preview
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
|
1
|
+
# Adata UI with Nuxt 3 using Layers
|
|
2
|
+
|
|
3
|
+
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
Make sure to install the dependencies:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# npm
|
|
11
|
+
npm install
|
|
12
|
+
|
|
13
|
+
# pnpm
|
|
14
|
+
pnpm install
|
|
15
|
+
|
|
16
|
+
# yarn
|
|
17
|
+
yarn install
|
|
18
|
+
|
|
19
|
+
# bun
|
|
20
|
+
bun install
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Development Server
|
|
24
|
+
|
|
25
|
+
Start the development server on `https://localhost:3000`:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# npm
|
|
29
|
+
npm run dev
|
|
30
|
+
|
|
31
|
+
# pnpm
|
|
32
|
+
pnpm run dev
|
|
33
|
+
|
|
34
|
+
# yarn
|
|
35
|
+
yarn dev
|
|
36
|
+
|
|
37
|
+
# bun
|
|
38
|
+
bun run dev
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Production
|
|
42
|
+
|
|
43
|
+
Build the application for production:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# npm
|
|
47
|
+
npm run build
|
|
48
|
+
|
|
49
|
+
# pnpm
|
|
50
|
+
pnpm run build
|
|
51
|
+
|
|
52
|
+
# yarn
|
|
53
|
+
yarn build
|
|
54
|
+
|
|
55
|
+
# bun
|
|
56
|
+
bun run build
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Locally preview production build:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# npm
|
|
63
|
+
npm run preview
|
|
64
|
+
|
|
65
|
+
# pnpm
|
|
66
|
+
pnpm run preview
|
|
67
|
+
|
|
68
|
+
# yarn
|
|
69
|
+
yarn preview
|
|
70
|
+
|
|
71
|
+
# bun
|
|
72
|
+
bun run preview
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
# button, alerts, dropdown
|
|
1
|
+
# button, alerts, dropdown
|
|
@@ -1 +1 @@
|
|
|
1
|
-
# inputs
|
|
1
|
+
# inputs
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
const emit = defineEmits<{
|
|
3
|
-
(e: 'resend'): void
|
|
4
|
-
(e: 'close'): void
|
|
5
|
-
}>()
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<template>
|
|
9
|
-
<div class="flex flex-col justify-center items-center gap-5">
|
|
10
|
-
<p class="heading-02">
|
|
11
|
-
{{ $t('login.modal.title') }}
|
|
12
|
-
</p>
|
|
13
|
-
<a-ill-mail />
|
|
14
|
-
<p class="body-400 text-center">
|
|
15
|
-
{{ $t('login.modal.subtitle1') }}
|
|
16
|
-
</p>
|
|
17
|
-
<p class="body-400 text-center">
|
|
18
|
-
{{ $t('login.modal.confirmationEmail') }}
|
|
19
|
-
</p>
|
|
20
|
-
<div class="flex flex-col gap-2 w-full">
|
|
21
|
-
<a-button
|
|
22
|
-
class="w-full"
|
|
23
|
-
view="outline"
|
|
24
|
-
@click="emit('close')"
|
|
25
|
-
>
|
|
26
|
-
{{ $t('login.modal.back') }}
|
|
27
|
-
</a-button>
|
|
28
|
-
<a-button
|
|
29
|
-
class="w-full"
|
|
30
|
-
@click="emit('resend')"
|
|
31
|
-
>
|
|
32
|
-
{{ $t('login.modal.resend') }}
|
|
33
|
-
</a-button>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
37
|
-
|
|
38
|
-
<style scoped>
|
|
39
|
-
|
|
40
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const emit = defineEmits<{
|
|
3
|
+
(e: 'resend'): void
|
|
4
|
+
(e: 'close'): void
|
|
5
|
+
}>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<div class="flex flex-col justify-center items-center gap-5">
|
|
10
|
+
<p class="heading-02">
|
|
11
|
+
{{ $t('login.modal.title') }}
|
|
12
|
+
</p>
|
|
13
|
+
<a-ill-mail />
|
|
14
|
+
<p class="body-400 text-center">
|
|
15
|
+
{{ $t('login.modal.subtitle1') }}
|
|
16
|
+
</p>
|
|
17
|
+
<p class="body-400 text-center">
|
|
18
|
+
{{ $t('login.modal.confirmationEmail') }}
|
|
19
|
+
</p>
|
|
20
|
+
<div class="flex flex-col gap-2 w-full">
|
|
21
|
+
<a-button
|
|
22
|
+
class="w-full"
|
|
23
|
+
view="outline"
|
|
24
|
+
@click="emit('close')"
|
|
25
|
+
>
|
|
26
|
+
{{ $t('login.modal.back') }}
|
|
27
|
+
</a-button>
|
|
28
|
+
<a-button
|
|
29
|
+
class="w-full"
|
|
30
|
+
@click="emit('resend')"
|
|
31
|
+
>
|
|
32
|
+
{{ $t('login.modal.resend') }}
|
|
33
|
+
</a-button>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<style scoped>
|
|
39
|
+
|
|
40
|
+
</style>
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
|
|
3
|
-
const emit = defineEmits<{
|
|
4
|
-
(e: 'resend'): void
|
|
5
|
-
(e: 'close'): void
|
|
6
|
-
}>()
|
|
7
|
-
|
|
8
|
-
const timer = ref(60)
|
|
9
|
-
const isResend = ref(false)
|
|
10
|
-
const route = useRoute()
|
|
11
|
-
const appConfig = useAppConfig()
|
|
12
|
-
const landingUrl = appConfig.myLayer.landingUrl
|
|
13
|
-
|
|
14
|
-
function runTimer() {
|
|
15
|
-
timer.value = 60
|
|
16
|
-
const intervalId = setInterval(() => {
|
|
17
|
-
if (timer.value <= 0) {
|
|
18
|
-
isResend.value = true
|
|
19
|
-
clearInterval(intervalId);
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
timer.value--;
|
|
23
|
-
}, 1000);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
onMounted(() => resend())
|
|
27
|
-
|
|
28
|
-
const resend = () => {
|
|
29
|
-
isResend.value = false
|
|
30
|
-
runTimer()
|
|
31
|
-
emit('resend')
|
|
32
|
-
}
|
|
33
|
-
const goToMain = () => {
|
|
34
|
-
if (route.query.url) {
|
|
35
|
-
document.location.replace(route.query.url)
|
|
36
|
-
} else {
|
|
37
|
-
document.location.replace(landingUrl)
|
|
38
|
-
}
|
|
39
|
-
emit('close')
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<template>
|
|
45
|
-
<div class="flex flex-col justify-center items-center gap-5">
|
|
46
|
-
<p class="heading-02">
|
|
47
|
-
{{ $t('login.modal.title') }}
|
|
48
|
-
</p>
|
|
49
|
-
<a-ill-mail />
|
|
50
|
-
<p class="body-400 text-center">
|
|
51
|
-
{{ $t('login.modal.subtitle1') }}
|
|
52
|
-
</p>
|
|
53
|
-
<p class="body-400 text-center">
|
|
54
|
-
{{ $t('login.modal.subtitle2') }}
|
|
55
|
-
</p>
|
|
56
|
-
<p
|
|
57
|
-
v-if="!isResend"
|
|
58
|
-
class="heading-02"
|
|
59
|
-
>
|
|
60
|
-
{{ timer }} {{ $t('login.modal.seconds') }}
|
|
61
|
-
</p>
|
|
62
|
-
<a-button
|
|
63
|
-
v-else
|
|
64
|
-
class="w-full"
|
|
65
|
-
view="outline"
|
|
66
|
-
@click="resend"
|
|
67
|
-
>
|
|
68
|
-
{{ $t('login.modal.resend') }}
|
|
69
|
-
</a-button>
|
|
70
|
-
<a-button
|
|
71
|
-
class="w-full"
|
|
72
|
-
@click="goToMain"
|
|
73
|
-
>
|
|
74
|
-
{{ $t('login.modal.back') }}
|
|
75
|
-
</a-button>
|
|
76
|
-
</div>
|
|
77
|
-
</template>
|
|
78
|
-
|
|
79
|
-
<style scoped>
|
|
80
|
-
|
|
81
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
|
|
3
|
+
const emit = defineEmits<{
|
|
4
|
+
(e: 'resend'): void
|
|
5
|
+
(e: 'close'): void
|
|
6
|
+
}>()
|
|
7
|
+
|
|
8
|
+
const timer = ref(60)
|
|
9
|
+
const isResend = ref(false)
|
|
10
|
+
const route = useRoute()
|
|
11
|
+
const appConfig = useAppConfig()
|
|
12
|
+
const landingUrl = appConfig.myLayer.landingUrl
|
|
13
|
+
|
|
14
|
+
function runTimer() {
|
|
15
|
+
timer.value = 60
|
|
16
|
+
const intervalId = setInterval(() => {
|
|
17
|
+
if (timer.value <= 0) {
|
|
18
|
+
isResend.value = true
|
|
19
|
+
clearInterval(intervalId);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
timer.value--;
|
|
23
|
+
}, 1000);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
onMounted(() => resend())
|
|
27
|
+
|
|
28
|
+
const resend = () => {
|
|
29
|
+
isResend.value = false
|
|
30
|
+
runTimer()
|
|
31
|
+
emit('resend')
|
|
32
|
+
}
|
|
33
|
+
const goToMain = () => {
|
|
34
|
+
if (route.query.url) {
|
|
35
|
+
document.location.replace(route.query.url)
|
|
36
|
+
} else {
|
|
37
|
+
document.location.replace(landingUrl)
|
|
38
|
+
}
|
|
39
|
+
emit('close')
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<div class="flex flex-col justify-center items-center gap-5">
|
|
46
|
+
<p class="heading-02">
|
|
47
|
+
{{ $t('login.modal.title') }}
|
|
48
|
+
</p>
|
|
49
|
+
<a-ill-mail />
|
|
50
|
+
<p class="body-400 text-center">
|
|
51
|
+
{{ $t('login.modal.subtitle1') }}
|
|
52
|
+
</p>
|
|
53
|
+
<p class="body-400 text-center">
|
|
54
|
+
{{ $t('login.modal.subtitle2') }}
|
|
55
|
+
</p>
|
|
56
|
+
<p
|
|
57
|
+
v-if="!isResend"
|
|
58
|
+
class="heading-02"
|
|
59
|
+
>
|
|
60
|
+
{{ timer }} {{ $t('login.modal.seconds') }}
|
|
61
|
+
</p>
|
|
62
|
+
<a-button
|
|
63
|
+
v-else
|
|
64
|
+
class="w-full"
|
|
65
|
+
view="outline"
|
|
66
|
+
@click="resend"
|
|
67
|
+
>
|
|
68
|
+
{{ $t('login.modal.resend') }}
|
|
69
|
+
</a-button>
|
|
70
|
+
<a-button
|
|
71
|
+
class="w-full"
|
|
72
|
+
@click="goToMain"
|
|
73
|
+
>
|
|
74
|
+
{{ $t('login.modal.back') }}
|
|
75
|
+
</a-button>
|
|
76
|
+
</div>
|
|
77
|
+
</template>
|
|
78
|
+
|
|
79
|
+
<style scoped>
|
|
80
|
+
|
|
81
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
2
|
+
import IdOtpInput from '#adata-ui/components/modals/id/IdOtpInput.vue'
|
|
3
3
|
import { useAuthStore } from '#adata-ui/stores/auth.store'
|
|
4
4
|
|
|
5
5
|
const { $toast } = useNuxtApp()
|
|
@@ -20,22 +20,39 @@ const otpFormatted = computed(() => {
|
|
|
20
20
|
const showError = ref(false)
|
|
21
21
|
const isLoading = ref(false)
|
|
22
22
|
|
|
23
|
-
async function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
async function loginUser() {
|
|
24
|
+
const login = await fetch(`${authApiURL}/login`, {
|
|
25
|
+
method: 'POST',
|
|
26
|
+
credentials: 'include',
|
|
27
|
+
headers: {
|
|
28
|
+
'Content-Type': 'application/json',
|
|
29
|
+
'lang': locale.value,
|
|
30
|
+
},
|
|
31
|
+
body: JSON.stringify({
|
|
32
|
+
username: intermediateState.value.email,
|
|
33
|
+
password: intermediateState.value.password,
|
|
34
|
+
}),
|
|
35
|
+
})
|
|
36
|
+
await login.json().catch(() => ({}))
|
|
37
|
+
|
|
38
|
+
const response = await fetch(`${authApiURL}/access/cookie`, {
|
|
39
|
+
method: 'GET',
|
|
40
|
+
credentials: 'include',
|
|
41
|
+
headers: {
|
|
42
|
+
lang: locale.value,
|
|
43
|
+
},
|
|
44
|
+
})
|
|
45
|
+
const { data: cookiesData } = await response.json()
|
|
46
|
+
if (cookiesData) {
|
|
47
|
+
const { access_token, expire_in } = cookiesData
|
|
48
|
+
const hostname = location.hostname.split('.').reverse()
|
|
49
|
+
|
|
50
|
+
useCookie('accessToken', {
|
|
51
|
+
maxAge: expire_in,
|
|
52
|
+
domain: `.${hostname[1]}.${hostname[0]}`,
|
|
53
|
+
path: '/',
|
|
54
|
+
secure: true,
|
|
55
|
+
}).value = access_token
|
|
39
56
|
}
|
|
40
57
|
}
|
|
41
58
|
|
|
@@ -55,27 +72,53 @@ async function onConfirm() {
|
|
|
55
72
|
},
|
|
56
73
|
})
|
|
57
74
|
|
|
75
|
+
await loginUser()
|
|
76
|
+
|
|
58
77
|
confirmAccountOtpModal.value = false
|
|
59
78
|
confirmSuccessfulModal.value = true
|
|
60
79
|
}
|
|
61
80
|
catch (error) {
|
|
62
81
|
showError.value = true
|
|
63
|
-
$toast.error(error.data.message)
|
|
64
82
|
}
|
|
65
83
|
finally {
|
|
66
84
|
isLoading.value = false
|
|
67
85
|
}
|
|
68
86
|
}
|
|
69
87
|
|
|
70
|
-
function
|
|
88
|
+
function resetOtp() {
|
|
71
89
|
otp.value = ['', '', '', '', '', '']
|
|
72
90
|
showError.value = false
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function onClose() {
|
|
94
|
+
resetOtp()
|
|
73
95
|
confirmAccountOtpModal.value = false
|
|
74
96
|
}
|
|
75
97
|
|
|
98
|
+
async function onResend() {
|
|
99
|
+
try {
|
|
100
|
+
await $fetch(`${authApiURL}/email/resend-otp`, {
|
|
101
|
+
method: 'GET',
|
|
102
|
+
credentials: 'include',
|
|
103
|
+
headers: {
|
|
104
|
+
lang: locale.value,
|
|
105
|
+
},
|
|
106
|
+
params: {
|
|
107
|
+
email: intermediateState.value.email,
|
|
108
|
+
},
|
|
109
|
+
})
|
|
110
|
+
resetOtp()
|
|
111
|
+
runTimer()
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
$toast.error(error.data)
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
76
118
|
const timer = ref(60)
|
|
77
119
|
|
|
78
120
|
function runTimer() {
|
|
121
|
+
timer.value = 60
|
|
79
122
|
const intervalId = setInterval(() => {
|
|
80
123
|
if (!timer.value) clearInterval(intervalId)
|
|
81
124
|
return timer.value--
|
|
@@ -101,7 +144,7 @@ onBeforeUnmount(() => {
|
|
|
101
144
|
<template>
|
|
102
145
|
<div class="flex flex-col items-center gap-4 text-center">
|
|
103
146
|
<h2 class="text-2xl font-bold">
|
|
104
|
-
{{ t('
|
|
147
|
+
{{ t('modals.id.confirmAccount.title') }}
|
|
105
148
|
</h2>
|
|
106
149
|
|
|
107
150
|
<a-icon-hand-with-phone-light class="size-32 dark:hidden" />
|
|
@@ -113,7 +156,7 @@ onBeforeUnmount(() => {
|
|
|
113
156
|
</p>
|
|
114
157
|
|
|
115
158
|
<div v-if="timer > 0" class="text-2xl font-bold">
|
|
116
|
-
{{ timer }} {{ t('
|
|
159
|
+
{{ timer }} {{ t('modals.id.resetPasswordOtp.seconds') }}
|
|
117
160
|
</div>
|
|
118
161
|
<button
|
|
119
162
|
v-else
|
|
@@ -124,24 +167,18 @@ onBeforeUnmount(() => {
|
|
|
124
167
|
</button>
|
|
125
168
|
</div>
|
|
126
169
|
|
|
127
|
-
<otp-input
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
:disabled="otpFormatted.length < 6"
|
|
141
|
-
@click="onConfirm"
|
|
142
|
-
>
|
|
143
|
-
{{ t('actions.confirm') }}
|
|
144
|
-
</a-button>
|
|
145
|
-
</div>
|
|
170
|
+
<id-otp-input
|
|
171
|
+
v-model="otp"
|
|
172
|
+
v-model:error="showError"
|
|
173
|
+
@on-completed="onConfirm"
|
|
174
|
+
/>
|
|
175
|
+
|
|
176
|
+
<a-button
|
|
177
|
+
block
|
|
178
|
+
view="outline"
|
|
179
|
+
@click="onClose"
|
|
180
|
+
>
|
|
181
|
+
{{ t('actions.close') }}
|
|
182
|
+
</a-button>
|
|
146
183
|
</div>
|
|
147
184
|
</template>
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
const { confirmSuccessfulModal } = useIdModals()
|
|
3
2
|
const { t } = useI18n()
|
|
3
|
+
const { confirmSuccessfulModal } = useIdModals()
|
|
4
|
+
|
|
5
|
+
function onClose() {
|
|
6
|
+
confirmSuccessfulModal.value = false
|
|
7
|
+
window.location.reload()
|
|
8
|
+
}
|
|
4
9
|
</script>
|
|
5
10
|
|
|
6
11
|
<template>
|
|
@@ -14,7 +19,7 @@ const { t } = useI18n()
|
|
|
14
19
|
<p class="text-sm">
|
|
15
20
|
{{ t('modals.id.confirmSuccessful.content') }}
|
|
16
21
|
</p>
|
|
17
|
-
<a-button view="outline" @click="
|
|
22
|
+
<a-button view="outline" @click="onClose">
|
|
18
23
|
{{ t('actions.close') }}
|
|
19
24
|
</a-button>
|
|
20
25
|
</div>
|