adata-ui 0.1.62 → 0.1.65
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/adata-ui.common.js +118 -54
- package/dist/adata-ui.common.js.map +1 -1
- package/dist/adata-ui.css +1 -1
- package/dist/adata-ui.umd.js +118 -54
- package/dist/adata-ui.umd.js.map +1 -1
- package/dist/adata-ui.umd.min.js +2 -2
- package/dist/adata-ui.umd.min.js.map +1 -1
- package/package-lock.json +1 -1
- package/package.json +1 -1
- package/src/components/Header/Header.vue +16 -9
- package/src/components/Header/InfoHeader.vue +2 -2
package/package-lock.json
CHANGED
package/package.json
CHANGED
|
@@ -237,11 +237,11 @@
|
|
|
237
237
|
</div>
|
|
238
238
|
</div>
|
|
239
239
|
<div class="menu-mobile__info-footer">
|
|
240
|
-
<div class="menu-mobile__info-footer-item">
|
|
240
|
+
<div class="menu-mobile__info-footer-item" v-show="requestCount === 0 || requestCount">
|
|
241
241
|
<span class="menu-mobile__info-footer-title">Суточный лимит запросов:</span>
|
|
242
242
|
<span class="menu-mobile__info-footer-circle">{{ requestCount }}</span>
|
|
243
243
|
</div>
|
|
244
|
-
<div class="menu-mobile__info-footer-item">
|
|
244
|
+
<div class="menu-mobile__info-footer-item" v-show="daysRemaining === 0 || daysRemaining">
|
|
245
245
|
<span class="menu-mobile__info-footer-title">Остаток дней:</span>
|
|
246
246
|
<span class="menu-mobile__info-footer-circle">{{ daysRemaining }}</span>
|
|
247
247
|
</div>
|
|
@@ -383,33 +383,40 @@ export default {
|
|
|
383
383
|
},
|
|
384
384
|
mounted() {
|
|
385
385
|
this.setBalance(this.balance);
|
|
386
|
-
this.
|
|
386
|
+
this.notificationShow()
|
|
387
387
|
},
|
|
388
388
|
watch: {
|
|
389
389
|
balance(newBalance) {
|
|
390
390
|
this.setBalance(newBalance);
|
|
391
391
|
},
|
|
392
|
-
isOpenNotification() {
|
|
393
|
-
if(!this.isOpenNotification) {
|
|
394
|
-
clearTimeout(this.timer);
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
392
|
},
|
|
398
393
|
methods: {
|
|
399
394
|
async fetchNotification() {
|
|
400
395
|
try {
|
|
401
|
-
const response = await fetch('https://users.
|
|
396
|
+
const response = await fetch('https://users.adata.kz/api/v1/system-messages/active-list/?module_name=counterparty');
|
|
402
397
|
const { data } = await response.json();
|
|
403
398
|
|
|
404
399
|
if (data.details.length) {
|
|
405
400
|
this.systemMessage = data.details[0].message;
|
|
406
401
|
this.isOpenNotification = true;
|
|
402
|
+
localStorage.setItem('start_time', JSON.stringify(new Date()))
|
|
407
403
|
}
|
|
408
404
|
|
|
409
405
|
} catch(e) {
|
|
410
406
|
console.log(e.message)
|
|
411
407
|
}
|
|
412
408
|
},
|
|
409
|
+
notificationShow() {
|
|
410
|
+
const startTime = localStorage.getItem('start_time');
|
|
411
|
+
let diffTime = startTime ? Math.round((new Date() - new Date(JSON.parse(startTime))) / 3600000): 0
|
|
412
|
+
if (startTime) {
|
|
413
|
+
if (diffTime >= 24) {
|
|
414
|
+
localStorage.removeItem('start_time')
|
|
415
|
+
}
|
|
416
|
+
} else {
|
|
417
|
+
this.fetchNotification()
|
|
418
|
+
}
|
|
419
|
+
},
|
|
413
420
|
async fetchCurrencies() {
|
|
414
421
|
try {
|
|
415
422
|
const response = await fetch('https://users.adata.kz/api/v1/information/currency');
|
|
@@ -131,11 +131,11 @@
|
|
|
131
131
|
</div>
|
|
132
132
|
<div v-if="isAuthenticated" class="info-header__item">
|
|
133
133
|
<div class="info-header__item-elem">
|
|
134
|
-
<div class="info-header__inner-item">
|
|
134
|
+
<div class="info-header__inner-item" v-show="requestCount === 0 || requestCount">
|
|
135
135
|
<span class="info-header__title">Суточный лимит запросов</span>
|
|
136
136
|
<span class="info-header__result info-header__result_circled">{{ requestCount }}</span>
|
|
137
137
|
</div>
|
|
138
|
-
<div class="info-header__inner-item">
|
|
138
|
+
<div class="info-header__inner-item" v-show="daysRemaining === 0 || daysRemaining">
|
|
139
139
|
<span class="info-header__title">остаток дней</span>
|
|
140
140
|
<span class="info-header__result info-header__result_circled">{{ daysRemaining }}</span>
|
|
141
141
|
</div>
|