mirror of
https://github.com/Fabio286/antares.git
synced 2025-01-30 09:05:06 +01:00
feat: badge on setting icon and update tab when update is available
This commit is contained in:
parent
0b6a188d19
commit
e8141b6321
@ -34,7 +34,7 @@
|
|||||||
:class="{'active': selectedTab === 'update'}"
|
:class="{'active': selectedTab === 'update'}"
|
||||||
@click="selectTab('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>
|
||||||
<li
|
<li
|
||||||
class="tab-item"
|
class="tab-item"
|
||||||
@ -135,7 +135,6 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
isUpdate: false,
|
|
||||||
localLocale: null,
|
localLocale: null,
|
||||||
localTimeout: null,
|
localTimeout: null,
|
||||||
selectedTab: 'general'
|
selectedTab: 'general'
|
||||||
@ -147,7 +146,8 @@ export default {
|
|||||||
appVersion: 'application/appVersion',
|
appVersion: 'application/appVersion',
|
||||||
selectedSettingTab: 'application/selectedSettingTab',
|
selectedSettingTab: 'application/selectedSettingTab',
|
||||||
selectedLocale: 'settings/getLocale',
|
selectedLocale: 'settings/getLocale',
|
||||||
notificationsTimeout: 'settings/getNotificationsTimeout'
|
notificationsTimeout: 'settings/getNotificationsTimeout',
|
||||||
|
updateStatus: 'application/getUpdateStatus'
|
||||||
}),
|
}),
|
||||||
locales () {
|
locales () {
|
||||||
const locales = [];
|
const locales = [];
|
||||||
@ -155,6 +155,9 @@ export default {
|
|||||||
locales.push({ code: locale, name: localesNames[locale] });
|
locales.push({ code: locale, name: localesNames[locale] });
|
||||||
|
|
||||||
return locales;
|
return locales;
|
||||||
|
},
|
||||||
|
hasUpdates () {
|
||||||
|
return ['available', 'downloading', 'downloaded'].includes(this.updateStatus);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@ -198,6 +201,11 @@ export default {
|
|||||||
background: #32b643;
|
background: #32b643;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.badge-update::after {
|
||||||
|
bottom: initial;
|
||||||
|
background: $primary-color;
|
||||||
|
}
|
||||||
|
|
||||||
.form-label {
|
.form-label {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
<div class="settingbar-bottom-elements">
|
<div class="settingbar-bottom-elements">
|
||||||
<ul class="settingbar-elements">
|
<ul class="settingbar-elements">
|
||||||
<li class="settingbar-element btn btn-link ex-tooltip" @click="showSettingModal('general')">
|
<li class="settingbar-element btn btn-link ex-tooltip" @click="showSettingModal('general')">
|
||||||
<i class="settingbar-element-icon mdi mdi-24px mdi-cog text-light" />
|
<i class="settingbar-element-icon mdi mdi-24px mdi-cog text-light" :class="{' badge badge-update': hasUpdates}" />
|
||||||
<span class="ex-tooltip-content">{{ $t('word.settings') }}</span>
|
<span class="ex-tooltip-content">{{ $t('word.settings') }}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -70,7 +70,8 @@ export default {
|
|||||||
getConnections: 'connections/getConnections',
|
getConnections: 'connections/getConnections',
|
||||||
getConnectionName: 'connections/getConnectionName',
|
getConnectionName: 'connections/getConnectionName',
|
||||||
connected: 'workspaces/getConnected',
|
connected: 'workspaces/getConnected',
|
||||||
selectedWorkspace: 'workspaces/getSelected'
|
selectedWorkspace: 'workspaces/getSelected',
|
||||||
|
updateStatus: 'application/getUpdateStatus'
|
||||||
}),
|
}),
|
||||||
connections: {
|
connections: {
|
||||||
get () {
|
get () {
|
||||||
@ -79,6 +80,9 @@ export default {
|
|||||||
set (value) {
|
set (value) {
|
||||||
this.updateConnections(value);
|
this.updateConnections(value);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
hasUpdates () {
|
||||||
|
return ['available', 'downloading', 'downloaded'].includes(this.updateStatus);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -169,6 +173,11 @@ export default {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
background: $success-color;
|
background: $success-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.badge-update::after {
|
||||||
|
bottom: initial;
|
||||||
|
background: $primary-color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<WorkspaceExploreBar :connection="connection" :is-selected="isSelected" />
|
<WorkspaceExploreBar :connection="connection" :is-selected="isSelected" />
|
||||||
<div v-if="workspace.connected" class="workspace-tabs column columns col-gapless">
|
<div v-if="workspace.connected" class="workspace-tabs column columns col-gapless">
|
||||||
<ul class="tab tab-block column col-12">
|
<ul class="tab tab-block column col-12">
|
||||||
<li
|
<!-- <li
|
||||||
v-if="workspace.breadcrumbs.table"
|
v-if="workspace.breadcrumbs.table"
|
||||||
class="tab-item"
|
class="tab-item"
|
||||||
>
|
>
|
||||||
@ -11,7 +11,7 @@
|
|||||||
<i class="mdi mdi-18px mdi-tune mr-1" />
|
<i class="mdi mdi-18px mdi-tune mr-1" />
|
||||||
<span :title="workspace.breadcrumbs.table">{{ $t('word.properties').toUpperCase() }}: {{ workspace.breadcrumbs.table }}</span>
|
<span :title="workspace.breadcrumbs.table">{{ $t('word.properties').toUpperCase() }}: {{ workspace.breadcrumbs.table }}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li> -->
|
||||||
<li
|
<li
|
||||||
v-if="workspace.breadcrumbs.table"
|
v-if="workspace.breadcrumbs.table"
|
||||||
class="tab-item"
|
class="tab-item"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user