🚧 WIP, redo layout and size, to use VueX state

This commit is contained in:
Alicia Sykes
2021-10-25 23:41:05 +01:00
parent 06d08a8fff
commit b882a38950
4 changed files with 14 additions and 0 deletions

View File

@@ -14,6 +14,8 @@ const {
UPDATE_CONFIG,
SET_MODAL_OPEN,
SET_LANGUAGE,
SET_ITEM_LAYOUT,
SET_ITEM_SIZE,
UPDATE_ITEM,
SET_EDIT_MODE,
UPDATE_PAGE_INFO,
@@ -164,6 +166,12 @@ const store = new Vuex.Store({
});
state.config = config;
},
[SET_ITEM_LAYOUT](state, layout) {
state.config.appConfig.layout = layout;
},
[SET_ITEM_SIZE](state, iconSize) {
state.config.appConfig.iconSize = iconSize;
},
},
actions: {
/* Called when app first loaded. Reads config and sets state */