adata-ui 2.0.47 → 2.0.49
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/components/elements/curve-block/ACurveBlock.vue +55 -3
- package/components/elements/illustrations/noAccess.vue +8 -0
- package/components/features/payment/banner/BasicPlusLimitBanner.vue +104 -0
- package/components/features/payment/banner/PaymentBanner.vue +0 -3
- package/components/modals/id/IdBanner.vue +3 -3
- package/components/navigation/header/ProfileMenu.vue +7 -0
- package/lang/en.ts +13 -5
- package/lang/kk.ts +12 -4
- package/lang/ru.ts +12 -4
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ const props = defineProps<{
|
|
|
6
6
|
title: string
|
|
7
7
|
description: string
|
|
8
8
|
to?: string
|
|
9
|
+
wide?: boolean
|
|
9
10
|
}>()
|
|
10
11
|
</script>
|
|
11
12
|
|
|
@@ -17,6 +18,54 @@ const props = defineProps<{
|
|
|
17
18
|
active-class="active-item"
|
|
18
19
|
>
|
|
19
20
|
<svg
|
|
21
|
+
v-if="wide"
|
|
22
|
+
class="w-full"
|
|
23
|
+
viewBox="-2 -4 416 188"
|
|
24
|
+
fill="none"
|
|
25
|
+
preserveAspectRatio="none"
|
|
26
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
27
|
+
>
|
|
28
|
+
<path
|
|
29
|
+
class="border-path border-path--large"
|
|
30
|
+
d="M413.333 105.936C413.333 116.008 399.074 123 389.001 123C369.671 123 354.001 138.67 354.001 158C354.001 168.009 347.088 182 337.079 182H16.3334C7.49682 182 0.333374 174.837 0.333374 166V16C0.333374 7.16344 7.49682 0 16.3334 0H397.333C406.17 0 413.333 7.16344 413.333 16V105.936Z"
|
|
31
|
+
stroke-width="2"
|
|
32
|
+
fill="transparent"
|
|
33
|
+
/>
|
|
34
|
+
<defs>
|
|
35
|
+
<linearGradient
|
|
36
|
+
id="gradient-light"
|
|
37
|
+
x1="164.372"
|
|
38
|
+
y1="-137.957"
|
|
39
|
+
x2="-20.5433"
|
|
40
|
+
y2="68.1723"
|
|
41
|
+
gradientUnits="userSpaceOnUse"
|
|
42
|
+
>
|
|
43
|
+
<stop stop-color="#479FFF" />
|
|
44
|
+
<stop
|
|
45
|
+
offset="1"
|
|
46
|
+
stop-color="#0070EB"
|
|
47
|
+
/>
|
|
48
|
+
</linearGradient>
|
|
49
|
+
|
|
50
|
+
<linearGradient
|
|
51
|
+
id="gradient-dark"
|
|
52
|
+
x1="164.372"
|
|
53
|
+
y1="-137.957"
|
|
54
|
+
x2="-20.5433"
|
|
55
|
+
y2="68.1723"
|
|
56
|
+
gradientUnits="userSpaceOnUse"
|
|
57
|
+
>
|
|
58
|
+
<stop stop-color="#4FBDFF" />
|
|
59
|
+
<stop
|
|
60
|
+
offset="1"
|
|
61
|
+
stop-color="#1B98E2"
|
|
62
|
+
/>
|
|
63
|
+
</linearGradient>
|
|
64
|
+
</defs>
|
|
65
|
+
</svg>
|
|
66
|
+
|
|
67
|
+
<svg
|
|
68
|
+
v-else
|
|
20
69
|
class="w-full"
|
|
21
70
|
viewBox="-1 -1 308 184"
|
|
22
71
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -72,7 +121,7 @@ const props = defineProps<{
|
|
|
72
121
|
{{ title }}
|
|
73
122
|
</p>
|
|
74
123
|
</div>
|
|
75
|
-
<p class="text-sm text-gray-600 dark:text-gray-200">
|
|
124
|
+
<p class="text-left text-sm text-gray-600 dark:text-gray-200">
|
|
76
125
|
{{ description }}
|
|
77
126
|
</p>
|
|
78
127
|
</div>
|
|
@@ -148,14 +197,17 @@ const props = defineProps<{
|
|
|
148
197
|
fill: #F4F5F6;
|
|
149
198
|
}
|
|
150
199
|
|
|
200
|
+
.border-path--large {
|
|
201
|
+
stroke-dasharray: 1400;
|
|
202
|
+
stroke-dashoffset: 1400;
|
|
203
|
+
}
|
|
204
|
+
|
|
151
205
|
.animated-border {
|
|
152
206
|
stroke-dasharray: 180;
|
|
153
207
|
stroke-dashoffset: 180;
|
|
154
208
|
fill: #F4F5F6;
|
|
155
209
|
}
|
|
156
210
|
|
|
157
|
-
|
|
158
|
-
|
|
159
211
|
.active-item .title {
|
|
160
212
|
color: #0070EB;
|
|
161
213
|
}
|
|
@@ -15,10 +15,18 @@ const props = defineProps<Props>()
|
|
|
15
15
|
|
|
16
16
|
const appConfig = useAppConfig()
|
|
17
17
|
const loginUrl = appConfig.myLayer.loginUrl
|
|
18
|
+
const authMode = appConfig.myLayer.authMode
|
|
18
19
|
const device = useAdaptive()
|
|
19
20
|
const { t, locale } = useI18n()
|
|
20
21
|
|
|
22
|
+
const { loginModal } = useIdModals()
|
|
23
|
+
|
|
21
24
|
function goAuth() {
|
|
25
|
+
if (authMode === 'local') {
|
|
26
|
+
loginModal.value = true
|
|
27
|
+
return
|
|
28
|
+
}
|
|
29
|
+
|
|
22
30
|
if (window) {
|
|
23
31
|
if (props.to) {
|
|
24
32
|
navigateToLocalizedPage(props.to)
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<{
|
|
5
|
+
balance: number
|
|
6
|
+
}>()
|
|
7
|
+
|
|
8
|
+
const { $toast } = useNuxtApp()
|
|
9
|
+
const { t, locale } = useI18n()
|
|
10
|
+
const { commonAuth } = useAppConfig()
|
|
11
|
+
const accessToken = useCookie('accessToken')
|
|
12
|
+
|
|
13
|
+
const { topUpSidePanel } = usePayment()
|
|
14
|
+
|
|
15
|
+
const userApiURL = commonAuth.userApiURL
|
|
16
|
+
|
|
17
|
+
const isLoading = ref(false)
|
|
18
|
+
|
|
19
|
+
async function updateUserRate() {
|
|
20
|
+
try {
|
|
21
|
+
isLoading.value = true
|
|
22
|
+
await $fetch(`${removeTrailingSlash(userApiURL)}/user/rate`, {
|
|
23
|
+
method: 'PUT',
|
|
24
|
+
credentials: 'include',
|
|
25
|
+
headers: {
|
|
26
|
+
Authorization: `Bearer ${accessToken.value}`,
|
|
27
|
+
lang: locale.value,
|
|
28
|
+
},
|
|
29
|
+
body: {
|
|
30
|
+
rate_code: 'basic_plus',
|
|
31
|
+
},
|
|
32
|
+
})
|
|
33
|
+
window.location.reload()
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
$toast.error(error.data.message)
|
|
37
|
+
}
|
|
38
|
+
finally {
|
|
39
|
+
isLoading.value = false
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function onUpdate() {
|
|
44
|
+
if (props.balance >= 1000) {
|
|
45
|
+
updateUserRate()
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
topUpSidePanel.value = true
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<div class="gradient flex justify-between rounded-lg p-4 ring-1 ring-inset ring-blue-700/80 dark:bg-gray-800">
|
|
55
|
+
<div>
|
|
56
|
+
<p class="mb-2 font-semibold">
|
|
57
|
+
{{ t('modals.id.banners.basicPlusLimit.title') }}
|
|
58
|
+
</p>
|
|
59
|
+
<i18n-t
|
|
60
|
+
keypath="modals.id.banners.basicPlusLimit.subtitle"
|
|
61
|
+
tag="p"
|
|
62
|
+
class="text-sm text-gray-600 dark:text-gray-200"
|
|
63
|
+
>
|
|
64
|
+
<template #topUp>
|
|
65
|
+
<button
|
|
66
|
+
class="font-semibold text-blue-700 dark:text-blue-500"
|
|
67
|
+
@click="topUpSidePanel = true"
|
|
68
|
+
>
|
|
69
|
+
{{ t('modals.id.banners.basicPlusLimit.topUp') }}
|
|
70
|
+
</button>
|
|
71
|
+
</template>
|
|
72
|
+
</i18n-t>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<a-button
|
|
76
|
+
size="md"
|
|
77
|
+
class="self-end"
|
|
78
|
+
@click="onUpdate"
|
|
79
|
+
:loading="isLoading"
|
|
80
|
+
>
|
|
81
|
+
{{ t('actions.update') }}
|
|
82
|
+
</a-button>
|
|
83
|
+
</div>
|
|
84
|
+
</template>
|
|
85
|
+
|
|
86
|
+
<style scoped>
|
|
87
|
+
.gradient {
|
|
88
|
+
background: linear-gradient(
|
|
89
|
+
239.71deg,
|
|
90
|
+
#B3D5F9 -7.48%,
|
|
91
|
+
#E6F1FD 39.62%,
|
|
92
|
+
#CCE2FB 85.82%
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.dark .gradient {
|
|
97
|
+
background: linear-gradient(
|
|
98
|
+
239.71deg,
|
|
99
|
+
#17303F -7.48%,
|
|
100
|
+
#161617 39.62%,
|
|
101
|
+
#17303F 85.82%
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
</style>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { buildLocalizedUrl } from '#adata-ui/utils/localizedNavigation'
|
|
3
|
-
import PaymentProcess from '#adata-ui/components/features/payment/process/PaymentProcess.vue'
|
|
4
3
|
|
|
5
4
|
const { t, locale } = useI18n()
|
|
6
5
|
const { myLayer } = useAppConfig()
|
|
@@ -44,8 +43,6 @@ function onBuy() {
|
|
|
44
43
|
{{ t('actions.buy') }}
|
|
45
44
|
</a-button>
|
|
46
45
|
</div>
|
|
47
|
-
|
|
48
|
-
<payment-process />
|
|
49
46
|
</template>
|
|
50
47
|
|
|
51
48
|
<style scoped>
|
|
@@ -12,16 +12,16 @@ function onRegister() {
|
|
|
12
12
|
<div class="gradient flex justify-between rounded-lg p-4 ring-1 ring-inset ring-blue-700/80 dark:bg-gray-800">
|
|
13
13
|
<div>
|
|
14
14
|
<p class="mb-2 font-semibold">
|
|
15
|
-
{{ t('modals.id.
|
|
15
|
+
{{ t('modals.id.banners.auth.title') }}
|
|
16
16
|
</p>
|
|
17
17
|
<i18n-t
|
|
18
|
-
keypath="modals.id.
|
|
18
|
+
keypath="modals.id.banners.auth.subtitle"
|
|
19
19
|
tag="p"
|
|
20
20
|
class="text-sm text-gray-600 dark:text-gray-200"
|
|
21
21
|
>
|
|
22
22
|
<template #register>
|
|
23
23
|
<button class="font-semibold text-blue-700 dark:text-blue-500" @click="onRegister">
|
|
24
|
-
{{ t('modals.id.
|
|
24
|
+
{{ t('modals.id.banners.auth.register') }}
|
|
25
25
|
</button>
|
|
26
26
|
</template>
|
|
27
27
|
</i18n-t>
|
|
@@ -27,9 +27,16 @@ const { t } = useI18n()
|
|
|
27
27
|
const { myLayer }: any = useAppConfig()
|
|
28
28
|
const { locale } = useI18n()
|
|
29
29
|
|
|
30
|
+
// const { topUpSidePanel } = usePayment()
|
|
31
|
+
|
|
30
32
|
const items = useHeaderMenuLinks()
|
|
31
33
|
|
|
32
34
|
const onReplenish = () => {
|
|
35
|
+
// if (myLayer.authMode === 'locale') {
|
|
36
|
+
// topUpSidePanel.value = true
|
|
37
|
+
// return
|
|
38
|
+
// }
|
|
39
|
+
|
|
33
40
|
if (window) {
|
|
34
41
|
window.location.href =
|
|
35
42
|
buildLocalizedUrl(locale.value, myLayer.landingUrl, '/profile?popupBalance=1')
|
package/lang/en.ts
CHANGED
|
@@ -480,14 +480,22 @@ const EnLocale: RuLocale = {
|
|
|
480
480
|
set: 'Set',
|
|
481
481
|
resend: 'Resend',
|
|
482
482
|
confirm: 'Confirm',
|
|
483
|
-
"topUp": "Top up"
|
|
483
|
+
"topUp": "Top up",
|
|
484
|
+
update: 'Update',
|
|
484
485
|
},
|
|
485
486
|
modals: {
|
|
486
487
|
id: {
|
|
487
|
-
"
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
488
|
+
"banners": {
|
|
489
|
+
auth: {
|
|
490
|
+
"title": "Free checks",
|
|
491
|
+
"subtitle": "{register} and get 5 free checks",
|
|
492
|
+
"register": "Register"
|
|
493
|
+
},
|
|
494
|
+
"basicPlusLimit": {
|
|
495
|
+
"title": "Your limit of checks under the 'Basic +' plan has been exhausted",
|
|
496
|
+
"subtitle": "{topUp} your balance and get access to additional checks",
|
|
497
|
+
"topUp": "Top up"
|
|
498
|
+
}
|
|
491
499
|
},
|
|
492
500
|
login: {
|
|
493
501
|
title: 'Login',
|
package/lang/kk.ts
CHANGED
|
@@ -482,13 +482,21 @@ const KkLocale: RuLocale = {
|
|
|
482
482
|
resend: 'Қайта жіберу',
|
|
483
483
|
confirm: 'Растау',
|
|
484
484
|
"topUp": "Толықтыру",
|
|
485
|
+
update: 'Жаңарту',
|
|
485
486
|
},
|
|
486
487
|
modals: {
|
|
487
488
|
id: {
|
|
488
|
-
"
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
489
|
+
"banners": {
|
|
490
|
+
auth: {
|
|
491
|
+
"title": "Тегін тексерулер",
|
|
492
|
+
"subtitle": "{register} және 5 тегін тексеру алыңыз",
|
|
493
|
+
"register": "Тіркеліңіз"
|
|
494
|
+
},
|
|
495
|
+
"basicPlusLimit": {
|
|
496
|
+
"title": "«Базалық +» тарифі бойынша тексеру лимитіңіз таусылды",
|
|
497
|
+
"subtitle": "{topUp} балансты толықтырып, қосымша тексерулерге қол жеткізіңіз",
|
|
498
|
+
"topUp": "Толықтырыңыз"
|
|
499
|
+
}
|
|
492
500
|
},
|
|
493
501
|
login: {
|
|
494
502
|
title: 'Кіру',
|
package/lang/ru.ts
CHANGED
|
@@ -483,13 +483,21 @@ const RuLocale = {
|
|
|
483
483
|
resend: 'Отправить еще раз',
|
|
484
484
|
confirm: 'Подтвердить',
|
|
485
485
|
topUp: 'Пополнить',
|
|
486
|
+
update: 'Обновить',
|
|
486
487
|
},
|
|
487
488
|
modals: {
|
|
488
489
|
id: {
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
490
|
+
banners: {
|
|
491
|
+
auth: {
|
|
492
|
+
title: 'Бесплатные проверки',
|
|
493
|
+
subtitle: '{register} и получите 5 бесплатных проверок',
|
|
494
|
+
register: 'Зарегистрируйтесь',
|
|
495
|
+
},
|
|
496
|
+
basicPlusLimit: {
|
|
497
|
+
title: 'Ваш лимит проверок по тарифу «Базовый +» исчерпан',
|
|
498
|
+
subtitle: '{topUp} баланс и получите доступ к дополнительным проверкам',
|
|
499
|
+
topUp: 'Пополните',
|
|
500
|
+
}
|
|
493
501
|
},
|
|
494
502
|
login: {
|
|
495
503
|
title: 'Вход',
|