adata-ui 2.1.40-beta.18 → 2.1.40-beta.19
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/.playground/app.vue +102 -0
- package/assets/styles/index.scss +67 -5
- package/components/elements/a-select-row/ASelectRowV2.vue +214 -0
- package/components/elements/a-select-row/index.vue +3 -5
- package/components/elements/accordion/AAccordion.vue +5 -3
- package/components/elements/accordion/AAccordionGroup/AAccordionGroup.vue +3 -3
- package/components/elements/alert/AAlert.vue +34 -47
- package/components/elements/bg-block/ABgBlock.vue +1 -1
- package/components/elements/button/AButton.vue +3 -3
- package/components/elements/button/AButtonV2.vue +133 -0
- package/components/elements/button-login/index.vue +6 -10
- package/components/elements/chip-wrapper/AChipWrapper.vue +1 -1
- package/components/elements/chips/AChips.vue +2 -2
- package/components/elements/companies/AOurClients.vue +3 -1
- package/components/elements/curve-block-v2/ACurveBlockV2.vue +85 -0
- package/components/elements/digit-badge/ADigitBadge.vue +24 -22
- package/components/elements/feature-description/AFeatureDescription.vue +1 -1
- package/components/elements/leave-note/ALeaveNote.vue +39 -18
- package/components/elements/pagination/APagination.vue +7 -7
- package/components/elements/segmented/ASegmentedV2.vue +151 -0
- package/components/elements/select/ASelect.vue +4 -4
- package/components/elements/select/ASelectMobile.vue +2 -2
- package/components/elements/select/ASelectV2.vue +588 -0
- package/components/elements/select/ui/select-button.vue +1 -1
- package/components/elements/show-more/AShowMoreV2.vue +26 -0
- package/components/elements/slider/ASlider.vue +174 -0
- package/components/elements/slider/ASliderItem.vue +31 -0
- package/components/elements/slider/types.ts +21 -0
- package/components/elements/star-rating/AStarRating.vue +12 -4
- package/components/elements/status-badge/AStatusBadge.vue +91 -44
- package/components/elements/step-slider/AStepSliderColCard.vue +232 -0
- package/components/elements/step-slider/AStepSliderColNumber.vue +178 -0
- package/components/elements/table/ATable.vue +1 -1
- package/components/elements/table/table.config.ts +2 -2
- package/components/elements/tree-select/ATreeSelect.vue +97 -113
- package/components/elements/tree-select/TreeService.ts +142 -207
- package/components/elements/tree-select/components/ATreeSelectNode.vue +104 -0
- package/components/elements/tree-select/types.ts +40 -11
- package/components/elements/tree-select/utils.ts +30 -0
- package/components/elements/tree-select-modal/ATreeSelectModal.vue +217 -0
- package/components/features/color-mode/AColorMode.client.vue +74 -32
- package/components/features/dropdown/ADropdownV2.vue +140 -0
- package/components/features/lang-switcher/lang-switcher.vue +125 -40
- package/components/features/payment/banner/BasicPlusLimitBanner.vue +3 -3
- package/components/features/payment/banner/PaymentBanner.vue +3 -3
- package/components/features/payment/banner/UpSellBanner.vue +3 -3
- package/components/features/payment/process/PaymentKaspiQrSidePanel.vue +45 -27
- package/components/features/payment/process/PaymentKaspiRedirectSidePanel.vue +34 -23
- package/components/features/payment/process/PaymentMethodSidePanel.vue +66 -49
- package/components/features/payment/process/PaymentProcess.vue +6 -6
- package/components/features/payment/process/PaymentTopUpSidePanel.vue +49 -63
- package/components/features/pk-mobile-services/APkMobileServices.vue +6 -28
- package/components/features//321/201hange-version/AChangeVersion.vue +2 -2
- package/components/forms/checkbox/ACheckbox.vue +1 -1
- package/components/forms/checkbox/ACheckboxV2.vue +229 -0
- package/components/forms/feedback-form/FeedbackForm.vue +8 -8
- package/components/forms/feedback-form/FeedbackFormV2.vue +182 -0
- package/components/forms/input/AInputV2.vue +542 -0
- package/components/forms/input/date/AInputDate.vue +2 -2
- package/components/forms/input/password/AInputPassword.vue +8 -2
- package/components/forms/input/standard/AInputStandard.vue +3 -3
- package/components/forms/input/textarea/ATextarea.vue +2 -2
- package/components/forms/input/textarea/ATextareaV2.vue +248 -0
- package/components/forms/toggle/AToggle.vue +2 -3
- package/components/forms/toggle/AToggleV2.vue +71 -0
- package/components/modals/AnotherDeviceModal.vue +22 -18
- package/components/modals/ApplicationAcceptedModal.vue +12 -15
- package/components/modals/ConnectingTariffModal.vue +13 -20
- package/components/modals/ContactsMobileModel.vue +1 -1
- package/components/modals/ContentNavigationModal.vue +77 -333
- package/components/modals/Insufficient-funds-modal.vue +18 -33
- package/components/modals/LimitReachedModal.vue +17 -14
- package/components/modals/NoAccessModal.vue +9 -11
- package/components/modals/PaymentMethodModal.vue +1 -1
- package/components/modals/ReportBugConfirmModal.vue +12 -10
- package/components/modals/ReportBugModal.vue +46 -38
- package/components/modals/Resend.vue +9 -10
- package/components/modals/SubmitApplicationModal.vue +27 -24
- package/components/modals/id/IdBanner.vue +3 -3
- package/components/modals/id/IdConfirmAccountOtpModal.vue +4 -9
- package/components/modals/id/IdLoginModal.vue +3 -8
- package/components/modals/id/IdModals.vue +23 -10
- package/components/modals/id/IdRecoveryModal.vue +1 -1
- package/components/modals/id/IdTwoFactorModal.vue +3 -8
- package/components/navigation/bottom-navigation/ABottomNavigation.vue +1 -1
- package/components/navigation/breadcrumbs/ABreadcrumbs.vue +106 -45
- package/components/navigation/breadcrumbs/types.ts +3 -0
- package/components/navigation/footer/AFooter.vue +39 -40
- package/components/navigation/footer/ui/a-footer-accordion.vue +9 -9
- package/components/navigation/header/AHeader.vue +68 -51
- package/components/navigation/header/AlmatyContacts.vue +78 -78
- package/components/navigation/header/CardGallery.vue +9 -7
- package/components/navigation/header/ContactMenu.vue +26 -92
- package/components/navigation/header/HeaderLink.vue +181 -213
- package/components/navigation/header/HeaderUsage.vue +139 -0
- package/components/navigation/header/ListItem.vue +2 -2
- package/components/navigation/header/NavCard.vue +1 -1
- package/components/navigation/header/NavList.vue +33 -92
- package/components/navigation/header/NotificationsMenu.vue +2 -3
- package/components/navigation/header/ProductMenu.vue +81 -127
- package/components/navigation/header/ProfileMenu.vue +122 -151
- package/components/navigation/header/SystemNotification.vue +108 -0
- package/components/navigation/mobile-navigation/AMobileNavigation.vue +23 -15
- package/components/navigation/pill-tabs/APillTabs.vue +2 -2
- package/components/navigation/pill-tabs/APillTabsV2.vue +226 -0
- package/components/overlays/drawer/ADrawerV2.vue +335 -0
- package/components/overlays/modal/AModal.vue +4 -4
- package/components/overlays/modal/AModalV2.vue +397 -0
- package/components/overlays/side-panel/ASidePanel.vue +10 -7
- package/components/overlays/sideover/ASlideover.vue +6 -6
- package/components/overlays/tooltip/ATooltip.vue +1 -1
- package/components/overlays/tooltip/ATooltipV2.vue +223 -0
- package/components/overlays/tooltip/types.ts +26 -0
- package/components/overlays/tooltip/useTooltipTrigger.ts +101 -0
- package/components/transitions/ATransitionHeight.vue +1 -1
- package/composables/useAccessTokenCookie.ts +25 -0
- package/composables/useActiveNavigation.ts +84 -0
- package/composables/useChipOverflow.ts +92 -0
- package/composables/useHeaderNavigationLinks.ts +140 -98
- package/icons/archive.vue +16 -0
- package/icons/arrow/arrow-left-right.vue +8 -0
- package/icons/arrow/arrow-right.vue +14 -0
- package/icons/arrow/arrows-in.vue +11 -0
- package/icons/arrow/arrows-out.vue +11 -0
- package/icons/arrow/arrows-resize-in.vue +38 -0
- package/icons/arrow/arrows-resize-out.vue +17 -0
- package/icons/bill.vue +3 -0
- package/icons/bot.vue +52 -0
- package/icons/briefcase.vue +14 -0
- package/icons/building.vue +9 -0
- package/icons/car-side.vue +16 -0
- package/icons/cart.vue +15 -0
- package/icons/chart-no-axes-column.vue +3 -0
- package/icons/clock-time.vue +24 -0
- package/icons/cloud/cloud-upload.vue +3 -0
- package/icons/code.vue +9 -0
- package/icons/compare-outlined.vue +8 -0
- package/icons/dots-horizontal.vue +31 -0
- package/icons/download-line.vue +13 -0
- package/icons/download-rounded.vue +15 -0
- package/icons/egov.vue +41 -0
- package/icons/elicense.vue +38 -0
- package/icons/favourite-bookmark-outline.vue +17 -0
- package/icons/file/file-check-corner.vue +3 -0
- package/icons/file/file-spreadsheet.vue +3 -0
- package/icons/file-pen.vue +31 -0
- package/icons/file-stack.vue +31 -0
- package/icons/file-types/excel.vue +131 -0
- package/icons/file-types/html.vue +13 -0
- package/icons/file-types/jpeg.vue +16 -0
- package/icons/file-types/pdf.vue +11 -0
- package/icons/file-types/png.vue +11 -0
- package/icons/file-types/rar.vue +11 -0
- package/icons/file-types/word.vue +50 -0
- package/icons/file-types/zip.vue +11 -0
- package/icons/gauge.vue +17 -0
- package/icons/git-compare.vue +38 -0
- package/icons/git-fork.vue +3 -0
- package/icons/graduation-cap.vue +31 -0
- package/icons/graph-loading.vue +34 -0
- package/icons/headset.vue +6 -0
- package/icons/help-question-circle.vue +26 -0
- package/icons/in-row-type.vue +46 -0
- package/icons/in-table-type.vue +29 -0
- package/icons/landmark.vue +3 -0
- package/icons/layers.vue +3 -0
- package/icons/letter/letter-a.vue +6 -0
- package/icons/letter/letter-b.vue +6 -0
- package/icons/letter/letter-c.vue +6 -0
- package/icons/letter/letter-d.vue +6 -0
- package/icons/letter/letter-e.vue +6 -0
- package/icons/link-url.vue +3 -0
- package/icons/list-tree.vue +3 -0
- package/icons/mail-question-mark.vue +8 -0
- package/icons/message/message-square.vue +3 -0
- package/icons/message-dotted.vue +30 -0
- package/icons/network.vue +3 -0
- package/icons/newspaper.vue +3 -0
- package/icons/notification-error.vue +17 -0
- package/icons/person.vue +22 -0
- package/icons/phone-call.vue +6 -0
- package/icons/phone-reversed.vue +3 -0
- package/icons/route.vue +7 -0
- package/icons/scan-search.vue +3 -0
- package/icons/settings.vue +26 -0
- package/icons/shield-alert.vue +31 -0
- package/icons/shield-verified.vue +14 -0
- package/icons/socials/facebook-color.vue +16 -0
- package/icons/socials/globe-color.vue +16 -0
- package/icons/socials/instagram-color.vue +46 -0
- package/icons/socials/linkedin-color.vue +14 -0
- package/icons/socials/telegram-color.vue +16 -0
- package/icons/socials/tiktok-color.vue +14 -0
- package/icons/socials/vk-color.vue +16 -0
- package/icons/socials/youtube-color.vue +16 -0
- package/icons/sparkles.vue +3 -0
- package/icons/sun.vue +13 -3
- package/icons/users-round.vue +3 -0
- package/icons/view-eye-open.vue +13 -0
- package/icons/workflow.vue +3 -0
- package/icons/zap.vue +3 -0
- package/lang/en.ts +49 -5
- package/lang/kk.ts +50 -6
- package/lang/ru.ts +51 -7
- package/package.json +1 -1
- package/plugins/toast.client.ts +38 -55
- package/shared/constans/pages.ts +8 -2
- package/tailwind.config.ts +147 -116
- package/utils/twMerge.ts +34 -0
- package/components/elements/tree-select/components/tree-select-nodes.vue +0 -91
- package/components/navigation/header/TopHeader.vue +0 -196
|
@@ -1,196 +1,167 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { useHeaderMenuLinks } from '#adata-ui/composables/useHeaderNavigationLinks'
|
|
3
|
+
import Calendar from '#adata-ui/icons/calendar.vue'
|
|
4
|
+
import Gauge from '#adata-ui/icons/gauge.vue'
|
|
2
5
|
import IconLogout from '#adata-ui/icons/logout.vue'
|
|
3
6
|
import { useMediaQuery } from '@vueuse/core'
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
9
|
+
daysRemaining: 0,
|
|
10
|
+
limitRemaining: 0,
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
defineEmits(['logout'])
|
|
6
14
|
|
|
7
15
|
const isLargeScreen = useMediaQuery('(min-width: 1024px)')
|
|
8
16
|
|
|
9
17
|
interface Props {
|
|
10
18
|
rate: string
|
|
11
|
-
daysRemaining
|
|
12
|
-
limitRemaining
|
|
19
|
+
daysRemaining?: number
|
|
20
|
+
limitRemaining?: number
|
|
13
21
|
balance: number
|
|
22
|
+
email?: string
|
|
14
23
|
replenish?: string
|
|
15
24
|
oldVersion?: string
|
|
16
25
|
}
|
|
17
26
|
|
|
18
|
-
const
|
|
19
|
-
daysRemaining: 0,
|
|
20
|
-
limitRemaining: 0
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
defineEmits(['logout'])
|
|
27
|
+
const formattedBalance = computed(() => props.balance.toLocaleString('ru-RU'))
|
|
24
28
|
|
|
25
29
|
const { t } = useI18n()
|
|
26
30
|
|
|
27
|
-
const { locale } = useI18n()
|
|
28
|
-
|
|
29
|
-
// const { topUpSidePanel } = usePayment()
|
|
30
|
-
|
|
31
31
|
const items = useHeaderMenuLinks()
|
|
32
32
|
|
|
33
33
|
const { topUpSidePanel, rateId } = usePayment()
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
// if (myLayer.authMode === 'locale') {
|
|
37
|
-
// topUpSidePanel.value = true
|
|
38
|
-
// return
|
|
39
|
-
// }
|
|
35
|
+
function onReplenish() {
|
|
40
36
|
rateId.value = ''
|
|
41
37
|
topUpSidePanel.value = true
|
|
42
38
|
}
|
|
43
39
|
</script>
|
|
44
40
|
|
|
45
41
|
<template>
|
|
46
|
-
<div class="
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
class="
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
</div>
|
|
67
|
-
<div class="mt-2 hidden items-center justify-between lg:flex lg:flex-col">
|
|
68
|
-
<div class="items-center justify-between lg:flex lg:w-full text-xs">
|
|
69
|
-
{{ t('header.profile.currentBalance') }}
|
|
70
|
-
<span class="ml-2 rounded-xl bg-deepblue-900 px-2 py-1">{{ balance.toLocaleString('RU-ru') }} ₸</span>
|
|
71
|
-
</div>
|
|
72
|
-
<a-button
|
|
73
|
-
size="sm"
|
|
74
|
-
class="w-full mt-4"
|
|
75
|
-
view="outline"
|
|
76
|
-
variant="ghost"
|
|
77
|
-
@click="onReplenish"
|
|
78
|
-
>
|
|
79
|
-
<a-icon-plus-circle />
|
|
80
|
-
{{ t('header.profile.addBalance') }}
|
|
81
|
-
</a-button>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
<!-- mobile -->
|
|
85
|
-
<div class="gradient-bg px-4 py-4 text-white dark:text-gray-900 lg:hidden">
|
|
86
|
-
<div class="flex justify-between gap-4 lg:mt-2">
|
|
87
|
-
<div class="flex flex-col items-center">
|
|
88
|
-
<div class="font-semibold">
|
|
89
|
-
{{ rate }}
|
|
42
|
+
<div class="w-full overflow-hidden bg-white text-deepblue-900 dark:bg-gray-900 dark:text-gray-200 lg:w-[320px] lg:rounded-lg lg:border lg:border-gray-200 lg:dark:border-gray-800">
|
|
43
|
+
<div class="p-2">
|
|
44
|
+
<div class="relative overflow-hidden rounded-lg bg-gradient-to-br from-blue-700/95 to-blue-500/85 p-3 text-white">
|
|
45
|
+
<div class="pointer-events-none absolute -right-8 -top-10 size-28 rounded-full bg-white/20 blur-2xl" aria-hidden="true" />
|
|
46
|
+
|
|
47
|
+
<div class="relative">
|
|
48
|
+
<p class="text-overline-medium uppercase text-white/70">
|
|
49
|
+
{{ t('header.profile.tariff') }}
|
|
50
|
+
</p>
|
|
51
|
+
<div class="mt-0.5 flex items-center justify-between gap-2">
|
|
52
|
+
<p class="truncate text-h4">
|
|
53
|
+
{{ rate }}
|
|
54
|
+
</p>
|
|
55
|
+
<span class="inline-flex shrink-0 items-center gap-1.5 rounded-full px-2 py-0.5 text-body-sm-medium text-white ring-1 ring-inset ring-white/20">
|
|
56
|
+
<span class="relative flex size-1.5 items-center justify-center">
|
|
57
|
+
<span class="absolute inline-flex size-full animate-ping rounded-full bg-green-400/80" />
|
|
58
|
+
<span class="relative inline-flex size-1.5 rounded-full bg-green-400" />
|
|
59
|
+
</span>
|
|
60
|
+
{{ t('header.profile.connected') }}
|
|
61
|
+
</span>
|
|
90
62
|
</div>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
63
|
+
|
|
64
|
+
<p
|
|
65
|
+
v-if="email"
|
|
66
|
+
class="mt-1 truncate text-body-sm text-white/75 lg:hidden"
|
|
67
|
+
data-test-id="profile-menu-email"
|
|
95
68
|
>
|
|
96
|
-
{{
|
|
97
|
-
</
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
69
|
+
{{ email }}
|
|
70
|
+
</p>
|
|
71
|
+
|
|
72
|
+
<div class="my-2 h-px bg-white/15" />
|
|
73
|
+
|
|
74
|
+
<div class="flex items-center justify-between gap-2">
|
|
75
|
+
<span class="text-body-sm text-white/80">{{ t('header.profile.currentBalance') }}</span>
|
|
76
|
+
<span class="text-body-lg font-bold tabular-nums">{{ formattedBalance }} ₸</span>
|
|
102
77
|
</div>
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
class="
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
78
|
+
|
|
79
|
+
<div class="mt-2 grid grid-cols-2 gap-2 lg:hidden">
|
|
80
|
+
<div class="flex items-center gap-2 rounded-md px-2 py-1.5 ring-1 ring-inset ring-white/15">
|
|
81
|
+
<gauge class="size-4 shrink-0 text-white/80" />
|
|
82
|
+
<div class="min-w-0">
|
|
83
|
+
<p class="truncate text-body-sm uppercase leading-none text-white/70">
|
|
84
|
+
{{ t('header.profile.requests') }}
|
|
85
|
+
</p>
|
|
86
|
+
<p class="mt-1 text-body-md font-bold tabular-nums leading-none">
|
|
87
|
+
{{ limitRemaining }}
|
|
88
|
+
</p>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="flex items-center gap-2 rounded-md px-2 py-1.5 ring-1 ring-inset ring-white/15">
|
|
92
|
+
<calendar class="size-4 shrink-0 text-white/80" />
|
|
93
|
+
<div class="min-w-0">
|
|
94
|
+
<p class="truncate text-body-sm uppercase leading-none text-white/70">
|
|
95
|
+
{{ t('header.profile.daysLeft') }}
|
|
96
|
+
</p>
|
|
97
|
+
<p class="mt-1 text-body-md font-bold tabular-nums leading-none">
|
|
98
|
+
{{ daysRemaining }}
|
|
99
|
+
</p>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
120
102
|
</div>
|
|
103
|
+
|
|
104
|
+
<button
|
|
105
|
+
type="button"
|
|
106
|
+
class="mt-2.5 inline-flex h-8 w-full cursor-pointer items-center justify-center gap-1.5 rounded-full bg-white px-3 text-body-md-strong text-blue-700 shadow-sm transition-all duration-150 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/70 focus-visible:ring-offset-2 focus-visible:ring-offset-blue-600 active:scale-[0.98]"
|
|
107
|
+
@click="onReplenish"
|
|
108
|
+
>
|
|
109
|
+
<a-icon-plus-circle class="size-4" />
|
|
110
|
+
<span class="bg-gradient-to-r from-blue-700 to-blue-500 bg-clip-text text-transparent">
|
|
111
|
+
{{ t('header.profile.addBalance') }}
|
|
112
|
+
</span>
|
|
113
|
+
</button>
|
|
121
114
|
</div>
|
|
122
115
|
</div>
|
|
123
116
|
</div>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
>
|
|
156
|
-
<component
|
|
157
|
-
:is="item.icon"
|
|
158
|
-
class="h-[24px] w-[24px]"
|
|
159
|
-
/>
|
|
160
|
-
<span class="dark:text-[#E3E5E8] text-[#2C3E50]">{{ item.title }}</span>
|
|
161
|
-
</nuxt-link-locale>
|
|
162
|
-
</div>
|
|
163
|
-
<div class="mt-2">
|
|
164
|
-
<a-change-version
|
|
165
|
-
v-if="oldVersion"
|
|
166
|
-
:url="oldVersion"
|
|
167
|
-
/>
|
|
168
|
-
</div>
|
|
117
|
+
|
|
118
|
+
<nav class="flex flex-col px-2 pb-2">
|
|
119
|
+
<nuxt-link-locale
|
|
120
|
+
v-for="item in items"
|
|
121
|
+
:key="item.title"
|
|
122
|
+
class="group flex items-center gap-3 rounded-md px-2.5 py-2 text-body-md transition-colors hover:bg-gray-50 dark:hover:bg-gray-800/60"
|
|
123
|
+
:to="item.to"
|
|
124
|
+
:data-test-id="item?.dataTestId"
|
|
125
|
+
target="_blank"
|
|
126
|
+
>
|
|
127
|
+
<!-- <span -->
|
|
128
|
+
<!-- class="flex size-8 shrink-0 items-center justify-center rounded-md border border-blue-100 bg-blue-50 text-blue-700 dark:border-blue-900/40 dark:bg-blue-900/30 dark:text-blue-400" -->
|
|
129
|
+
<!-- > -->
|
|
130
|
+
<!-- <component -->
|
|
131
|
+
<!-- :is="item.icon" -->
|
|
132
|
+
<!-- class="size-4" -->
|
|
133
|
+
<!-- /> -->
|
|
134
|
+
<!-- </span> -->
|
|
135
|
+
<span class="truncate text-deepblue-900 group-hover:text-blue-700 dark:text-gray-200 dark:group-hover:text-blue-400">
|
|
136
|
+
{{ item.title }}
|
|
137
|
+
</span>
|
|
138
|
+
</nuxt-link-locale>
|
|
139
|
+
</nav>
|
|
140
|
+
|
|
141
|
+
<div class="border-t border-gray-100 p-2 dark:border-gray-800">
|
|
142
|
+
<a-change-version
|
|
143
|
+
v-if="oldVersion"
|
|
144
|
+
:url="oldVersion"
|
|
145
|
+
class="mb-2"
|
|
146
|
+
/>
|
|
147
|
+
|
|
169
148
|
<div
|
|
170
149
|
v-if="!isLargeScreen"
|
|
171
|
-
class="
|
|
150
|
+
class="flex items-center justify-between rounded-md px-2.5 py-2 text-body-md text-deepblue-900 dark:text-gray-200"
|
|
172
151
|
>
|
|
173
|
-
<span>
|
|
174
|
-
{{ t('header.profile.colorScheme') }}
|
|
175
|
-
</span>
|
|
152
|
+
<span>{{ t('header.profile.colorScheme') }}</span>
|
|
176
153
|
<a-color-mode />
|
|
177
154
|
</div>
|
|
178
155
|
|
|
179
|
-
<
|
|
180
|
-
|
|
156
|
+
<button
|
|
157
|
+
type="button"
|
|
158
|
+
class="flex w-full cursor-pointer items-center gap-3 rounded-md px-2.5 py-2 text-body-md-medium text-red-600 transition-colors hover:bg-red-50 dark:text-red-400 dark:hover:bg-red-900/20"
|
|
181
159
|
data-test-id="logout-button"
|
|
182
160
|
@click="$emit('logout')"
|
|
183
161
|
>
|
|
184
|
-
<icon-logout class="
|
|
185
|
-
<span>
|
|
186
|
-
|
|
187
|
-
</span>
|
|
188
|
-
</div>
|
|
162
|
+
<icon-logout class="size-4 shrink-0" />
|
|
163
|
+
<span>{{ t('header.profile.logout') }}</span>
|
|
164
|
+
</button>
|
|
189
165
|
</div>
|
|
190
166
|
</div>
|
|
191
167
|
</template>
|
|
192
|
-
<style scoped>
|
|
193
|
-
.gradient-bg {
|
|
194
|
-
background: linear-gradient(236.46deg, #479fff -2.39%, #0070eb 79.1%);
|
|
195
|
-
}
|
|
196
|
-
</style>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useCurrentModule } from '#adata-ui/composables/projectState'
|
|
3
|
+
|
|
4
|
+
defineOptions({ name: 'SystemNotification' })
|
|
5
|
+
|
|
6
|
+
interface SystemMessageDetail {
|
|
7
|
+
message: string
|
|
8
|
+
message_en: string
|
|
9
|
+
message_kz: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { locale } = useI18n()
|
|
13
|
+
const { myLayer } = useAppConfig()
|
|
14
|
+
const env = myLayer.mode
|
|
15
|
+
|
|
16
|
+
const currentModule = useCurrentModule()
|
|
17
|
+
const message = useCookie('message')
|
|
18
|
+
|
|
19
|
+
const systemMessage = ref<string | null>(null)
|
|
20
|
+
const isOpen = ref(false)
|
|
21
|
+
|
|
22
|
+
const moduleName = computed(() => (currentModule.value === 'pk' ? 'counterparty' : currentModule.value))
|
|
23
|
+
|
|
24
|
+
function localizedMessage(detail: SystemMessageDetail): string {
|
|
25
|
+
switch (locale.value) {
|
|
26
|
+
case 'en':
|
|
27
|
+
return detail.message_en
|
|
28
|
+
case 'kk':
|
|
29
|
+
return detail.message_kz
|
|
30
|
+
default:
|
|
31
|
+
return detail.message
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function fetchNotification() {
|
|
36
|
+
if (message.value !== undefined) return
|
|
37
|
+
|
|
38
|
+
try {
|
|
39
|
+
const res = await $fetch<{ data: { details?: SystemMessageDetail[] } }>(
|
|
40
|
+
`https://users.${env}.kz/api/v1/system-messages/active-list/`,
|
|
41
|
+
{ query: { module_name: moduleName.value } },
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
const detail = res.data?.details?.[0]
|
|
45
|
+
if (detail) {
|
|
46
|
+
systemMessage.value = localizedMessage(detail)
|
|
47
|
+
isOpen.value = true
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch (e) {
|
|
51
|
+
console.error(e instanceof Error ? e.message : e)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function close() {
|
|
56
|
+
message.value = false
|
|
57
|
+
isOpen.value = false
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
onMounted(fetchNotification)
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<template>
|
|
64
|
+
<client-only>
|
|
65
|
+
<transition name="system-notification">
|
|
66
|
+
<div
|
|
67
|
+
v-if="isOpen && systemMessage"
|
|
68
|
+
class="bg-[#FFF5E6] px-2 py-3 dark:bg-[#161617] md:px-0"
|
|
69
|
+
>
|
|
70
|
+
<div class="a-container flex items-center justify-between gap-4">
|
|
71
|
+
<div class="flex items-center gap-2">
|
|
72
|
+
<a-icon-info-circle
|
|
73
|
+
class="max-h-[16px] w-full max-w-[16px] shrink-0 stroke-orange-500"
|
|
74
|
+
/>
|
|
75
|
+
<span class="text-body-md-strong text-orange-500">{{ systemMessage }}</span>
|
|
76
|
+
</div>
|
|
77
|
+
<a-icon-x-mark
|
|
78
|
+
class="max-h-[16px] w-full max-w-[16px] shrink-0 cursor-pointer stroke-orange-500"
|
|
79
|
+
@click="close"
|
|
80
|
+
/>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</transition>
|
|
84
|
+
</client-only>
|
|
85
|
+
</template>
|
|
86
|
+
|
|
87
|
+
<style scoped>
|
|
88
|
+
.system-notification-enter-active,
|
|
89
|
+
.system-notification-leave-active {
|
|
90
|
+
transition:
|
|
91
|
+
opacity 200ms ease,
|
|
92
|
+
transform 200ms ease;
|
|
93
|
+
overflow: hidden;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.system-notification-enter-from,
|
|
97
|
+
.system-notification-leave-to {
|
|
98
|
+
opacity: 0;
|
|
99
|
+
transform: translateY(-100%);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@media (prefers-reduced-motion: reduce) {
|
|
103
|
+
.system-notification-enter-active,
|
|
104
|
+
.system-notification-leave-active {
|
|
105
|
+
transition: none;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
</style>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
3
|
-
import IconInvoice from '#adata-ui/icons/invoice.vue'
|
|
4
|
-
import ContentNavigationModal from '#adata-ui/components/modals/ContentNavigationModal.vue'
|
|
2
|
+
import type { ProjectKeys } from '#adata-ui/components/navigation/header/types'
|
|
5
3
|
import ContactsMobileModel from '#adata-ui/components/modals/ContactsMobileModel.vue'
|
|
4
|
+
import ContentNavigationModal from '#adata-ui/components/modals/ContentNavigationModal.vue'
|
|
6
5
|
import ProfileMenu from '#adata-ui/components/navigation/header/ProfileMenu.vue'
|
|
7
|
-
import
|
|
6
|
+
import AModal from '#adata-ui/components/overlays/modal/AModal.vue'
|
|
8
7
|
import { useCurrentModule } from '#adata-ui/composables/projectState'
|
|
9
|
-
import AModal from "#adata-ui/components/overlays/modal/AModal.vue";
|
|
10
8
|
import { useUrls } from '#adata-ui/composables/useUrls'
|
|
9
|
+
import IconInvoice from '#adata-ui/icons/invoice.vue'
|
|
10
|
+
import IconMenu from '#adata-ui/icons/menu-filled.vue'
|
|
11
11
|
|
|
12
12
|
interface Props {
|
|
13
13
|
replenish?: string
|
|
@@ -28,7 +28,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
28
28
|
balance: 0,
|
|
29
29
|
rate: 'Базовый',
|
|
30
30
|
showLogIn: true,
|
|
31
|
-
module: 'pk'
|
|
31
|
+
module: 'pk',
|
|
32
32
|
})
|
|
33
33
|
const emit = defineEmits(['logout'])
|
|
34
34
|
useCurrentModule().value = props.module
|
|
@@ -42,13 +42,13 @@ const items = [
|
|
|
42
42
|
{
|
|
43
43
|
label: 'modals.mobile_navigation.type_tariff',
|
|
44
44
|
icon: IconInvoice,
|
|
45
|
-
value: 'tariff'
|
|
45
|
+
value: 'tariff',
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
label: 'modals.mobile_navigation.type_main',
|
|
49
49
|
icon: IconMenu,
|
|
50
|
-
value: 'main'
|
|
51
|
-
}
|
|
50
|
+
value: 'main',
|
|
51
|
+
},
|
|
52
52
|
]
|
|
53
53
|
function onLogout() {
|
|
54
54
|
emit('logout')
|
|
@@ -57,11 +57,14 @@ function onLogout() {
|
|
|
57
57
|
watch(activeModule, (e) => {
|
|
58
58
|
if (e === 'main') {
|
|
59
59
|
isMain.value = true
|
|
60
|
-
}
|
|
60
|
+
}
|
|
61
|
+
else if (e === 'contacts') {
|
|
61
62
|
isContacts.value = true
|
|
62
|
-
}
|
|
63
|
+
}
|
|
64
|
+
else if (e === 'profile') {
|
|
63
65
|
isProfile.value = true
|
|
64
|
-
}
|
|
66
|
+
}
|
|
67
|
+
else if (e === 'tariff') {
|
|
65
68
|
navigateTo(`${landing}/tariffs`, { external: true })
|
|
66
69
|
}
|
|
67
70
|
activeModule.value = ''
|
|
@@ -72,9 +75,14 @@ watch(activeModule, (e) => {
|
|
|
72
75
|
<div>
|
|
73
76
|
<content-navigation-modal v-model="isMain" @push-main="isMain = false" />
|
|
74
77
|
<contacts-mobile-model v-model="isContacts" @push-main="isContacts = false" />
|
|
75
|
-
<a-modal
|
|
78
|
+
<a-modal
|
|
79
|
+
v-model="isProfile"
|
|
80
|
+
@logout="isProfile = false"
|
|
81
|
+
@push-main="isProfile = false"
|
|
82
|
+
>
|
|
76
83
|
<div class="-mx-4">
|
|
77
84
|
<profile-menu
|
|
85
|
+
:email="email"
|
|
78
86
|
:balance="balance"
|
|
79
87
|
:days-remaining="daysRemaining"
|
|
80
88
|
:limit-remaining="limitRemaining"
|
|
@@ -87,15 +95,15 @@ watch(activeModule, (e) => {
|
|
|
87
95
|
</a-modal>
|
|
88
96
|
<div ref="bottom" class="sticky bottom-0 z-[10000] lg:hidden">
|
|
89
97
|
<a-bottom-navigation
|
|
98
|
+
v-model="activeModule"
|
|
90
99
|
:is-authenticated="isAuthenticated"
|
|
91
100
|
:email="email"
|
|
92
101
|
:days-remaining="daysRemaining"
|
|
93
102
|
:limit-remaining="limitRemaining"
|
|
94
103
|
:rate="rate"
|
|
95
104
|
:balance="balance"
|
|
96
|
-
@logout="onLogout"
|
|
97
|
-
v-model="activeModule"
|
|
98
105
|
:items="items"
|
|
106
|
+
@logout="onLogout"
|
|
99
107
|
/>
|
|
100
108
|
</div>
|
|
101
109
|
</div>
|
|
@@ -115,14 +115,14 @@ const viewTypeValues: ViewType = {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
const defaultClasses = (isDisabled: boolean) => [
|
|
118
|
-
'text-sm rounded-
|
|
118
|
+
'text-sm rounded-sm outline-none select-none focus-visible:shadow-[0_0_0_4px#1B64B3]',
|
|
119
119
|
isDisabled ? 'bg-deepblue-900/5 dark:bg-gray-200/5 text-gray-500 dark:text-gray-500' : '',
|
|
120
120
|
props.view === 'transparent' && isDisabled ? 'bg-transparent' : '',
|
|
121
121
|
viewTypeValues[props.view]['default'],
|
|
122
122
|
props.block ? 'w-full' : ''
|
|
123
123
|
]
|
|
124
124
|
const selectedClasses = () => [
|
|
125
|
-
'text-sm rounded-
|
|
125
|
+
'text-sm rounded-sm select-none focus-visible:shadow-[0_0_0_4px#1B64B3]',
|
|
126
126
|
viewTypeValues[props.view]['selected'],
|
|
127
127
|
props.block ? 'w-full' : ''
|
|
128
128
|
]
|