adata-ui 2.1.9 → 2.1.11
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/modals/id/IdBanner.vue +5 -2
- package/components/modals/id/IdLoginModal.vue +16 -6
- package/lang/en.ts +2 -1
- package/lang/kk.ts +2 -1
- package/lang/ru.ts +2 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ function onRegister() {
|
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
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">
|
|
12
|
+
<div class="gradient flex flex-col gap-2 lg:gap-0 lg:flex-row 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
15
|
{{ t('modals.id.banners.auth.title') }}
|
|
@@ -24,12 +24,15 @@ function onRegister() {
|
|
|
24
24
|
{{ t('modals.id.banners.auth.register') }}
|
|
25
25
|
</button>
|
|
26
26
|
</template>
|
|
27
|
+
<template #checks>
|
|
28
|
+
<span class="font-bold text-deepblue-900 dark:text-white">{{ t('modals.id.banners.auth.checks') }}</span>
|
|
29
|
+
</template>
|
|
27
30
|
</i18n-t>
|
|
28
31
|
</div>
|
|
29
32
|
|
|
30
33
|
<a-button
|
|
31
34
|
size="md"
|
|
32
|
-
class="self-end"
|
|
35
|
+
class="sm:self-end bg-gradient-blue"
|
|
33
36
|
@click="onRegister"
|
|
34
37
|
>
|
|
35
38
|
{{ t('actions.register') }}
|
|
@@ -10,6 +10,11 @@ const { t, locale } = useI18n()
|
|
|
10
10
|
const { pk, landing } = useUrls()
|
|
11
11
|
const route = useRoute()
|
|
12
12
|
|
|
13
|
+
const { myLayer } = useAppConfig()
|
|
14
|
+
const mode = myLayer.mode
|
|
15
|
+
|
|
16
|
+
const COOKIE_DOMAIN = `.${mode}.kz`
|
|
17
|
+
|
|
13
18
|
const regex = /^\/counterparty\/main\/company\/\d+\/basic-info$/;
|
|
14
19
|
|
|
15
20
|
const { loginModal, registrationModal, recoveryModal, confirmAccountOtpModal, twoFactorModal, intermediateState } = useIdModals()
|
|
@@ -42,20 +47,23 @@ function getError(path: string) {
|
|
|
42
47
|
function savePassAndLogin(form: { username: string, password: string }) {
|
|
43
48
|
const { username, password } = form
|
|
44
49
|
const cookieOptions = {
|
|
50
|
+
domain: COOKIE_DOMAIN,
|
|
45
51
|
expires: rememberMe.value ? new Date(Date.now() + 14 * 24 * 60 * 60 * 1000) : undefined, // Срок действия 14 дней
|
|
46
52
|
}
|
|
47
53
|
useCookie('username', cookieOptions).value = username
|
|
48
54
|
useCookie('password', cookieOptions).value = password
|
|
49
55
|
}
|
|
50
56
|
function clearAuthCookie() {
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
const options = { domain: COOKIE_DOMAIN }
|
|
58
|
+
|
|
59
|
+
useCookie('username', options).value = null
|
|
60
|
+
useCookie('password', options).value = null
|
|
53
61
|
}
|
|
54
62
|
|
|
55
63
|
const loading = ref(false)
|
|
56
64
|
const form: ILoginForm = reactive({
|
|
57
|
-
username: useCookie('username').value || '',
|
|
58
|
-
password: useCookie('password').value || '',
|
|
65
|
+
username: useCookie('username', { domain: COOKIE_DOMAIN }).value || '',
|
|
66
|
+
password: useCookie('password', { domain: COOKIE_DOMAIN }).value || '',
|
|
59
67
|
})
|
|
60
68
|
const rememberMe = ref(false)
|
|
61
69
|
|
|
@@ -126,7 +134,7 @@ async function submit() {
|
|
|
126
134
|
|
|
127
135
|
useCookie('accessToken', {
|
|
128
136
|
maxAge: expire_in,
|
|
129
|
-
domain:
|
|
137
|
+
domain: COOKIE_DOMAIN,
|
|
130
138
|
path: '/',
|
|
131
139
|
secure: true,
|
|
132
140
|
}).value = access_token
|
|
@@ -187,7 +195,9 @@ function toTariffs() {
|
|
|
187
195
|
}
|
|
188
196
|
|
|
189
197
|
onMounted(() => {
|
|
190
|
-
|
|
198
|
+
const options = { domain: COOKIE_DOMAIN }
|
|
199
|
+
|
|
200
|
+
rememberMe.value = !!useCookie('username', options).value && !!useCookie('password', options).value
|
|
191
201
|
})
|
|
192
202
|
|
|
193
203
|
function handleEnter(e: KeyboardEvent) {
|
package/lang/en.ts
CHANGED
|
@@ -532,7 +532,8 @@ const EnLocale: RuLocale = {
|
|
|
532
532
|
"banners": {
|
|
533
533
|
auth: {
|
|
534
534
|
"title": "Free checks",
|
|
535
|
-
"subtitle": "{register} and get
|
|
535
|
+
"subtitle": "{register} and get {checks}",
|
|
536
|
+
"checks": "5 free checks",
|
|
536
537
|
"register": "Register"
|
|
537
538
|
},
|
|
538
539
|
"basicPlusLimit": {
|
package/lang/kk.ts
CHANGED
|
@@ -533,7 +533,8 @@ const KkLocale: RuLocale = {
|
|
|
533
533
|
"banners": {
|
|
534
534
|
auth: {
|
|
535
535
|
"title": "Тегін тексерулер",
|
|
536
|
-
"subtitle": "{register} және
|
|
536
|
+
"subtitle": "{register} және {checks}",
|
|
537
|
+
"checks": '5 тегін тексеру алыңыз',
|
|
537
538
|
"register": "Тіркеліңіз"
|
|
538
539
|
},
|
|
539
540
|
"basicPlusLimit": {
|
package/lang/ru.ts
CHANGED
|
@@ -534,7 +534,8 @@ const RuLocale = {
|
|
|
534
534
|
banners: {
|
|
535
535
|
auth: {
|
|
536
536
|
title: 'Бесплатные проверки',
|
|
537
|
-
subtitle: '{register} и получите
|
|
537
|
+
subtitle: '{register} и получите {checks}',
|
|
538
|
+
checks: '5 бесплатных проверок',
|
|
538
539
|
register: 'Зарегистрируйтесь',
|
|
539
540
|
},
|
|
540
541
|
basicPlusLimit: {
|