👔 Logic work for multi-page support

This commit is contained in:
Alicia Sykes
2022-04-30 23:28:58 +01:00
parent 52a0ba5a6c
commit eb9a5abec5
6 changed files with 23 additions and 10 deletions

View File

@@ -31,6 +31,7 @@ const {
SET_PAGE_INFO,
SET_APP_CONFIG,
SET_SECTIONS,
SET_PAGES,
UPDATE_SECTION,
INSERT_SECTION,
REMOVE_SECTION,
@@ -179,6 +180,12 @@ const store = new Vuex.Store({
state.config = newConfig;
InfoHandler('App config updated', InfoKeys.EDITOR);
},
[SET_PAGES](state, multiPages) {
const newConfig = state.config;
newConfig.pages = multiPages;
state.config = newConfig;
InfoHandler('Pages updated', InfoKeys.EDITOR);
},
[SET_SECTIONS](state, newSections) {
const newConfig = state.config;
newConfig.sections = newSections;