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"/>
|
<EditIcon class="button-icon"/>
|
||||||
{{ $t('config.edit-config-button') }}
|
{{ $t('config.edit-config-button') }}
|
||||||
</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)">
|
<button class="config-button center" @click="() => navigateToTab(3)">
|
||||||
<CustomCssIcon class="button-icon"/>
|
<CustomCssIcon class="button-icon"/>
|
||||||
{{ $t('config.edit-css-button') }}
|
{{ $t('config.edit-css-button') }}
|
||||||
|
@ -22,10 +26,6 @@
|
||||||
<CloudIcon class="button-icon"/>
|
<CloudIcon class="button-icon"/>
|
||||||
{{backupId ? $t('config.edit-cloud-sync-button') : $t('config.cloud-sync-button') }}
|
{{backupId ? $t('config.edit-cloud-sync-button') : $t('config.cloud-sync-button') }}
|
||||||
</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()">
|
<button class="config-button center" @click="openRebuildAppModal()">
|
||||||
<RebuildIcon class="button-icon"/>
|
<RebuildIcon class="button-icon"/>
|
||||||
{{ $t('config.rebuild-app-button') }}
|
{{ $t('config.rebuild-app-button') }}
|
||||||
|
@ -153,6 +153,16 @@ export default {
|
||||||
const lang = getUsersLanguage();
|
const lang = getUsersLanguage();
|
||||||
return lang ? `${lang.flag} ${lang.name}` : '';
|
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>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue