adata-ui 4.0.35 → 4.0.37
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/dist/module.json +1 -1
- package/dist/runtime/components/header/NavList.vue +45 -2
- package/dist/runtime/components/header/NavList.vue.d.ts +2 -0
- package/dist/runtime/components/header/ProductMenu.vue +31 -3
- package/dist/runtime/components/header/ProfileMenu.vue +13 -210
- package/dist/runtime/components/header/ProfileMenuContent.vue +227 -0
- package/dist/runtime/components/header/ProfileMenuContent.vue.d.ts +16 -0
- package/dist/runtime/components/mobile-navigation/BottomNavigation.vue +78 -0
- package/dist/runtime/components/mobile-navigation/BottomNavigation.vue.d.ts +29 -0
- package/dist/runtime/components/mobile-navigation/MainButton.vue +16 -0
- package/dist/runtime/components/mobile-navigation/MainButton.vue.d.ts +2 -0
- package/dist/runtime/components/mobile-navigation/MobileProductMenu.vue +261 -0
- package/dist/runtime/components/modals/NoAccessContent.vue +1 -1
- package/dist/runtime/composables/projectState.d.ts +1 -0
- package/dist/runtime/composables/projectState.js +1 -0
- package/dist/runtime/i18n/i18n.config.d.ts +24 -0
- package/dist/runtime/icons/avatar.vue +41 -0
- package/dist/runtime/icons/avatar.vue.d.ts +2 -0
- package/dist/runtime/icons/file/file.vue.d.ts +2 -0
- package/dist/runtime/icons/file/files.vue +17 -0
- package/dist/runtime/icons/file/files.vue.d.ts +2 -0
- package/dist/runtime/icons/invoice.vue +35 -0
- package/dist/runtime/icons/invoice.vue.d.ts +2 -0
- package/dist/runtime/icons/menu/menu-filled.vue +61 -0
- package/dist/runtime/icons/menu/menu-filled.vue.d.ts +2 -0
- package/dist/runtime/icons/menu/menu.vue +41 -0
- package/dist/runtime/icons/menu/menu.vue.d.ts +2 -0
- package/dist/runtime/icons/notifications.vue +25 -0
- package/dist/runtime/icons/notifications.vue.d.ts +2 -0
- package/dist/runtime/lang/en.js +8 -0
- package/dist/runtime/lang/kk.js +8 -0
- package/dist/runtime/lang/ru.d.ts +8 -0
- package/dist/runtime/lang/ru.js +8 -0
- package/dist/runtime/shared/constants/pages.d.ts +3 -0
- package/dist/runtime/shared/constants/pages.js +3 -0
- package/package.json +64 -64
- /package/dist/runtime/{icons/file.vue.d.ts → components/mobile-navigation/MobileProductMenu.vue.d.ts} +0 -0
- /package/dist/runtime/icons/{file.vue → file/file.vue} +0 -0
package/dist/module.json
CHANGED
|
@@ -1,15 +1,57 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { PAGES } from "../../shared/constants/pages";
|
|
2
3
|
const props = defineProps({
|
|
4
|
+
id: { type: String, required: true },
|
|
3
5
|
icon: { type: Object, required: false },
|
|
4
6
|
title: { type: String, required: true },
|
|
5
7
|
badge: { type: Boolean, required: false },
|
|
6
8
|
to: { type: String, required: true },
|
|
7
|
-
navList: { type: Array, required: true }
|
|
9
|
+
navList: { type: Array, required: true },
|
|
10
|
+
currentModule: { type: Boolean, required: true }
|
|
8
11
|
});
|
|
12
|
+
function isActive(itemPath) {
|
|
13
|
+
if (!props.currentModule) return false;
|
|
14
|
+
const currentUrl = window.location.href.split("/").filter((item) => !["kk", "en"].includes(item)).join("/");
|
|
15
|
+
const section = PAGES[props.id];
|
|
16
|
+
const currentPath = itemPath.split("/").filter((item) => !["kk", "en"].includes(item)).join("/");
|
|
17
|
+
if (currentUrl === currentPath) return true;
|
|
18
|
+
if (currentPath.endsWith("/")) {
|
|
19
|
+
let atLeastOne = false;
|
|
20
|
+
for (const key in section) {
|
|
21
|
+
const path = section[key];
|
|
22
|
+
if (key !== "main") {
|
|
23
|
+
const includes = currentUrl.includes(path) || currentUrl.includes("car-result");
|
|
24
|
+
if (includes) {
|
|
25
|
+
atLeastOne = true;
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return !atLeastOne;
|
|
31
|
+
}
|
|
32
|
+
if (currentPath.includes("check-car")) {
|
|
33
|
+
if (currentUrl.includes("car-result")) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
for (const key in section) {
|
|
38
|
+
const path = section[key];
|
|
39
|
+
if (key !== "main") {
|
|
40
|
+
const includesBoth = currentUrl.includes(path) && currentUrl.startsWith(currentPath);
|
|
41
|
+
if (includesBoth) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
9
48
|
</script>
|
|
10
49
|
|
|
11
50
|
<template>
|
|
12
|
-
<div
|
|
51
|
+
<div
|
|
52
|
+
class="flex flex-col gap-2"
|
|
53
|
+
:class="{ 'rounded-md bg-gray-50 p-2 dark:bg-gray-800': currentModule }"
|
|
54
|
+
>
|
|
13
55
|
<div
|
|
14
56
|
class="flex items-center gap-2 pl-[10px]"
|
|
15
57
|
>
|
|
@@ -31,6 +73,7 @@ const props = defineProps({
|
|
|
31
73
|
v-for="item in navList"
|
|
32
74
|
:key="item.title"
|
|
33
75
|
class="flex items-center gap-2 px-[10px] py-[6px] w-full rounded-md hover:bg-gray-50 dark:hover:bg-gray-800"
|
|
76
|
+
:class="{ 'bg-blue-100 dark:bg-gray-200/10': isActive(item.to) }"
|
|
34
77
|
>
|
|
35
78
|
<div class="bg-gradient-blue p-1 rounded-lg g-white">
|
|
36
79
|
<component
|
|
@@ -5,11 +5,13 @@ interface NavList {
|
|
|
5
5
|
icon?: Component;
|
|
6
6
|
}
|
|
7
7
|
type __VLS_Props = {
|
|
8
|
+
id: string;
|
|
8
9
|
icon?: Component;
|
|
9
10
|
title: string;
|
|
10
11
|
badge?: boolean;
|
|
11
12
|
to: string;
|
|
12
13
|
navList: NavList[];
|
|
14
|
+
currentModule: boolean;
|
|
13
15
|
};
|
|
14
16
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
17
|
export default _default;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { PAGES } from "../../shared/constants/pages";
|
|
3
3
|
import NavList from "./NavList.vue";
|
|
4
4
|
import CardGallery from "./CardGallery.vue";
|
|
5
|
-
import { useI18n, useAppConfig } from "#imports";
|
|
5
|
+
import { useI18n, useAppConfig, useRequestURL } from "#imports";
|
|
6
6
|
import IUsersThree from "#icons/users/users-three.vue";
|
|
7
7
|
import ISearch from "#icons/search.vue";
|
|
8
8
|
import IArrowCircleDown from "#icons/arrow/arrow-circle-down.vue";
|
|
@@ -16,7 +16,8 @@ import IWorkBag from "#icons/work-bag.vue";
|
|
|
16
16
|
import IHdocument from "#icons/document/hdocument.vue";
|
|
17
17
|
import IReceipt from "#icons/receipt/receipt.vue";
|
|
18
18
|
import IHcheck from "#icons/receipt/hcheck.vue";
|
|
19
|
-
import IFile from "#icons/file.vue";
|
|
19
|
+
import IFile from "#icons/file/file.vue";
|
|
20
|
+
import IFiles from "#icons/file/files.vue";
|
|
20
21
|
import ICar from "#icons/avto/car.vue";
|
|
21
22
|
import ICheckCircle from "#icons/check-circle.vue";
|
|
22
23
|
import ITruck from "#icons/avto/truck.vue";
|
|
@@ -37,6 +38,7 @@ const props = defineProps({
|
|
|
37
38
|
const { t } = useI18n();
|
|
38
39
|
const appConfig = useAppConfig();
|
|
39
40
|
const mode = appConfig.adataUI.mode;
|
|
41
|
+
const pageUrl = useRequestURL();
|
|
40
42
|
defineEmits(["outerClick", "mouseOver"]);
|
|
41
43
|
const filteredItems = [
|
|
42
44
|
{
|
|
@@ -241,8 +243,28 @@ const filteredItems = [
|
|
|
241
243
|
to: `https://ac.${mode}.kz/compliance`
|
|
242
244
|
}
|
|
243
245
|
]
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
key: "edo",
|
|
249
|
+
name: t("header.products.edo.label"),
|
|
250
|
+
icon: IFiles,
|
|
251
|
+
items: [
|
|
252
|
+
{
|
|
253
|
+
title: t("header.products.edo.items.l.t"),
|
|
254
|
+
subtitle: t("header.products.edo.items.l.t"),
|
|
255
|
+
icon: IFiles,
|
|
256
|
+
to: `https://edo.${mode}.kz`
|
|
257
|
+
}
|
|
258
|
+
]
|
|
244
259
|
}
|
|
245
260
|
];
|
|
261
|
+
function isCurrentModule(currentModule) {
|
|
262
|
+
if (currentModule === "fines") return "avto";
|
|
263
|
+
if (currentModule === "analytics") return "analytics-new";
|
|
264
|
+
if (currentModule === "compliance") return "ac";
|
|
265
|
+
if (currentModule === "fea") return "tnved";
|
|
266
|
+
return currentModule;
|
|
267
|
+
}
|
|
246
268
|
</script>
|
|
247
269
|
|
|
248
270
|
<template>
|
|
@@ -258,7 +280,9 @@ const filteredItems = [
|
|
|
258
280
|
<div class="flex flex-col gap-5 w-[290px]">
|
|
259
281
|
<nav-list
|
|
260
282
|
v-for="module in filteredItems.slice(0, 2)"
|
|
283
|
+
:id="module.key"
|
|
261
284
|
:key="module.key"
|
|
285
|
+
:current-module="pageUrl.hostname.startsWith(isCurrentModule(module.key))"
|
|
262
286
|
:title="module.name"
|
|
263
287
|
:nav-list="module.items"
|
|
264
288
|
:to="module.to"
|
|
@@ -268,7 +292,9 @@ const filteredItems = [
|
|
|
268
292
|
<div class="flex flex-col gap-5 w-[290px] pl-[10px]">
|
|
269
293
|
<nav-list
|
|
270
294
|
v-for="module in filteredItems.slice(2, 5)"
|
|
295
|
+
:id="module.key"
|
|
271
296
|
:key="module.key"
|
|
297
|
+
:current-module="pageUrl.hostname.startsWith(isCurrentModule(module.key))"
|
|
272
298
|
:title="module.name"
|
|
273
299
|
:nav-list="module.items"
|
|
274
300
|
:to="module.to"
|
|
@@ -277,8 +303,10 @@ const filteredItems = [
|
|
|
277
303
|
</div>
|
|
278
304
|
<div class="flex flex-col gap-5 w-[330px] pl-[10px]">
|
|
279
305
|
<nav-list
|
|
280
|
-
v-for="module in filteredItems.slice(5,
|
|
306
|
+
v-for="module in filteredItems.slice(5, 8)"
|
|
307
|
+
:id="module.key"
|
|
281
308
|
:key="module.key"
|
|
309
|
+
:current-module="pageUrl.hostname.startsWith(isCurrentModule(module.key))"
|
|
282
310
|
:title="module.name"
|
|
283
311
|
:nav-list="module.items"
|
|
284
312
|
:to="module.to"
|
|
@@ -1,22 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { DropdownMenuContent, DropdownMenuPortal, DropdownMenuRoot, DropdownMenuTrigger } from "reka-ui";
|
|
3
|
-
import { PAGES } from "../../shared/constants/pages";
|
|
4
|
-
import AStatusBadge from "../Tag.vue";
|
|
5
|
-
import AButton from "../button/Button.vue";
|
|
6
|
-
import ColorMode from "../ColorMode.vue";
|
|
7
|
-
import { ref, useI18n, useAppConfig } from "#imports";
|
|
8
|
-
import IPlus from "#icons/plus.vue";
|
|
9
|
-
import ILogout from "#icons/navigation/logout.vue";
|
|
10
|
-
import IProfile from "#icons/document/profile.vue";
|
|
11
|
-
import ILock from "#icons/lock.vue";
|
|
12
|
-
import IReceipt from "#icons/receipt/receipt.vue";
|
|
13
|
-
import IBookmark from "#icons/bookmark.vue";
|
|
14
|
-
import IFile from "#icons/file.vue";
|
|
15
|
-
import IHistory from "#icons/history.vue";
|
|
16
|
-
import IUsers from "#icons/users/users.vue";
|
|
17
|
-
import IMessage from "#icons/message.vue";
|
|
18
3
|
import IChevronDown from "#icons/arrow/chevron-down.vue";
|
|
19
|
-
|
|
4
|
+
import { ref } from "#imports";
|
|
20
5
|
const props = defineProps({
|
|
21
6
|
rate: { type: String, required: true },
|
|
22
7
|
daysRemaining: { type: Number, required: false, default: 0 },
|
|
@@ -28,58 +13,8 @@ const props = defineProps({
|
|
|
28
13
|
email: { type: String, required: false },
|
|
29
14
|
showLogin: { type: Boolean, required: false }
|
|
30
15
|
});
|
|
31
|
-
const appConfig = useAppConfig();
|
|
32
|
-
const mode = appConfig.adataUI.mode;
|
|
33
|
-
defineEmits(["logout"]);
|
|
34
|
-
const { t } = useI18n();
|
|
35
16
|
const profileMenuOpen = ref(false);
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
title: t("header.profile.menu.personalInfo"),
|
|
39
|
-
icon: IProfile,
|
|
40
|
-
to: `https://${mode}.kz` + PAGES.profile.index
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
title: t("header.profile.menu.security"),
|
|
44
|
-
icon: ILock,
|
|
45
|
-
to: `https://${mode}.kz` + PAGES.profile.security
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
title: t("header.profile.menu.paymentHistory"),
|
|
49
|
-
icon: IReceipt,
|
|
50
|
-
to: `https://${mode}.kz` + PAGES.profile.paymentHistory
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
title: t("header.profile.menu.favourites"),
|
|
54
|
-
icon: IBookmark,
|
|
55
|
-
to: `https://${mode}.kz` + PAGES.profile.favourites
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
title: t("header.profile.menu.myReports"),
|
|
59
|
-
icon: IFile,
|
|
60
|
-
to: `https://${mode}.kz` + PAGES.profile.reports
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
title: t("header.profile.menu.browsingHistory"),
|
|
64
|
-
icon: IHistory,
|
|
65
|
-
to: `https://${mode}.kz` + PAGES.profile.browsingHistory
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
title: t("header.profile.menu.myGroups"),
|
|
69
|
-
icon: IUsers,
|
|
70
|
-
to: `https://${mode}.kz` + PAGES.profile.myGroups
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
title: t("header.profile.menu.notes"),
|
|
74
|
-
icon: IMessage,
|
|
75
|
-
to: `https://${mode}.kz` + PAGES.profile.notes
|
|
76
|
-
}
|
|
77
|
-
];
|
|
78
|
-
const onReplenish = () => {
|
|
79
|
-
if (window) {
|
|
80
|
-
window.location.href = `https://${mode}.kz/profile?popupBalance=1`;
|
|
81
|
-
}
|
|
82
|
-
};
|
|
17
|
+
defineEmits(["logout"]);
|
|
83
18
|
</script>
|
|
84
19
|
|
|
85
20
|
<template>
|
|
@@ -101,153 +36,21 @@ const onReplenish = () => {
|
|
|
101
36
|
:side-offset="20"
|
|
102
37
|
class="shadow-md"
|
|
103
38
|
>
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
<span class="mr-2 font-semibold lg:text-lg">{{ rate }}</span>
|
|
115
|
-
<a-status-badge
|
|
116
|
-
type="success"
|
|
117
|
-
class="!px-3 font-semibold text-white"
|
|
118
|
-
size="sm"
|
|
119
|
-
>
|
|
120
|
-
{{ t("header.profile.connected") }}
|
|
121
|
-
</a-status-badge>
|
|
122
|
-
</div>
|
|
123
|
-
<span class="bg-deepblue ml-2 rounded-xl px-2 py-1 text-xs lg:hidden">{{ balance.toLocaleString("RU-ru") }} ₸</span>
|
|
124
|
-
</div>
|
|
125
|
-
<div class="mt-2 hidden items-center justify-between lg:flex">
|
|
126
|
-
<div class="text-xs">
|
|
127
|
-
{{ t("header.profile.currentBalance") }}
|
|
128
|
-
<span class="ml-2 rounded-xl bg-deepblue-900 px-2 py-1">{{ balance.toLocaleString("RU-ru") }} ₸</span>
|
|
129
|
-
</div>
|
|
130
|
-
<a-button
|
|
131
|
-
size="sm"
|
|
132
|
-
view="outline"
|
|
133
|
-
variant="ghost"
|
|
134
|
-
@click="onReplenish"
|
|
135
|
-
>
|
|
136
|
-
{{ t("header.profile.addBalance") }}
|
|
137
|
-
</a-button>
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
<!-- mobile -->
|
|
141
|
-
<div class="gradient-bg px-4 py-4 text-white dark:text-gray-900 lg:hidden">
|
|
142
|
-
<div class="flex justify-between gap-4 lg:mt-2">
|
|
143
|
-
<div class="flex flex-col items-center">
|
|
144
|
-
<div class="font-semibold">
|
|
145
|
-
{{ rate }}
|
|
146
|
-
</div>
|
|
147
|
-
<a-status-badge
|
|
148
|
-
type="success"
|
|
149
|
-
class="!px-3 font-semibold text-white dark:text-gray-900"
|
|
150
|
-
size="sm"
|
|
151
|
-
>
|
|
152
|
-
{{ t("header.profile.connected") }}
|
|
153
|
-
</a-status-badge>
|
|
154
|
-
</div>
|
|
155
|
-
<div class="flex min-w-[90px] flex-col">
|
|
156
|
-
<div class="font-semibold">
|
|
157
|
-
{{ t("header.profile.balance") }}
|
|
158
|
-
</div>
|
|
159
|
-
<div class="flex gap-1">
|
|
160
|
-
<a-status-badge
|
|
161
|
-
size="sm"
|
|
162
|
-
class="!px-3 font-semibold text-white dark:!bg-[#E3E5E8] dark:text-gray-900"
|
|
163
|
-
type="gray"
|
|
164
|
-
>
|
|
165
|
-
{{ balance.toLocaleString("RU-ru") }} ₸
|
|
166
|
-
</a-status-badge>
|
|
167
|
-
<button
|
|
168
|
-
class="flex h-[23px] w-[23px] items-center justify-center rounded-md bg-white text-deepblue-900 dark:bg-gray-900 dark:text-[#E3E5E8]"
|
|
169
|
-
@click="onReplenish"
|
|
170
|
-
>
|
|
171
|
-
<i-plus
|
|
172
|
-
width="16px"
|
|
173
|
-
height="16px"
|
|
174
|
-
/>
|
|
175
|
-
</button>
|
|
176
|
-
</div>
|
|
177
|
-
</div>
|
|
178
|
-
</div>
|
|
179
|
-
</div>
|
|
180
|
-
<div class="rounded-b-[0.5rem] bg-white p-4 dark:bg-[#232324]">
|
|
181
|
-
<div class="mb-2 flex justify-between gap-2 lg:hidden">
|
|
182
|
-
<a-status-badge
|
|
183
|
-
size="sm"
|
|
184
|
-
class="w-full py-[6px] font-semibold"
|
|
185
|
-
>
|
|
186
|
-
<span>
|
|
187
|
-
{{ t("header.profile.requests") }}
|
|
188
|
-
</span>
|
|
189
|
-
{{ limitRemaining }}
|
|
190
|
-
</a-status-badge>
|
|
191
|
-
<a-status-badge
|
|
192
|
-
size="sm"
|
|
193
|
-
class="w-full py-[6px] font-semibold"
|
|
194
|
-
>
|
|
195
|
-
<span>
|
|
196
|
-
{{ t("header.profile.daysLeft") }}
|
|
197
|
-
</span>
|
|
198
|
-
{{ daysRemaining }}
|
|
199
|
-
</a-status-badge>
|
|
200
|
-
</div>
|
|
201
|
-
<div class="grid grid-cols-2 gap-2">
|
|
202
|
-
<nuxt-link
|
|
203
|
-
v-for="item in items"
|
|
204
|
-
:key="item.title"
|
|
205
|
-
class="flex flex-col items-center rounded-[6px] bg-gray-50 py-[10px] text-center text-sm hover:bg-deepblue-900/10 active:bg-deepblue-900 active:text-white dark:bg-[#161617] active:dark:bg-[#E3E5E8] active:dark:text-gray-900 lg:px-4 lg:dark:bg-[#393D40] lg:dark:hover:bg-gray-900"
|
|
206
|
-
:to="item.to"
|
|
207
|
-
target="_blank"
|
|
208
|
-
>
|
|
209
|
-
<component
|
|
210
|
-
:is="item.icon"
|
|
211
|
-
class="h-[24px] w-[24px]"
|
|
212
|
-
/>
|
|
213
|
-
<span>{{ item.title }}</span>
|
|
214
|
-
</nuxt-link>
|
|
215
|
-
</div>
|
|
216
|
-
<div class="mt-2">
|
|
217
|
-
<div
|
|
218
|
-
v-if="oldVersion"
|
|
219
|
-
:url="oldVersion"
|
|
220
|
-
/>
|
|
221
|
-
</div>
|
|
222
|
-
<div
|
|
223
|
-
v-if="!isLargeScreen"
|
|
224
|
-
class="my-4 flex items-center justify-between text-sm"
|
|
225
|
-
>
|
|
226
|
-
<span>
|
|
227
|
-
{{ t("header.profile.colorScheme") }}
|
|
228
|
-
</span>
|
|
229
|
-
<color-mode />
|
|
230
|
-
</div>
|
|
231
|
-
<a-button
|
|
232
|
-
class="lg:mt-2"
|
|
233
|
-
block
|
|
234
|
-
@click="() => {
|
|
39
|
+
<adt-header-profile-menu-content
|
|
40
|
+
:email="email"
|
|
41
|
+
:is-authenticated="isAuthenticated"
|
|
42
|
+
:balance="balance"
|
|
43
|
+
:days-remaining="daysRemaining"
|
|
44
|
+
:limit-remaining="limitRemaining"
|
|
45
|
+
:rate="rate"
|
|
46
|
+
:replenish="replenish"
|
|
47
|
+
:show-login="showLogin"
|
|
48
|
+
@logout="() => {
|
|
235
49
|
$emit('logout');
|
|
236
50
|
profileMenuOpen = false;
|
|
237
51
|
}"
|
|
238
|
-
|
|
239
|
-
<i-logout class="h-5 w-5" />
|
|
240
|
-
<span>
|
|
241
|
-
{{ t("header.profile.logout") }}
|
|
242
|
-
</span>
|
|
243
|
-
</a-button>
|
|
244
|
-
</div>
|
|
245
|
-
</div>
|
|
52
|
+
/>
|
|
246
53
|
</dropdown-menu-content>
|
|
247
54
|
</dropdown-menu-portal>
|
|
248
55
|
</dropdown-menu-root>
|
|
249
56
|
</template>
|
|
250
|
-
|
|
251
|
-
<style scoped>
|
|
252
|
-
.gradient-bg{background:linear-gradient(236.46deg,#479fff -2.39%,#0070eb 79.1%)}
|
|
253
|
-
</style>
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import AStatusBadge from "../Tag.vue";
|
|
3
|
+
import ColorMode from "../ColorMode.vue";
|
|
4
|
+
import AButton from "../button/Button.vue";
|
|
5
|
+
import { PAGES } from "../../shared/constants/pages";
|
|
6
|
+
import IPlus from "#icons/plus.vue";
|
|
7
|
+
import ILogout from "#icons/navigation/logout.vue";
|
|
8
|
+
import { useAppConfig, useI18n } from "#imports";
|
|
9
|
+
import IProfile from "#icons/document/profile.vue";
|
|
10
|
+
import ILock from "#icons/lock.vue";
|
|
11
|
+
import IReceipt from "#icons/receipt/receipt.vue";
|
|
12
|
+
import IBookmark from "#icons/bookmark.vue";
|
|
13
|
+
import IFile from "#icons/file/file.vue";
|
|
14
|
+
import IHistory from "#icons/history.vue";
|
|
15
|
+
import IUsers from "#icons/users/users.vue";
|
|
16
|
+
import IMessage from "#icons/message.vue";
|
|
17
|
+
import { useMediaQuery } from "@vueuse/core";
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
rate: { type: String, required: true },
|
|
20
|
+
daysRemaining: { type: Number, required: false, default: 0 },
|
|
21
|
+
limitRemaining: { type: Number, required: false, default: 0 },
|
|
22
|
+
balance: { type: Number, required: true },
|
|
23
|
+
replenish: { type: String, required: false },
|
|
24
|
+
oldVersion: { type: String, required: false },
|
|
25
|
+
isAuthenticated: { type: Boolean, required: false },
|
|
26
|
+
email: { type: String, required: false },
|
|
27
|
+
showLogin: { type: Boolean, required: false }
|
|
28
|
+
});
|
|
29
|
+
const appConfig = useAppConfig();
|
|
30
|
+
const mode = appConfig.adataUI.mode;
|
|
31
|
+
const { t } = useI18n();
|
|
32
|
+
const isLargeScreen = useMediaQuery("(min-width: 1024px)");
|
|
33
|
+
defineEmits(["logout"]);
|
|
34
|
+
const items = [
|
|
35
|
+
{
|
|
36
|
+
title: t("header.profile.menu.personalInfo"),
|
|
37
|
+
icon: IProfile,
|
|
38
|
+
to: `https://${mode}.kz` + PAGES.profile.index
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
title: t("header.profile.menu.security"),
|
|
42
|
+
icon: ILock,
|
|
43
|
+
to: `https://${mode}.kz` + PAGES.profile.security
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
title: t("header.profile.menu.paymentHistory"),
|
|
47
|
+
icon: IReceipt,
|
|
48
|
+
to: `https://${mode}.kz` + PAGES.profile.paymentHistory
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
title: t("header.profile.menu.favourites"),
|
|
52
|
+
icon: IBookmark,
|
|
53
|
+
to: `https://${mode}.kz` + PAGES.profile.favourites
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
title: t("header.profile.menu.myReports"),
|
|
57
|
+
icon: IFile,
|
|
58
|
+
to: `https://${mode}.kz` + PAGES.profile.reports
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
title: t("header.profile.menu.browsingHistory"),
|
|
62
|
+
icon: IHistory,
|
|
63
|
+
to: `https://${mode}.kz` + PAGES.profile.browsingHistory
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
title: t("header.profile.menu.myGroups"),
|
|
67
|
+
icon: IUsers,
|
|
68
|
+
to: `https://${mode}.kz` + PAGES.profile.myGroups
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: t("header.profile.menu.notes"),
|
|
72
|
+
icon: IMessage,
|
|
73
|
+
to: `https://${mode}.kz` + PAGES.profile.notes
|
|
74
|
+
}
|
|
75
|
+
];
|
|
76
|
+
const onReplenish = () => {
|
|
77
|
+
if (window) {
|
|
78
|
+
window.location.href = `https://${mode}.kz/profile?popupBalance=1`;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<template>
|
|
84
|
+
<div class="max-w-full lg:w-[440px]">
|
|
85
|
+
<!-- desktop -->
|
|
86
|
+
<div
|
|
87
|
+
class="gradient-bg hidden px-4 py-4 text-white dark:text-gray-900 lg:block lg:rounded-t-[0.5rem] lg:px-8 lg:dark:text-white"
|
|
88
|
+
>
|
|
89
|
+
<div class="hidden text-sm lg:block">
|
|
90
|
+
{{ t("header.profile.tariff") }}
|
|
91
|
+
</div>
|
|
92
|
+
<div class="flex items-center justify-between gap-4 lg:mt-2">
|
|
93
|
+
<div>
|
|
94
|
+
<span class="mr-2 font-semibold lg:text-lg">{{ rate }}</span>
|
|
95
|
+
<a-status-badge
|
|
96
|
+
type="success"
|
|
97
|
+
class="!px-3 font-semibold text-white"
|
|
98
|
+
size="sm"
|
|
99
|
+
>
|
|
100
|
+
{{ t("header.profile.connected") }}
|
|
101
|
+
</a-status-badge>
|
|
102
|
+
</div>
|
|
103
|
+
<span class="bg-deepblue ml-2 rounded-xl px-2 py-1 text-xs lg:hidden">{{ balance.toLocaleString("RU-ru") }} ₸</span>
|
|
104
|
+
</div>
|
|
105
|
+
<div class="mt-2 hidden items-center justify-between lg:flex">
|
|
106
|
+
<div class="text-xs">
|
|
107
|
+
{{ t("header.profile.currentBalance") }}
|
|
108
|
+
<span class="ml-2 rounded-xl bg-deepblue-900 px-2 py-1">{{ balance.toLocaleString("RU-ru") }} ₸</span>
|
|
109
|
+
</div>
|
|
110
|
+
<a-button
|
|
111
|
+
size="sm"
|
|
112
|
+
view="outline"
|
|
113
|
+
variant="ghost"
|
|
114
|
+
@click="onReplenish"
|
|
115
|
+
>
|
|
116
|
+
{{ t("header.profile.addBalance") }}
|
|
117
|
+
</a-button>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
<!-- mobile -->
|
|
121
|
+
<div class="gradient-bg px-4 py-4 text-white dark:text-gray-900 lg:hidden">
|
|
122
|
+
<div class="flex justify-between gap-4 lg:mt-2">
|
|
123
|
+
<div class="flex flex-col items-center">
|
|
124
|
+
<div class="font-semibold">
|
|
125
|
+
{{ rate }}
|
|
126
|
+
</div>
|
|
127
|
+
<a-status-badge
|
|
128
|
+
type="success"
|
|
129
|
+
class="!px-3 font-semibold text-white dark:text-gray-900"
|
|
130
|
+
size="sm"
|
|
131
|
+
>
|
|
132
|
+
{{ t("header.profile.connected") }}
|
|
133
|
+
</a-status-badge>
|
|
134
|
+
</div>
|
|
135
|
+
<div class="flex min-w-[90px] flex-col">
|
|
136
|
+
<div class="font-semibold">
|
|
137
|
+
{{ t("header.profile.balance") }}
|
|
138
|
+
</div>
|
|
139
|
+
<div class="flex gap-1">
|
|
140
|
+
<a-status-badge
|
|
141
|
+
size="sm"
|
|
142
|
+
class="!px-3 font-semibold text-white dark:!bg-[#E3E5E8] dark:text-gray-900"
|
|
143
|
+
type="gray"
|
|
144
|
+
>
|
|
145
|
+
{{ balance.toLocaleString("RU-ru") }} ₸
|
|
146
|
+
</a-status-badge>
|
|
147
|
+
<button
|
|
148
|
+
class="flex h-[23px] w-[23px] items-center justify-center rounded-md bg-white text-deepblue-900 dark:bg-gray-900 dark:text-[#E3E5E8]"
|
|
149
|
+
@click="onReplenish"
|
|
150
|
+
>
|
|
151
|
+
<i-plus
|
|
152
|
+
width="16px"
|
|
153
|
+
height="16px"
|
|
154
|
+
/>
|
|
155
|
+
</button>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
<div class="rounded-b-[0.5rem] bg-white p-4 dark:bg-[#232324]">
|
|
161
|
+
<div class="mb-2 flex justify-between gap-2 lg:hidden">
|
|
162
|
+
<a-status-badge
|
|
163
|
+
size="sm"
|
|
164
|
+
class="w-full py-[6px] font-semibold"
|
|
165
|
+
>
|
|
166
|
+
<span>
|
|
167
|
+
{{ t("header.profile.requests") }}
|
|
168
|
+
</span>
|
|
169
|
+
{{ limitRemaining }}
|
|
170
|
+
</a-status-badge>
|
|
171
|
+
<a-status-badge
|
|
172
|
+
size="sm"
|
|
173
|
+
class="w-full py-[6px] font-semibold"
|
|
174
|
+
>
|
|
175
|
+
<span>
|
|
176
|
+
{{ t("header.profile.daysLeft") }}
|
|
177
|
+
</span>
|
|
178
|
+
{{ daysRemaining }}
|
|
179
|
+
</a-status-badge>
|
|
180
|
+
</div>
|
|
181
|
+
<div class="grid grid-cols-2 gap-2">
|
|
182
|
+
<nuxt-link
|
|
183
|
+
v-for="item in items"
|
|
184
|
+
:key="item.title"
|
|
185
|
+
class="flex flex-col items-center rounded-[6px] bg-gray-50 py-[10px] text-center text-sm hover:bg-deepblue-900/10 active:bg-deepblue-900 active:text-white dark:bg-[#161617] active:dark:bg-[#E3E5E8] active:dark:text-gray-900 lg:px-4 lg:dark:bg-[#393D40] lg:dark:hover:bg-gray-900"
|
|
186
|
+
:to="item.to"
|
|
187
|
+
target="_blank"
|
|
188
|
+
>
|
|
189
|
+
<component
|
|
190
|
+
:is="item.icon"
|
|
191
|
+
class="h-[24px] w-[24px]"
|
|
192
|
+
/>
|
|
193
|
+
<span>{{ item.title }}</span>
|
|
194
|
+
</nuxt-link>
|
|
195
|
+
</div>
|
|
196
|
+
<div class="mt-2">
|
|
197
|
+
<div
|
|
198
|
+
v-if="oldVersion"
|
|
199
|
+
:url="oldVersion"
|
|
200
|
+
/>
|
|
201
|
+
</div>
|
|
202
|
+
<div
|
|
203
|
+
v-if="!isLargeScreen"
|
|
204
|
+
class="my-4 flex items-center justify-between text-sm"
|
|
205
|
+
>
|
|
206
|
+
<span>
|
|
207
|
+
{{ t("header.profile.colorScheme") }}
|
|
208
|
+
</span>
|
|
209
|
+
<color-mode />
|
|
210
|
+
</div>
|
|
211
|
+
<a-button
|
|
212
|
+
class="lg:mt-2"
|
|
213
|
+
block
|
|
214
|
+
@click="$emit('logout')"
|
|
215
|
+
>
|
|
216
|
+
<i-logout class="h-5 w-5" />
|
|
217
|
+
<span>
|
|
218
|
+
{{ t("header.profile.logout") }}
|
|
219
|
+
</span>
|
|
220
|
+
</a-button>
|
|
221
|
+
</div>
|
|
222
|
+
</div>
|
|
223
|
+
</template>
|
|
224
|
+
|
|
225
|
+
<style scoped>
|
|
226
|
+
.gradient-bg{background:linear-gradient(236.46deg,#479fff -2.39%,#0070eb 79.1%)}
|
|
227
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
rate: string;
|
|
3
|
+
daysRemaining?: number;
|
|
4
|
+
limitRemaining?: number;
|
|
5
|
+
balance: number;
|
|
6
|
+
replenish?: string;
|
|
7
|
+
oldVersion?: string;
|
|
8
|
+
isAuthenticated?: boolean;
|
|
9
|
+
email?: string;
|
|
10
|
+
showLogin?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
|
|
13
|
+
daysRemaining: number;
|
|
14
|
+
limitRemaining: number;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
export default _default;
|