From 9045935d9623644367a83533245c13a0e5328c9d Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Thu, 13 Sep 2018 10:18:06 +0200 Subject: [PATCH] Generalize modal display --- client/src/App.vue | 5 ++++- client/src/store/index.js | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/client/src/App.vue b/client/src/App.vue index 9edd1a4f..41fb07d8 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -1,6 +1,6 @@ @@ -27,6 +27,9 @@ }, showModal() { return this.$store.state.showModal + }, + modalComponent() { + return 'new-content-block-wizard' } }, diff --git a/client/src/store/index.js b/client/src/store/index.js index 78748d55..ae3ce666 100644 --- a/client/src/store/index.js +++ b/client/src/store/index.js @@ -10,6 +10,7 @@ export default new Vuex.Store({ specialContainerClass: '', showFilter: true, showModal: false, + showNewContentBlockModal: false, contentBlockPosition: {}, scrollPosition: 0, moduleSlug: 'mein-neues-umfeld', @@ -37,11 +38,11 @@ export default new Vuex.Store({ }, addContentBlock({commit, dispatch}, payload) { commit('setContentBlockPosition', payload); - dispatch('showModal'); + dispatch('showModal', 'new-content-block-wizard'); }, - showModal({commit}) { + showModal({commit}, payload) { document.body.classList.add('no-scroll'); // won't get at the body any other way - commit('setModal', true); + commit('setModal', payload); }, updateContentBlocks({commit}) { commit('updateContentBlocks', true);