Item size and layout are now managed by store

This commit is contained in:
Alicia Sykes
2021-10-30 13:45:47 +01:00
parent 513b1cd955
commit 168e52c251
5 changed files with 25 additions and 37 deletions

View File

@@ -86,6 +86,12 @@ const store = new Vuex.Store({
});
return foundSection;
},
layout(state) {
return state.config.appConfig.layout || 'auto';
},
iconSize(state) {
return state.config.appConfig.iconSize || 'medium';
},
},
mutations: {
[SET_CONFIG](state, config) {
@@ -217,12 +223,15 @@ const store = new Vuex.Store({
},
[SET_ITEM_LAYOUT](state, layout) {
state.config.appConfig.layout = layout;
InfoHandler('Layout updated', InfoKeys.VISUAL);
},
[SET_ITEM_SIZE](state, iconSize) {
state.config.appConfig.iconSize = iconSize;
InfoHandler('Item size updated', InfoKeys.VISUAL);
},
[UPDATE_CUSTOM_CSS](state, customCss) {
state.config.appConfig.customCss = customCss;
InfoHandler('Custom colors updated', InfoKeys.VISUAL);
},
},
actions: {