mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-27 07:34:43 +02:00
⚡ Adds store value to determine which view being edited
This commit is contained in:
parent
7706041d61
commit
dd49ad77a5
@ -18,6 +18,7 @@ const {
|
|||||||
INITIALIZE_MULTI_PAGE_CONFIG,
|
INITIALIZE_MULTI_PAGE_CONFIG,
|
||||||
SET_CONFIG,
|
SET_CONFIG,
|
||||||
SET_REMOTE_CONFIG,
|
SET_REMOTE_CONFIG,
|
||||||
|
SET_CURRENT_SUB_PAGE,
|
||||||
SET_MODAL_OPEN,
|
SET_MODAL_OPEN,
|
||||||
SET_LANGUAGE,
|
SET_LANGUAGE,
|
||||||
SET_ITEM_LAYOUT,
|
SET_ITEM_LAYOUT,
|
||||||
@ -42,10 +43,11 @@ const {
|
|||||||
|
|
||||||
const store = new Vuex.Store({
|
const store = new Vuex.Store({
|
||||||
state: {
|
state: {
|
||||||
config: {},
|
config: {}, // The current config, rendered to the UI
|
||||||
remoteConfig: {}, // The configuration stored on the server
|
remoteConfig: {}, // The configuration stored on the server
|
||||||
editMode: false, // While true, the user can drag and edit items + sections
|
editMode: false, // While true, the user can drag and edit items + sections
|
||||||
modalOpen: false, // KB shortcut functionality will be disabled when modal is open
|
modalOpen: false, // KB shortcut functionality will be disabled when modal is open
|
||||||
|
currentConfigInfo: undefined, // For multi-page support, will store info about config file
|
||||||
navigateConfToTab: undefined, // Used to switch active tab in config modal
|
navigateConfToTab: undefined, // Used to switch active tab in config modal
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
@ -280,6 +282,9 @@ const store = new Vuex.Store({
|
|||||||
[CONF_MENU_INDEX](state, index) {
|
[CONF_MENU_INDEX](state, index) {
|
||||||
state.navigateConfToTab = index;
|
state.navigateConfToTab = index;
|
||||||
},
|
},
|
||||||
|
[SET_CURRENT_SUB_PAGE](state, subPageObject) {
|
||||||
|
state.currentConfigInfo = subPageObject;
|
||||||
|
},
|
||||||
[USE_MAIN_CONFIG](state) {
|
[USE_MAIN_CONFIG](state) {
|
||||||
if (state.remoteConfig) {
|
if (state.remoteConfig) {
|
||||||
state.config = state.remoteConfig;
|
state.config = state.remoteConfig;
|
||||||
|
@ -4,6 +4,7 @@ const KEY_NAMES = [
|
|||||||
'INITIALIZE_MULTI_PAGE_CONFIG',
|
'INITIALIZE_MULTI_PAGE_CONFIG',
|
||||||
'SET_CONFIG',
|
'SET_CONFIG',
|
||||||
'SET_REMOTE_CONFIG',
|
'SET_REMOTE_CONFIG',
|
||||||
|
'SET_CURRENT_SUB_PAGE',
|
||||||
'SET_MODAL_OPEN',
|
'SET_MODAL_OPEN',
|
||||||
'SET_LANGUAGE',
|
'SET_LANGUAGE',
|
||||||
'SET_EDIT_MODE',
|
'SET_EDIT_MODE',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user