🏪 Adds custom theme options to store

This commit is contained in:
Alicia Sykes
2021-10-30 13:22:58 +01:00
parent e556445094
commit 6f3570eed2
3 changed files with 45 additions and 33 deletions

View File

@@ -18,6 +18,7 @@ const {
SET_ITEM_LAYOUT,
SET_ITEM_SIZE,
SET_THEME,
SET_CUSTOM_COLORS,
UPDATE_ITEM,
SET_EDIT_MODE,
SET_PAGE_INFO,
@@ -208,6 +209,12 @@ const store = new Vuex.Store({
state.config = newConfig;
InfoHandler('Theme updated', InfoKeys.VISUAL);
},
[SET_CUSTOM_COLORS](state, customColors) {
const newConfig = { ...state.config };
newConfig.appConfig.customColors = customColors;
state.config = newConfig;
InfoHandler('Color palette updated', InfoKeys.VISUAL);
},
[SET_ITEM_LAYOUT](state, layout) {
state.config.appConfig.layout = layout;
},