adata-ui 2.0.38 → 2.0.40
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/app.config.ts +1 -0
- package/components/elements/README.md +1 -1
- package/components/features/payment/banner/PaymentBanner.vue +69 -0
- package/components/features/payment/process/PaymentKaspiQrSidePanel.vue +158 -0
- package/components/features/payment/process/PaymentKaspiRedirectSidePanel.vue +112 -0
- package/components/features/payment/process/PaymentMethodSidePanel.vue +117 -0
- package/components/features/payment/process/PaymentProcess.vue +136 -0
- package/components/features/payment/process/PaymentTopUpSidePanel.vue +113 -0
- package/components/forms/README.md +1 -1
- package/components/modals/AConfirmationEmail.vue +40 -40
- package/components/modals/ContentNavigationModal.vue +5 -5
- package/components/modals/Resend.vue +81 -81
- package/components/modals/id/IdBanner.vue +58 -0
- package/components/modals/id/IdConfirmAccountOtpModal.vue +2 -6
- package/components/modals/id/IdLoginModal.vue +2 -6
- package/components/modals/id/IdModals.vue +1 -1
- package/components/modals/id/IdNewPasswordModal.vue +2 -6
- package/components/modals/id/IdRecoveryModal.vue +2 -6
- package/components/modals/id/IdRegistrationModal.vue +2 -8
- package/components/modals/id/IdResetPasswordOtpModal.vue +2 -6
- package/components/modals/id/IdTwoFactorModal.vue +2 -6
- package/components/navigation/README.md +1 -1
- package/components/overlays/README.md +1 -1
- package/components/overlays/side-panel/ASidePanel.vue +439 -0
- package/composables/useBuyTariffs.ts +91 -91
- package/composables/useHeaderNavigationLinks.ts +12 -12
- package/composables/useIdModals.ts +8 -0
- package/composables/usePayment.ts +72 -0
- package/icons/google.vue +41 -41
- package/icons/kaspi-qr.vue +13 -0
- 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 +46 -0
- package/lang/kk.ts +46 -0
- package/lang/ru.ts +46 -0
- package/layouts/default.vue +13 -13
- package/nuxt.config.ts +13 -1
- package/package.json +5 -5
- package/public/kaspi/logo.svg +4 -0
- package/stores/auth.store.ts +0 -12
- /package/components/{modals/id/helpers → utils}/removeTrailingSlash.ts +0 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import PaymentTopUpSidePanel from '#adata-ui/components/features/payment/process/PaymentTopUpSidePanel.vue'
|
|
3
|
+
import PaymentMethodSidePanel from '#adata-ui/components/features/payment/process/PaymentMethodSidePanel.vue'
|
|
4
|
+
import PaymentKaspiQrSidePanel from '#adata-ui/components/features/payment/process/PaymentKaspiQrSidePanel.vue'
|
|
5
|
+
import PaymentKaspiRedirectSidePanel from '#adata-ui/components/features/payment/process/PaymentKaspiRedirectSidePanel.vue'
|
|
6
|
+
import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
|
|
7
|
+
|
|
8
|
+
const { $toast } = useNuxtApp()
|
|
9
|
+
const { locale } = useI18n()
|
|
10
|
+
const { commonAuth } = useAppConfig()
|
|
11
|
+
const accessToken = useCookie('accessToken')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
topUpSidePanel,
|
|
15
|
+
methodSidePanel,
|
|
16
|
+
kaspiQRSidePanel,
|
|
17
|
+
kaspiRedirectSidePanel,
|
|
18
|
+
payByCard
|
|
19
|
+
} = usePayment()
|
|
20
|
+
|
|
21
|
+
const userApiURL = commonAuth.userApiURL
|
|
22
|
+
|
|
23
|
+
const paymentSum = ref(0)
|
|
24
|
+
const requestUrl = ref('')
|
|
25
|
+
const requestId = ref<number | null>(null)
|
|
26
|
+
|
|
27
|
+
function actionPayment(num: number) {
|
|
28
|
+
paymentSum.value = num
|
|
29
|
+
topUpSidePanel.value = false
|
|
30
|
+
methodSidePanel.value = true
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function toggleKaspiSidePanel(state: boolean) {
|
|
34
|
+
if (window.innerWidth >= 1024) {
|
|
35
|
+
kaspiQRSidePanel.value = state
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
kaspiRedirectSidePanel.value = state
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function onBack(type: 'method' | 'kaspi') {
|
|
43
|
+
if (type === 'method') {
|
|
44
|
+
topUpSidePanel.value = true
|
|
45
|
+
methodSidePanel.value = false
|
|
46
|
+
}
|
|
47
|
+
else if (type === 'kaspi') {
|
|
48
|
+
toggleKaspiSidePanel(false)
|
|
49
|
+
methodSidePanel.value = true
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function directionsBanks(bank: 'kaspi' | 'other', sum: number) {
|
|
54
|
+
methodSidePanel.value = false
|
|
55
|
+
if (bank === 'kaspi') {
|
|
56
|
+
try {
|
|
57
|
+
const { data } = await $fetch(`${removeTrailingSlash(userApiURL)}/user/kaspi-balance/request`, {
|
|
58
|
+
method: 'POST',
|
|
59
|
+
credentials: 'include',
|
|
60
|
+
headers: {
|
|
61
|
+
Authorization: `Bearer ${accessToken.value}`,
|
|
62
|
+
lang: locale.value,
|
|
63
|
+
},
|
|
64
|
+
params: {
|
|
65
|
+
amount: sum,
|
|
66
|
+
initial: 1,
|
|
67
|
+
},
|
|
68
|
+
})
|
|
69
|
+
requestId.value = data.request_id
|
|
70
|
+
requestUrl.value = `https://kaspi.kz/pay/adata?service_id=5964&9507=${data.request_id}`
|
|
71
|
+
toggleKaspiSidePanel(true)
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
console.error(error)
|
|
75
|
+
$toast.error(error.data.message)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else if (bank === 'other') {
|
|
79
|
+
await payByCard(sum)
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
async function updateUserRate() {
|
|
84
|
+
try {
|
|
85
|
+
await $fetch(`${removeTrailingSlash(userApiURL)}/user/rate`, {
|
|
86
|
+
method: 'PUT',
|
|
87
|
+
credentials: 'include',
|
|
88
|
+
headers: {
|
|
89
|
+
Authorization: `Bearer ${accessToken.value}`,
|
|
90
|
+
lang: locale.value,
|
|
91
|
+
},
|
|
92
|
+
body: {
|
|
93
|
+
rate_code: 'basic_plus',
|
|
94
|
+
},
|
|
95
|
+
})
|
|
96
|
+
window.location.reload()
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
$toast.error(error.data.message)
|
|
100
|
+
toggleKaspiSidePanel(false)
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
</script>
|
|
104
|
+
|
|
105
|
+
<template>
|
|
106
|
+
<payment-top-up-side-panel
|
|
107
|
+
v-model="topUpSidePanel"
|
|
108
|
+
@next="actionPayment"
|
|
109
|
+
/>
|
|
110
|
+
|
|
111
|
+
<payment-method-side-panel
|
|
112
|
+
v-model="methodSidePanel"
|
|
113
|
+
@back="onBack"
|
|
114
|
+
:sum="paymentSum"
|
|
115
|
+
@next-bank="directionsBanks"
|
|
116
|
+
/>
|
|
117
|
+
|
|
118
|
+
<payment-kaspi-qr-side-panel
|
|
119
|
+
v-model="kaspiQRSidePanel"
|
|
120
|
+
@back="onBack"
|
|
121
|
+
:request-url="requestUrl"
|
|
122
|
+
:request-id="requestId as number"
|
|
123
|
+
@update-user-rate="updateUserRate"
|
|
124
|
+
/>
|
|
125
|
+
|
|
126
|
+
<payment-kaspi-redirect-side-panel
|
|
127
|
+
v-model="kaspiRedirectSidePanel"
|
|
128
|
+
@back="onBack"
|
|
129
|
+
:request-id="requestId as number"
|
|
130
|
+
@update-user-rate="updateUserRate"
|
|
131
|
+
/>
|
|
132
|
+
</template>
|
|
133
|
+
|
|
134
|
+
<style scoped>
|
|
135
|
+
|
|
136
|
+
</style>
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const emit = defineEmits<{
|
|
3
|
+
(e: 'next', sum: number): void
|
|
4
|
+
}>()
|
|
5
|
+
|
|
6
|
+
const isOpen = defineModel({ default: false })
|
|
7
|
+
|
|
8
|
+
const { t } = useI18n()
|
|
9
|
+
|
|
10
|
+
const money = ref(0)
|
|
11
|
+
const sumArr = ref([
|
|
12
|
+
{
|
|
13
|
+
id: 1,
|
|
14
|
+
value: 1000,
|
|
15
|
+
label: '1 000 ₸',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: 2,
|
|
19
|
+
value: 5000,
|
|
20
|
+
label: '5 000 ₸',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 3,
|
|
24
|
+
value: 10000,
|
|
25
|
+
label: '10 000 ₸',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 4,
|
|
29
|
+
value: 20000,
|
|
30
|
+
label: '20 000 ₸',
|
|
31
|
+
},
|
|
32
|
+
])
|
|
33
|
+
|
|
34
|
+
const filterMoney = computed(() => {
|
|
35
|
+
return money.value > 0
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
function onSelectAmount(value: number) {
|
|
39
|
+
money.value = value
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function onClose() {
|
|
43
|
+
isOpen.value = false
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function handlePayment() {
|
|
47
|
+
emit('next', money.value)
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<template>
|
|
52
|
+
<a-side-panel v-model="isOpen" width="484px">
|
|
53
|
+
<template #header>
|
|
54
|
+
<div class="text-xl font-semibold">
|
|
55
|
+
{{ t('payment.topUp.title') }}
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<div class="flex flex-col gap-6">
|
|
60
|
+
<div class="flex flex-col items-center gap-4 ">
|
|
61
|
+
<a-ill-bill class="size-[120px]" />
|
|
62
|
+
<p class="text-center text-sm font-semibold">
|
|
63
|
+
{{ t('payment.topUp.info') }}
|
|
64
|
+
</p>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div class="flex flex-col gap-4">
|
|
68
|
+
<a-input-standard
|
|
69
|
+
v-model="money"
|
|
70
|
+
:label="`${t('payment.topUp.enterAmount')}`"
|
|
71
|
+
type="number"
|
|
72
|
+
pattern="[0-9]*"
|
|
73
|
+
clearable
|
|
74
|
+
/>
|
|
75
|
+
<div class="flex gap-4">
|
|
76
|
+
<a-chips
|
|
77
|
+
v-for="item in sumArr"
|
|
78
|
+
:key="item.id"
|
|
79
|
+
view="standard"
|
|
80
|
+
size="lg"
|
|
81
|
+
:class="[
|
|
82
|
+
money === item.value
|
|
83
|
+
? 'bg-blue-700 text-white hover:bg-blue-700 dark:border-blue-500 dark:bg-transparent dark:text-blue-500 dark:hover:bg-transparent'
|
|
84
|
+
: '',
|
|
85
|
+
]"
|
|
86
|
+
@click.stop="onSelectAmount(item.value)"
|
|
87
|
+
>
|
|
88
|
+
<span>{{ item.label }}</span>
|
|
89
|
+
</a-chips>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<div class="flex flex-col gap-2">
|
|
94
|
+
<a-button
|
|
95
|
+
:disabled="!filterMoney"
|
|
96
|
+
@click="handlePayment"
|
|
97
|
+
>
|
|
98
|
+
{{ t('actions.topUp') }}
|
|
99
|
+
</a-button>
|
|
100
|
+
<a-button
|
|
101
|
+
view="outline"
|
|
102
|
+
@click="onClose"
|
|
103
|
+
>
|
|
104
|
+
{{ t('actions.back') }}
|
|
105
|
+
</a-button>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
</a-side-panel>
|
|
109
|
+
</template>
|
|
110
|
+
|
|
111
|
+
<style scoped>
|
|
112
|
+
|
|
113
|
+
</style>
|
|
@@ -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>
|
|
@@ -193,11 +193,11 @@ const sideLinks = <any>{
|
|
|
193
193
|
label: 'header.products.fines.items.auto.title',
|
|
194
194
|
link: myLayer.avtoUrl + PAGES.fines.avto
|
|
195
195
|
},
|
|
196
|
-
{
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
196
|
+
// {
|
|
197
|
+
// icon: IconTruck,
|
|
198
|
+
// label: 'header.products.fines.items.wholesaleAuto.title',
|
|
199
|
+
// link: myLayer.avtoUrl + PAGES.fines.bulk
|
|
200
|
+
// }
|
|
201
201
|
],
|
|
202
202
|
fea: [
|
|
203
203
|
{
|
|
@@ -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>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const { t } = useI18n()
|
|
3
|
+
|
|
4
|
+
const { registrationModal } = useIdModals()
|
|
5
|
+
|
|
6
|
+
function onRegister() {
|
|
7
|
+
registrationModal.value = true
|
|
8
|
+
}
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div class="gradient flex justify-between rounded-lg p-4 ring-1 ring-inset ring-blue-700/80 dark:bg-gray-800">
|
|
13
|
+
<div>
|
|
14
|
+
<p class="mb-2 font-semibold">
|
|
15
|
+
{{ t('modals.id.banner.title') }}
|
|
16
|
+
</p>
|
|
17
|
+
<i18n-t
|
|
18
|
+
keypath="modals.id.banner.subtitle"
|
|
19
|
+
tag="p"
|
|
20
|
+
class="text-sm text-gray-600 dark:text-gray-200"
|
|
21
|
+
>
|
|
22
|
+
<template #register>
|
|
23
|
+
<button class="font-semibold text-blue-700 dark:text-blue-500" @click="onRegister">
|
|
24
|
+
{{ t('modals.id.banner.register') }}
|
|
25
|
+
</button>
|
|
26
|
+
</template>
|
|
27
|
+
</i18n-t>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<a-button
|
|
31
|
+
size="md"
|
|
32
|
+
class="self-end"
|
|
33
|
+
@click="onRegister"
|
|
34
|
+
>
|
|
35
|
+
{{ t('actions.register') }}
|
|
36
|
+
</a-button>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<style scoped>
|
|
41
|
+
.gradient {
|
|
42
|
+
background: linear-gradient(
|
|
43
|
+
239.71deg,
|
|
44
|
+
#B3D5F9 -7.48%,
|
|
45
|
+
#E6F1FD 39.62%,
|
|
46
|
+
#CCE2FB 85.82%
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.dark .gradient {
|
|
51
|
+
background: linear-gradient(
|
|
52
|
+
239.71deg,
|
|
53
|
+
#17303F -7.48%,
|
|
54
|
+
#161617 39.62%,
|
|
55
|
+
#17303F 85.82%
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
</style>
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { removeTrailingSlash } from '#adata-ui/components/
|
|
2
|
+
import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
|
|
3
3
|
import IdOtpInput from '#adata-ui/components/modals/id/IdOtpInput.vue'
|
|
4
|
-
import { useAuthStore } from '#adata-ui/stores/auth.store'
|
|
5
4
|
|
|
6
5
|
const { $toast } = useNuxtApp()
|
|
7
6
|
const { t, locale } = useI18n()
|
|
8
7
|
const { commonAuth } = useAppConfig()
|
|
9
8
|
|
|
10
|
-
const
|
|
11
|
-
const { intermediateState } = storeToRefs(authStore)
|
|
12
|
-
|
|
13
|
-
const { confirmAccountOtpModal, confirmSuccessfulModal } = useIdModals()
|
|
9
|
+
const { confirmAccountOtpModal, confirmSuccessfulModal, intermediateState } = useIdModals()
|
|
14
10
|
|
|
15
11
|
const authApiURL = commonAuth.authApiURL
|
|
16
12
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { removeTrailingSlash } from '#adata-ui/components/
|
|
3
|
-
import { useAuthStore } from '#adata-ui/stores/auth.store'
|
|
2
|
+
import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
|
|
4
3
|
import { navigateToLocalizedPage } from '#adata-ui/utils/localizedNavigation'
|
|
5
4
|
import * as z from 'zod'
|
|
6
5
|
|
|
@@ -8,10 +7,7 @@ const { $toast } = useNuxtApp()
|
|
|
8
7
|
const { myLayer, commonAuth } = useAppConfig()
|
|
9
8
|
const { t, locale } = useI18n()
|
|
10
9
|
|
|
11
|
-
const
|
|
12
|
-
const { intermediateState } = storeToRefs(authStore)
|
|
13
|
-
|
|
14
|
-
const { loginModal, registrationModal, recoveryModal, confirmAccountOtpModal, twoFactorModal } = useIdModals()
|
|
10
|
+
const { loginModal, registrationModal, recoveryModal, confirmAccountOtpModal, twoFactorModal, intermediateState } = useIdModals()
|
|
15
11
|
|
|
16
12
|
const authApiURL = commonAuth.authApiURL
|
|
17
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { removeTrailingSlash } from '#adata-ui/components/
|
|
2
|
+
import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
|
|
3
3
|
import IdConfirmAccountOtpModal from '#adata-ui/components/modals/id/IdConfirmAccountOtpModal.vue'
|
|
4
4
|
import IdConfirmSuccessfulModal from '#adata-ui/components/modals/id/IdConfirmSuccessfulModal.vue'
|
|
5
5
|
import IdLoginModal from '#adata-ui/components/modals/id/IdLoginModal.vue'
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { removeTrailingSlash } from '#adata-ui/components/
|
|
3
|
-
import { useAuthStore } from '#adata-ui/stores/auth.store'
|
|
2
|
+
import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
|
|
4
3
|
import * as z from 'zod'
|
|
5
4
|
|
|
6
5
|
const { $toast } = useNuxtApp()
|
|
7
6
|
const { commonAuth } = useAppConfig()
|
|
8
7
|
const { t, locale } = useI18n()
|
|
9
8
|
|
|
10
|
-
const authStore = useAuthStore()
|
|
11
|
-
const { intermediateState } = storeToRefs(authStore)
|
|
12
|
-
|
|
13
9
|
const authApiURL = commonAuth.authApiURL
|
|
14
|
-
const { newPasswordModal, passwordSuccessfulModal } = useIdModals()
|
|
10
|
+
const { newPasswordModal, passwordSuccessfulModal, intermediateState } = useIdModals()
|
|
15
11
|
|
|
16
12
|
const form = reactive({
|
|
17
13
|
password: '',
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { removeTrailingSlash } from '#adata-ui/components/
|
|
3
|
-
import { useAuthStore } from '#adata-ui/stores/auth.store'
|
|
2
|
+
import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
|
|
4
3
|
import * as z from 'zod'
|
|
5
4
|
|
|
6
5
|
const { $toast } = useNuxtApp()
|
|
7
6
|
const { commonAuth } = useAppConfig()
|
|
8
7
|
const { t, locale } = useI18n()
|
|
9
8
|
|
|
10
|
-
const
|
|
11
|
-
const { intermediateState } = storeToRefs(authStore)
|
|
12
|
-
|
|
13
|
-
const { recoveryModal, resetPasswordOtpModal } = useIdModals()
|
|
9
|
+
const { recoveryModal, resetPasswordOtpModal, intermediateState } = useIdModals()
|
|
14
10
|
const authApiURL = commonAuth.authApiURL
|
|
15
11
|
const emailField = ref('')
|
|
16
12
|
const loading = ref(false)
|