1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

feat: badge on setting icon and update tab when update is available

This commit is contained in:
2020-08-17 17:37:42 +02:00
parent 0b6a188d19
commit e8141b6321
3 changed files with 24 additions and 7 deletions

View File

@ -34,7 +34,7 @@
:class="{'active': selectedTab === 'update'}"
@click="selectTab('update')"
>
<a class="c-hand" :class="{'badge': isUpdate}">{{ $t('word.update') }}</a>
<a class="c-hand" :class="{'badge badge-update': hasUpdates}">{{ $t('word.update') }}</a>
</li>
<li
class="tab-item"
@ -135,7 +135,6 @@ export default {
},
data () {
return {
isUpdate: false,
localLocale: null,
localTimeout: null,
selectedTab: 'general'
@ -147,7 +146,8 @@ export default {
appVersion: 'application/appVersion',
selectedSettingTab: 'application/selectedSettingTab',
selectedLocale: 'settings/getLocale',
notificationsTimeout: 'settings/getNotificationsTimeout'
notificationsTimeout: 'settings/getNotificationsTimeout',
updateStatus: 'application/getUpdateStatus'
}),
locales () {
const locales = [];
@ -155,6 +155,9 @@ export default {
locales.push({ code: locale, name: localesNames[locale] });
return locales;
},
hasUpdates () {
return ['available', 'downloading', 'downloaded'].includes(this.updateStatus);
}
},
created () {
@ -198,6 +201,11 @@ export default {
background: #32b643;
}
.badge-update::after {
bottom: initial;
background: $primary-color;
}
.form-label {
display: flex;
align-items: center;