adata-ui 4.0.16 → 4.0.18

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 CHANGED
@@ -5,7 +5,7 @@
5
5
  "nuxt": ">=3.16.0"
6
6
  },
7
7
  "failOnWarn": false,
8
- "version": "4.0.16",
8
+ "version": "4.0.18",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "1.0.1",
11
11
  "unbuild": "3.5.0"
@@ -7,8 +7,7 @@ import ISocialsTelegram from "#icons/socials/telegram.vue";
7
7
  import ISocialsFacebook from "#icons/socials/facebook.vue";
8
8
  import ISocialsTiktok from "#icons/socials/tik-tok.vue";
9
9
  import IAdata from "#icons/logo/adata.vue";
10
- import { useAppConfig } from "#app";
11
- import { useI18n } from "#imports";
10
+ import { useI18n, useAppConfig } from "#imports";
12
11
  const year = (/* @__PURE__ */ new Date()).getFullYear();
13
12
  const { t } = useI18n();
14
13
  const appConfig = useAppConfig();
@@ -1,15 +1,12 @@
1
1
  <script setup>
2
- import { DropdownMenuContent, DropdownMenuPortal, DropdownMenuRoot, DropdownMenuTrigger } from "reka-ui";
3
2
  import TopHeader from "./header/TopHeader.vue";
4
3
  import HeaderLink from "./header/HeaderLink.vue";
5
4
  import ProfileMenu from "./header/ProfileMenu.vue";
6
- import { useI18n, ref, onBeforeMount } from "#imports";
7
- import ILogo from "#icons/logo/logo.vue";
5
+ import ColorMode from "./ColorMode.vue";
6
+ import HeaderMobile from "./header-mobile/HeaderMobile.vue";
7
+ import { useI18n, ref, onBeforeMount, useAppConfig } from "#imports";
8
8
  import ILogout from "#icons/navigation/logout.vue";
9
9
  import IAdata from "#icons/logo/adata.vue";
10
- import ISearch from "#icons/search.vue";
11
- import IChevronDown from "#icons/arrow/chevron-down.vue";
12
- import ColorMode from "./ColorMode.vue";
13
10
  const props = defineProps({
14
11
  replenish: { type: String, required: false },
15
12
  hasNotification: { type: Boolean, required: false },
@@ -26,6 +23,8 @@ const props = defineProps({
26
23
  });
27
24
  const emit = defineEmits(["logout", "search", "login"]);
28
25
  const { t } = useI18n();
26
+ const appConfig = useAppConfig();
27
+ const mode = appConfig.adataUI.mode;
29
28
  const langIsOn = false;
30
29
  const contacts = ref([]);
31
30
  const goAuth = () => {
@@ -35,17 +34,16 @@ const goAuth = () => {
35
34
  if (fullPath.includes("basic-info")) {
36
35
  fullPath = fullPath.replace("%2Fcounterparty%2Fmain", "").replace("%2Fbasic-info", "");
37
36
  }
38
- location.href = `https://id.adata.kz/?url=${fullPath}`;
37
+ location.href = `https://id.${mode}.kz/?url=${fullPath}`;
39
38
  }
40
39
  };
41
40
  const goToAnotherModule = () => {
42
- location.href = "https://adata.kz";
41
+ location.href = `https://${mode}.kz`;
43
42
  };
44
- const profileMenuOpen = ref(false);
45
43
  const fetchContacts = async () => {
46
44
  try {
47
45
  const response = await fetch(
48
- "https://pk-api.adata.kz/api/v1/data/counterparty/contacts/sales-department"
46
+ `https://pk-api.${mode}.kz/api/v1/data/counterparty/contacts/sales-department`
49
47
  );
50
48
  const { data } = await response.json();
51
49
  contacts.value = data;
@@ -71,52 +69,20 @@ onBeforeMount(() => {
71
69
  >
72
70
  <div class="a-container mobile-padding flex h-full items-center justify-between gap-2">
73
71
  <!-- Desktop hidden -->
74
- <section
75
- id="mobile-header"
76
- class="grow lg:hidden"
77
- >
78
- <div
79
- v-if="mobileHeaderType === 'default'"
80
- class="flex justify-center"
81
- >
82
- <nuxt-link
83
- class="text-deepblue dark:text-[#E3E5E8]"
84
- @click="goToAnotherModule"
85
- >
86
- <i-adata
87
- :font-controlled="false"
88
- filled
89
- />
90
- </nuxt-link>
91
- </div>
92
- <div
93
- v-else-if="mobileHeaderType === 'search'"
94
- class="flex w-full items-center gap-2 bg-white dark:bg-gray-900 lg:hidden"
95
- >
96
- <i-logo
97
- class="dark:text-gray-200"
98
- @click="goToAnotherModule"
99
- />
100
- <button
101
- class="flex w-full items-center gap-2 rounded bg-gray-50 px-4 py-1.5 dark:bg-gray-800 dark:text-gray-500"
102
- @click="$emit('search')"
103
- >
104
- <i-search />
105
- <span class="body-400">Найти</span>
106
- </button>
107
- </div>
108
- </section>
109
- <div class="lg:hidden">
110
- <div
111
- v-if="langIsOn || module === 'fea'"
112
- class="lg:hidden"
113
- />
114
- </div>
72
+
73
+ <header-mobile
74
+ :mobile-header-type="mobileHeaderType"
75
+ :lang-is-on="langIsOn"
76
+ :module="module"
77
+ @go-to-another-module="goToAnotherModule"
78
+ @search="emit('search')"
79
+ />
80
+
115
81
  <!-- Mobile hidden -->
116
82
  <nav class="hidden items-center gap-4 lg:flex">
117
83
  <nuxt-link
118
84
  aria-label="Adata-logo"
119
- to="https://adata.kz"
85
+ :to="`https://${mode}.kz`"
120
86
  class="text-deepblue cursor-pointer dark:text-[#E3E5E8]"
121
87
  @click="goToAnotherModule"
122
88
  >
@@ -138,36 +104,18 @@ onBeforeMount(() => {
138
104
  <div v-if="langIsOn || module === 'fea'" />
139
105
  </div>
140
106
  <color-mode />
141
- <dropdown-menu-root
142
- v-model:open="profileMenuOpen"
143
- >
144
- <dropdown-menu-trigger>
145
- <div
146
- v-show="isAuthenticated"
147
- class="hidden cursor-pointer items-center gap-2 text-sm font-semibold lg:flex"
148
- @click.stop="profileMenuOpen = true"
149
- >
150
- <span>{{ email }}</span>
151
- <i-chevron-down :class="{ 'rotate-180': profileMenuOpen }" />
152
- </div>
153
- </dropdown-menu-trigger>
154
- <dropdown-menu-portal>
155
- <dropdown-menu-content
156
- side="bottom"
157
- align="end"
158
- :side-offset="20"
159
- >
160
- <profile-menu
161
- :balance="balance"
162
- :days-remaining="daysRemaining"
163
- :limit-remaining="limitRemaining"
164
- :rate="rate"
165
- :replenish="replenish"
166
- @logout="$emit('logout')"
167
- />
168
- </dropdown-menu-content>
169
- </dropdown-menu-portal>
170
- </dropdown-menu-root>
107
+
108
+ <profile-menu
109
+ :email="email"
110
+ :is-authenticated="isAuthenticated"
111
+ :balance="balance"
112
+ :days-remaining="daysRemaining"
113
+ :limit-remaining="limitRemaining"
114
+ :rate="rate"
115
+ :replenish="replenish"
116
+ :show-login="showLogIn"
117
+ @logout="$emit('logout')"
118
+ />
171
119
 
172
120
  <div
173
121
  v-show="!isAuthenticated && showLogIn"
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
19
19
  module: ProjectKeys;
20
20
  rate: string;
21
21
  balance: number;
22
- showLogIn: boolean;
23
22
  mobileHeaderType: "search" | "default";
23
+ showLogIn: boolean;
24
24
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
25
  export default _default;
@@ -1,8 +1,10 @@
1
1
  <script setup>
2
2
  import ContactMenu from "./ContactMenu.vue";
3
3
  import ProductMenu from "./ProductMenu.vue";
4
- import { ref, shallowRef, useI18n, onBeforeUnmount, watch } from "#imports";
4
+ import { ref, shallowRef, useI18n, onBeforeUnmount, watch, useAppConfig } from "#imports";
5
5
  const { t } = useI18n();
6
+ const appConfig = useAppConfig();
7
+ const mode = appConfig.adataUI.mode;
6
8
  const navs = [
7
9
  {
8
10
  label: "header.navs.products",
@@ -10,11 +12,11 @@ const navs = [
10
12
  },
11
13
  {
12
14
  label: "header.navs.contacts",
13
- to: "https://adata.kz/contacts"
15
+ to: `https://${mode}.kz/contacts`
14
16
  },
15
17
  {
16
18
  label: "header.navs.tariffs",
17
- to: "https://adata.kz/tariffs"
19
+ to: `https://${mode}.kz/tariffs`
18
20
  }
19
21
  ];
20
22
  const menu = ref(null);
@@ -38,7 +40,7 @@ const currentMenuToShow = (index) => {
38
40
  };
39
41
  const toggleMenu = (index) => {
40
42
  if (index === 2) {
41
- window.open("https://adata.kz/tariffs", "_blank");
43
+ window.open(`https://${mode}.kz/tariffs`, "_blank");
42
44
  } else {
43
45
  currentMenu.value = currentMenuToShow(index);
44
46
  const prev = currentIndex.value;
@@ -147,7 +149,7 @@ watch(
147
149
  :is="currentMenu"
148
150
  v-show="show"
149
151
  ref="menu"
150
- :url="currentIndex === 1 ? 'https://adata.kz/contacts' : nav.to"
152
+ :url="currentIndex === 1 ? `https://${mode}.kz/contacts` : nav.to"
151
153
  :animation="forward ? 'next' : 'prev'"
152
154
  :index="currentIndex"
153
155
  @outer-click="closeMenu(true)"
@@ -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 } from "#imports";
5
+ import { useI18n, useAppConfig } 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";
@@ -29,7 +29,6 @@ import ISviazi from "#icons/sviazi.vue";
29
29
  import ICalculator from "#icons/calculator.vue";
30
30
  import IId from "#icons/document/id.vue";
31
31
  import IProfile from "#icons/document/profile.vue";
32
- import { useAppConfig } from "#app";
33
32
  const props = defineProps({
34
33
  animation: { type: String, required: false, default: "next" },
35
34
  index: { type: Number, required: false, default: 0 },
@@ -1,8 +1,10 @@
1
1
  <script setup>
2
+ import { DropdownMenuContent, DropdownMenuPortal, DropdownMenuRoot, DropdownMenuTrigger } from "reka-ui";
2
3
  import { PAGES } from "../../shared/constants/pages";
3
4
  import AStatusBadge from "../Tag.vue";
4
5
  import AButton from "../button/Button.vue";
5
- import { useI18n } from "#imports";
6
+ import ColorMode from "../ColorMode.vue";
7
+ import { ref, useI18n, useAppConfig } from "#imports";
6
8
  import IPlus from "#icons/plus.vue";
7
9
  import ILogout from "#icons/navigation/logout.vue";
8
10
  import IProfile from "#icons/document/profile.vue";
@@ -13,7 +15,7 @@ import IFile from "#icons/file.vue";
13
15
  import IHistory from "#icons/history.vue";
14
16
  import IUsers from "#icons/users/users.vue";
15
17
  import IMessage from "#icons/message.vue";
16
- import { useAppConfig } from "#app";
18
+ import IChevronDown from "#icons/arrow/chevron-down.vue";
17
19
  const isLargeScreen = true;
18
20
  const props = defineProps({
19
21
  rate: { type: String, required: true },
@@ -21,12 +23,16 @@ const props = defineProps({
21
23
  limitRemaining: { type: Number, required: false, default: 0 },
22
24
  balance: { type: Number, required: true },
23
25
  replenish: { type: String, required: false },
24
- oldVersion: { type: String, required: false }
26
+ oldVersion: { type: String, required: false },
27
+ isAuthenticated: { type: Boolean, required: false },
28
+ email: { type: String, required: false },
29
+ showLogin: { type: Boolean, required: false }
25
30
  });
26
31
  const appConfig = useAppConfig();
27
32
  const mode = appConfig.adataUI.mode;
28
33
  defineEmits(["logout"]);
29
34
  const { t } = useI18n();
35
+ const profileMenuOpen = ref(false);
30
36
  const items = [
31
37
  {
32
38
  title: t("header.profile.menu.personalInfo"),
@@ -71,151 +77,171 @@ const items = [
71
77
  ];
72
78
  const onReplenish = () => {
73
79
  if (window) {
74
- window.location.href = "https://adata.kz/profile?popupBalance=1";
80
+ window.location.href = `https://${mode}.kz/profile?popupBalance=1`;
75
81
  }
76
82
  };
77
83
  </script>
78
84
 
79
85
  <template>
80
- <div class="max-w-full lg:w-[440px]">
81
- <!-- desktop -->
82
- <div
83
- 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"
84
- >
85
- <div class="hidden text-sm lg:block">
86
- {{ t("header.profile.tariff") }}
86
+ <dropdown-menu-root v-model:open="profileMenuOpen">
87
+ <dropdown-menu-trigger>
88
+ <div
89
+ v-show="isAuthenticated"
90
+ class="hidden cursor-pointer items-center gap-2 text-sm font-semibold lg:flex"
91
+ @click.stop="profileMenuOpen = true"
92
+ >
93
+ <span>{{ email }}</span>
94
+ <i-chevron-down :class="{ 'rotate-180': profileMenuOpen }" />
87
95
  </div>
88
- <div class="flex items-center justify-between gap-4 lg:mt-2">
89
- <div>
90
- <span class="mr-2 font-semibold lg:text-lg">{{ rate }}</span>
91
- <a-status-badge
92
- type="success"
93
- class="!px-3 font-semibold text-white"
94
- size="sm"
96
+ </dropdown-menu-trigger>
97
+ <dropdown-menu-portal>
98
+ <dropdown-menu-content
99
+ side="bottom"
100
+ align="end"
101
+ :side-offset="20"
102
+ >
103
+ <div class="max-w-full lg:w-[440px]">
104
+ <!-- desktop -->
105
+ <div
106
+ 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"
95
107
  >
96
- {{ t("header.profile.connected") }}
97
- </a-status-badge>
98
- </div>
99
- <span class="bg-deepblue ml-2 rounded-xl px-2 py-1 text-xs lg:hidden">{{ balance.toLocaleString("RU-ru") }} ₸</span>
100
- </div>
101
- <div class="mt-2 hidden items-center justify-between lg:flex">
102
- <div class="text-xs">
103
- {{ t("header.profile.currentBalance") }}
104
- <span class="ml-2 rounded-xl bg-deepblue-900 px-2 py-1">{{ balance.toLocaleString("RU-ru") }} ₸</span>
105
- </div>
106
- <a-button
107
- size="sm"
108
- view="outline"
109
- variant="ghost"
110
- @click="onReplenish"
111
- >
112
- {{ t("header.profile.addBalance") }}
113
- </a-button>
114
- </div>
115
- </div>
116
- <!-- mobile -->
117
- <div class="gradient-bg px-4 py-4 text-white dark:text-gray-900 lg:hidden">
118
- <div class="flex justify-between gap-4 lg:mt-2">
119
- <div class="flex flex-col items-center">
120
- <div class="font-semibold">
121
- {{ rate }}
108
+ <div class="hidden text-sm lg:block">
109
+ {{ t("header.profile.tariff") }}
110
+ </div>
111
+ <div class="flex items-center justify-between gap-4 lg:mt-2">
112
+ <div>
113
+ <span class="mr-2 font-semibold lg:text-lg">{{ rate }}</span>
114
+ <a-status-badge
115
+ type="success"
116
+ class="!px-3 font-semibold text-white"
117
+ size="sm"
118
+ >
119
+ {{ t("header.profile.connected") }}
120
+ </a-status-badge>
121
+ </div>
122
+ <span class="bg-deepblue ml-2 rounded-xl px-2 py-1 text-xs lg:hidden">{{ balance.toLocaleString("RU-ru") }} ₸</span>
123
+ </div>
124
+ <div class="mt-2 hidden items-center justify-between lg:flex">
125
+ <div class="text-xs">
126
+ {{ t("header.profile.currentBalance") }}
127
+ <span class="ml-2 rounded-xl bg-deepblue-900 px-2 py-1">{{ balance.toLocaleString("RU-ru") }} ₸</span>
128
+ </div>
129
+ <a-button
130
+ size="sm"
131
+ view="outline"
132
+ variant="ghost"
133
+ @click="onReplenish"
134
+ >
135
+ {{ t("header.profile.addBalance") }}
136
+ </a-button>
137
+ </div>
122
138
  </div>
123
- <a-status-badge
124
- type="success"
125
- class="!px-3 font-semibold text-white dark:text-gray-900"
126
- size="sm"
127
- >
128
- {{ t("header.profile.connected") }}
129
- </a-status-badge>
130
- </div>
131
- <div class="flex min-w-[90px] flex-col">
132
- <div class="font-semibold">
133
- {{ t("header.profile.balance") }}
139
+ <!-- mobile -->
140
+ <div class="gradient-bg px-4 py-4 text-white dark:text-gray-900 lg:hidden">
141
+ <div class="flex justify-between gap-4 lg:mt-2">
142
+ <div class="flex flex-col items-center">
143
+ <div class="font-semibold">
144
+ {{ rate }}
145
+ </div>
146
+ <a-status-badge
147
+ type="success"
148
+ class="!px-3 font-semibold text-white dark:text-gray-900"
149
+ size="sm"
150
+ >
151
+ {{ t("header.profile.connected") }}
152
+ </a-status-badge>
153
+ </div>
154
+ <div class="flex min-w-[90px] flex-col">
155
+ <div class="font-semibold">
156
+ {{ t("header.profile.balance") }}
157
+ </div>
158
+ <div class="flex gap-1">
159
+ <a-status-badge
160
+ size="sm"
161
+ class="!px-3 font-semibold text-white dark:!bg-[#E3E5E8] dark:text-gray-900"
162
+ type="gray"
163
+ >
164
+ {{ balance.toLocaleString("RU-ru") }} ₸
165
+ </a-status-badge>
166
+ <button
167
+ class="flex h-[23px] w-[23px] items-center justify-center rounded-md bg-white text-deepblue-900 dark:bg-gray-900 dark:text-[#E3E5E8]"
168
+ @click="onReplenish"
169
+ >
170
+ <i-plus
171
+ width="16px"
172
+ height="16px"
173
+ />
174
+ </button>
175
+ </div>
176
+ </div>
177
+ </div>
134
178
  </div>
135
- <div class="flex gap-1">
136
- <a-status-badge
137
- size="sm"
138
- class="!px-3 font-semibold text-white dark:!bg-[#E3E5E8] dark:text-gray-900"
139
- type="gray"
179
+ <div class="rounded-b-[0.5rem] bg-white p-4 dark:bg-[#232324]">
180
+ <div class="mb-2 flex justify-between gap-2 lg:hidden">
181
+ <a-status-badge
182
+ size="sm"
183
+ class="w-full py-[6px] font-semibold"
184
+ >
185
+ <span>
186
+ {{ t("header.profile.requests") }}
187
+ </span>
188
+ {{ limitRemaining }}
189
+ </a-status-badge>
190
+ <a-status-badge
191
+ size="sm"
192
+ class="w-full py-[6px] font-semibold"
193
+ >
194
+ <span>
195
+ {{ t("header.profile.daysLeft") }}
196
+ </span>
197
+ {{ daysRemaining }}
198
+ </a-status-badge>
199
+ </div>
200
+ <div class="grid grid-cols-2 gap-2">
201
+ <nuxt-link
202
+ v-for="item in items"
203
+ :key="item.title"
204
+ 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"
205
+ :to="item.to"
206
+ target="_blank"
207
+ >
208
+ <component
209
+ :is="item.icon"
210
+ class="h-[24px] w-[24px]"
211
+ />
212
+ <span>{{ item.title }}</span>
213
+ </nuxt-link>
214
+ </div>
215
+ <div class="mt-2">
216
+ <div
217
+ v-if="oldVersion"
218
+ :url="oldVersion"
219
+ />
220
+ </div>
221
+ <div
222
+ v-if="!isLargeScreen"
223
+ class="my-4 flex items-center justify-between text-sm"
140
224
  >
141
- {{ balance.toLocaleString("RU-ru") }} ₸
142
- </a-status-badge>
143
- <button
144
- class="flex h-[23px] w-[23px] items-center justify-center rounded-md bg-white text-deepblue-900 dark:bg-gray-900 dark:text-[#E3E5E8]"
145
- @click="onReplenish"
225
+ <span>
226
+ {{ t("header.profile.colorScheme") }}
227
+ </span>
228
+ <color-mode />
229
+ </div>
230
+ <a-button
231
+ class="lg:mt-2"
232
+ block
233
+ @click="$emit('logout')"
146
234
  >
147
- <i-plus
148
- width="16px"
149
- height="16px"
150
- />
151
- </button>
235
+ <i-logout class="h-5 w-5" />
236
+ <span>
237
+ {{ t("header.profile.logout") }}
238
+ </span>
239
+ </a-button>
152
240
  </div>
153
241
  </div>
154
- </div>
155
- </div>
156
- <div class="rounded-b-[0.5rem] bg-white p-4 dark:bg-[#232324]">
157
- <div class="mb-2 flex justify-between gap-2 lg:hidden">
158
- <a-status-badge
159
- size="sm"
160
- class="w-full py-[6px] font-semibold"
161
- >
162
- <span>
163
- {{ t("header.profile.requests") }}
164
- </span>
165
- {{ limitRemaining }}
166
- </a-status-badge>
167
- <a-status-badge
168
- size="sm"
169
- class="w-full py-[6px] font-semibold"
170
- >
171
- <span>
172
- {{ t("header.profile.daysLeft") }}
173
- </span>
174
- {{ daysRemaining }}
175
- </a-status-badge>
176
- </div>
177
- <div class="grid grid-cols-2 gap-2">
178
- <nuxt-link
179
- v-for="item in items"
180
- :key="item.title"
181
- 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"
182
- :to="item.to"
183
- target="_blank"
184
- >
185
- <component
186
- :is="item.icon"
187
- class="h-[24px] w-[24px]"
188
- />
189
- <span>{{ item.title }}</span>
190
- </nuxt-link>
191
- </div>
192
- <div class="mt-2">
193
- <div
194
- v-if="oldVersion"
195
- :url="oldVersion"
196
- />
197
- </div>
198
- <div
199
- v-if="!isLargeScreen"
200
- class="my-4 flex items-center justify-between text-sm"
201
- >
202
- <span>
203
- {{ t("header.profile.colorScheme") }}
204
- </span>
205
- <div />
206
- </div>
207
- <a-button
208
- class="lg:mt-2"
209
- block
210
- @click="$emit('logout')"
211
- >
212
- <i-logout class="h-5 w-5" />
213
- <span>
214
- {{ t("header.profile.logout") }}
215
- </span>
216
- </a-button>
217
- </div>
218
- </div>
242
+ </dropdown-menu-content>
243
+ </dropdown-menu-portal>
244
+ </dropdown-menu-root>
219
245
  </template>
220
246
 
221
247
  <style scoped>
@@ -5,6 +5,9 @@ interface Props {
5
5
  balance: number;
6
6
  replenish?: string;
7
7
  oldVersion?: string;
8
+ isAuthenticated?: boolean;
9
+ email?: string;
10
+ showLogin?: boolean;
8
11
  }
9
12
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
10
13
  daysRemaining: number;
@@ -8,7 +8,7 @@ import Rub from "#icons/currency/rub.vue";
8
8
  import Yuan from "#icons/currency/yuan.vue";
9
9
  import XMark from "#icons/x-mark.vue";
10
10
  import Down from "#icons/currency/down.vue";
11
- import { useI18n } from "#imports";
11
+ import { useI18n, useAppConfig } from "#imports";
12
12
  const { t } = useI18n();
13
13
  const props = defineProps({
14
14
  daysRemaining: { type: Number, required: true },
@@ -20,6 +20,8 @@ const currencies = ref([]);
20
20
  const systemMessage = ref(null);
21
21
  const isOpenNotification = ref(false);
22
22
  const message = useCookie("message");
23
+ const appConfig = useAppConfig();
24
+ const env = appConfig.adataUI.mode;
23
25
  const mode = computed(() => {
24
26
  if (props.moduleName === "pk") {
25
27
  return "counterparty";
@@ -29,7 +31,7 @@ const mode = computed(() => {
29
31
  });
30
32
  const fetchCurrencies = async () => {
31
33
  try {
32
- const response = await fetch("https://users.adata.kz/api/v1/information/currency");
34
+ const response = await fetch(`https://users.${env}.kz/api/v1/information/currency`);
33
35
  const { data } = await response.json();
34
36
  if (data.currencies) {
35
37
  currencies.value = data.currencies;
@@ -48,7 +50,7 @@ const computedClass = (state) => state === "UP" ? "text-green-400 rotate-180" :
48
50
  const fetchNotification = async () => {
49
51
  try {
50
52
  if (message.value === void 0) {
51
- const link = `https://users.adata.kz/api/v1/system-messages/active-list/?module_name=${mode.value}`;
53
+ const link = `https://users.${env}.kz/api/v1/system-messages/active-list/?module_name=${mode.value}`;
52
54
  const response = await fetch(link);
53
55
  const { data } = await response.json();
54
56
  if (data.details.length) {
@@ -0,0 +1,55 @@
1
+ <script setup>
2
+ import IAdata from "#icons/logo/adata.vue";
3
+ import ILogo from "#icons/logo/logo.vue";
4
+ import ISearch from "#icons/search.vue";
5
+ const props = defineProps({
6
+ mobileHeaderType: { type: String, required: true },
7
+ langIsOn: { type: Boolean, required: true },
8
+ module: { type: String, required: true }
9
+ });
10
+ const emit = defineEmits(["goToAnotherModule", "search"]);
11
+ </script>
12
+
13
+ <template>
14
+ <section
15
+ id="mobile-header"
16
+ class="grow lg:hidden"
17
+ >
18
+ <div
19
+ v-if="mobileHeaderType === 'default'"
20
+ class="flex justify-center"
21
+ >
22
+ <nuxt-link
23
+ class="text-deepblue dark:text-[#E3E5E8]"
24
+ @click="emit('goToAnotherModule')"
25
+ >
26
+ <i-adata
27
+ :font-controlled="false"
28
+ filled
29
+ />
30
+ </nuxt-link>
31
+ </div>
32
+ <div
33
+ v-else-if="mobileHeaderType === 'search'"
34
+ class="flex w-full items-center gap-2 bg-white dark:bg-gray-900 lg:hidden"
35
+ >
36
+ <i-logo
37
+ class="dark:text-gray-200"
38
+ @click="emit('goToAnotherModule')"
39
+ />
40
+ <button
41
+ class="flex w-full items-center gap-2 rounded bg-gray-50 px-4 py-1.5 dark:bg-gray-800 dark:text-gray-500"
42
+ @click="emit('search')"
43
+ >
44
+ <i-search />
45
+ <span class="body-400">Найти</span>
46
+ </button>
47
+ </div>
48
+ </section>
49
+ <div class="lg:hidden">
50
+ <div
51
+ v-if="langIsOn || module === 'fea'"
52
+ class="lg:hidden"
53
+ />
54
+ </div>
55
+ </template>
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ mobileHeaderType: 'default' | 'search';
3
+ langIsOn: boolean;
4
+ module: string;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adata-ui",
3
- "version": "4.0.16",
3
+ "version": "4.0.18",
4
4
  "description": "Adata UI",
5
5
  "repository": "your-org/my-module",
6
6
  "license": "MIT",