mirror of https://github.com/Lissy93/dashy.git
⚡ Adds option for starting tab to be applied
This commit is contained in:
parent
da65ed36e8
commit
fd04241700
|
@ -14,6 +14,10 @@
|
|||
<EditIcon class="button-icon"/>
|
||||
{{ $t('config.edit-config-button') }}
|
||||
</button>
|
||||
<button class="config-button center" @click="openLanguageSwitchModal()">
|
||||
<LanguageIcon class="button-icon"/>
|
||||
{{ $t('config.change-language-button') }}
|
||||
</button>
|
||||
<button class="config-button center" @click="() => navigateToTab(3)">
|
||||
<CustomCssIcon class="button-icon"/>
|
||||
{{ $t('config.edit-css-button') }}
|
||||
|
@ -22,10 +26,6 @@
|
|||
<CloudIcon class="button-icon"/>
|
||||
{{backupId ? $t('config.edit-cloud-sync-button') : $t('config.cloud-sync-button') }}
|
||||
</button>
|
||||
<button class="config-button center" @click="openLanguageSwitchModal()">
|
||||
<LanguageIcon class="button-icon"/>
|
||||
{{ $t('config.change-language-button') }}
|
||||
</button>
|
||||
<button class="config-button center" @click="openRebuildAppModal()">
|
||||
<RebuildIcon class="button-icon"/>
|
||||
{{ $t('config.rebuild-app-button') }}
|
||||
|
@ -153,6 +153,16 @@ export default {
|
|||
const lang = getUsersLanguage();
|
||||
return lang ? `${lang.flag} ${lang.name}` : '';
|
||||
},
|
||||
/* If launching menu from editor, navigate to correct starting tab */
|
||||
navigateToStartingTab() {
|
||||
const navToTab = this.$store.state.navigateConfToTab;
|
||||
const isValidTabIndex = (indx) => typeof indx === 'number' && indx >= 0 && indx <= 5;
|
||||
if (navToTab && isValidTabIndex(navToTab)) this.navigateToTab(navToTab);
|
||||
this.$store.commit(StoreKeys.CONF_MENU_INDEX, undefined);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.navigateToStartingTab();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue