π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
:zap: Adds store value to determine which view being edited
Alicia Sykesdd49ad77a582
diff --git a/src/store.js b/src/store.jsindex 9faa81f3..a0cf9bcc 100644--- a/src/store.js+++ b/src/store.js@@ -18,6 +18,7 @@ const {INITIALIZE_MULTI_PAGE_CONFIG,SET_CONFIG,SET_REMOTE_CONFIG,+ SET_CURRENT_SUB_PAGE,SET_MODAL_OPEN,SET_LANGUAGE,SET_ITEM_LAYOUT,@@ -42,10 +43,11 @@ const {const store = new Vuex.Store({state: {- config: {},+ config: {}, // The current config, rendered to the UIremoteConfig: {}, // The configuration stored on the servereditMode: false, // While true, the user can drag and edit items + sectionsmodalOpen: false, // KB shortcut functionality will be disabled when modal is open+ currentConfigInfo: undefined, // For multi-page support, will store info about config filenavigateConfToTab: undefined, // Used to switch active tab in config modal},getters: {@@ -280,6 +282,9 @@ const store = new Vuex.Store({[CONF_MENU_INDEX](state, index) {state.navigateConfToTab = index;},+ [SET_CURRENT_SUB_PAGE](state, subPageObject) {+ state.currentConfigInfo = subPageObject;+ },[USE_MAIN_CONFIG](state) {if (state.remoteConfig) {state.config = state.remoteConfig;diff --git a/src/utils/StoreMutations.js b/src/utils/StoreMutations.jsindex bffa93ef..7397675a 100644--- a/src/utils/StoreMutations.js+++ b/src/utils/StoreMutations.js@@ -4,6 +4,7 @@ const KEY_NAMES = ['INITIALIZE_MULTI_PAGE_CONFIG','SET_CONFIG','SET_REMOTE_CONFIG',+ 'SET_CURRENT_SUB_PAGE','SET_MODAL_OPEN','SET_LANGUAGE','SET_EDIT_MODE',