adata-ui 3.1.77 → 3.1.79
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
|
@@ -9,7 +9,7 @@ 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
11
|
import { useI18n, useAppConfig } from "#imports";
|
|
12
|
-
const { t } = useI18n();
|
|
12
|
+
const { t, locale } = useI18n();
|
|
13
13
|
const props = defineProps({
|
|
14
14
|
daysRemaining: { type: Number, required: true },
|
|
15
15
|
limitRemaining: { type: Number, required: true },
|
|
@@ -18,7 +18,7 @@ const props = defineProps({
|
|
|
18
18
|
isAuthenticated: { type: Boolean, required: true }
|
|
19
19
|
});
|
|
20
20
|
const currencies = ref([]);
|
|
21
|
-
const
|
|
21
|
+
const systemMessages = ref([]);
|
|
22
22
|
const isOpenNotification = ref(false);
|
|
23
23
|
const message = useCookie("message");
|
|
24
24
|
const appConfig = useAppConfig();
|
|
@@ -30,6 +30,20 @@ const mode = computed(() => {
|
|
|
30
30
|
return props.moduleName;
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
+
const systemMessage = computed(() => {
|
|
34
|
+
if (!systemMessages.value.length) return null;
|
|
35
|
+
const messageDetails = systemMessages.value[0];
|
|
36
|
+
switch (locale.value) {
|
|
37
|
+
case "ru":
|
|
38
|
+
return messageDetails?.message;
|
|
39
|
+
case "en":
|
|
40
|
+
return messageDetails?.message_en;
|
|
41
|
+
case "kk":
|
|
42
|
+
return messageDetails?.message_kz;
|
|
43
|
+
default:
|
|
44
|
+
return messageDetails?.message;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
33
47
|
const fetchCurrencies = async () => {
|
|
34
48
|
try {
|
|
35
49
|
const response = await fetch(`https://users.adata.kz/api/v1/information/currency`);
|
|
@@ -55,7 +69,7 @@ const fetchNotification = async () => {
|
|
|
55
69
|
const response = await fetch(link);
|
|
56
70
|
const { data } = await response.json();
|
|
57
71
|
if (data.details.length) {
|
|
58
|
-
|
|
72
|
+
systemMessages.value = data.details;
|
|
59
73
|
isOpenNotification.value = true;
|
|
60
74
|
}
|
|
61
75
|
}
|