adata-ui 4.0.15 → 4.0.17

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.15",
8
+ "version": "4.0.17",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "1.0.1",
11
11
  "unbuild": "3.5.0"
@@ -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";
5
+ import ColorMode from "./ColorMode.vue";
6
+ import HeaderMobile from "./header-mobile/HeaderMobile.vue";
6
7
  import { useI18n, ref, onBeforeMount } from "#imports";
7
- import ILogo from "#icons/logo/logo.vue";
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,6 +1,7 @@
1
1
  <script setup>
2
2
  import { SwitchRoot, SwitchThumb } from "reka-ui";
3
3
  import { twMerge, twJoin } from "tailwind-merge";
4
+ import { computed } from "#imports";
4
5
  const props = defineProps({
5
6
  disabled: { type: Boolean, required: false, default: false },
6
7
  size: { type: String, required: false, default: "md" },
@@ -3,6 +3,8 @@ import ContactMenu from "./ContactMenu.vue";
3
3
  import ProductMenu from "./ProductMenu.vue";
4
4
  import { ref, shallowRef, useI18n, onBeforeUnmount, watch } 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)"
@@ -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 } 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,6 +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";
18
+ import IChevronDown from "#icons/arrow/chevron-down.vue";
16
19
  import { useAppConfig } from "#app";
17
20
  const isLargeScreen = true;
18
21
  const props = defineProps({
@@ -21,12 +24,16 @@ const props = defineProps({
21
24
  limitRemaining: { type: Number, required: false, default: 0 },
22
25
  balance: { type: Number, required: true },
23
26
  replenish: { type: String, required: false },
24
- oldVersion: { type: String, required: false }
27
+ oldVersion: { type: String, required: false },
28
+ isAuthenticated: { type: Boolean, required: false },
29
+ email: { type: String, required: false },
30
+ showLogin: { type: Boolean, required: false }
25
31
  });
26
32
  const appConfig = useAppConfig();
27
33
  const mode = appConfig.adataUI.mode;
28
34
  defineEmits(["logout"]);
29
35
  const { t } = useI18n();
36
+ const profileMenuOpen = ref(false);
30
37
  const items = [
31
38
  {
32
39
  title: t("header.profile.menu.personalInfo"),
@@ -71,151 +78,171 @@ const items = [
71
78
  ];
72
79
  const onReplenish = () => {
73
80
  if (window) {
74
- window.location.href = "https://adata.kz/profile?popupBalance=1";
81
+ window.location.href = `https://${mode}.kz/profile?popupBalance=1`;
75
82
  }
76
83
  };
77
84
  </script>
78
85
 
79
86
  <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") }}
87
+ <dropdown-menu-root v-model:open="profileMenuOpen">
88
+ <dropdown-menu-trigger>
89
+ <div
90
+ v-show="isAuthenticated"
91
+ class="hidden cursor-pointer items-center gap-2 text-sm font-semibold lg:flex"
92
+ @click.stop="profileMenuOpen = true"
93
+ >
94
+ <span>{{ email }}</span>
95
+ <i-chevron-down :class="{ 'rotate-180': profileMenuOpen }" />
87
96
  </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"
97
+ </dropdown-menu-trigger>
98
+ <dropdown-menu-portal>
99
+ <dropdown-menu-content
100
+ side="bottom"
101
+ align="end"
102
+ :side-offset="20"
103
+ >
104
+ <div class="max-w-full lg:w-[440px]">
105
+ <!-- desktop -->
106
+ <div
107
+ 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
108
  >
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 }}
109
+ <div class="hidden text-sm lg:block">
110
+ {{ t("header.profile.tariff") }}
111
+ </div>
112
+ <div class="flex items-center justify-between gap-4 lg:mt-2">
113
+ <div>
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>
122
139
  </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") }}
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>
134
179
  </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"
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"
140
225
  >
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"
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="$emit('logout')"
146
235
  >
147
- <i-plus
148
- width="16px"
149
- height="16px"
150
- />
151
- </button>
236
+ <i-logout class="h-5 w-5" />
237
+ <span>
238
+ {{ t("header.profile.logout") }}
239
+ </span>
240
+ </a-button>
152
241
  </div>
153
242
  </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>
243
+ </dropdown-menu-content>
244
+ </dropdown-menu-portal>
245
+ </dropdown-menu-root>
219
246
  </template>
220
247
 
221
248
  <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;
@@ -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.15",
3
+ "version": "4.0.17",
4
4
  "description": "Adata UI",
5
5
  "repository": "your-org/my-module",
6
6
  "license": "MIT",