Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:zap: Adds option for starting tab to be applied

Alicia Sykesfd0424170032
diff --git a/src/components/Configuration/ConfigContainer.vue b/src/components/Configuration/ConfigContainer.vue
index aa535031..c797ff90 100644
--- a/src/components/Configuration/ConfigContainer.vue
+++ b/src/components/Configuration/ConfigContainer.vue
@@ -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>