|
@@ -45,6 +45,7 @@ const actions = {
|
|
const mutations = {
|
|
const mutations = {
|
|
closeModal(state, modal) {
|
|
closeModal(state, modal) {
|
|
state.modals[modal] = false;
|
|
state.modals[modal] = false;
|
|
|
|
+ if (state.currentlyActive[0] === modal) state.currentlyActive.shift();
|
|
},
|
|
},
|
|
openModal(state, modal) {
|
|
openModal(state, modal) {
|
|
state.modals[modal] = true;
|
|
state.modals[modal] = true;
|
|
@@ -52,7 +53,6 @@ const mutations = {
|
|
},
|
|
},
|
|
closeCurrentModal(state) {
|
|
closeCurrentModal(state) {
|
|
// remove any websocket listeners for the modal
|
|
// remove any websocket listeners for the modal
|
|
- console.log(`Closing current modal (${state.currentlyActive[0]})`);
|
|
|
|
ws.destroyModalListeners(state.currentlyActive[0]);
|
|
ws.destroyModalListeners(state.currentlyActive[0]);
|
|
|
|
|
|
state.modals[state.currentlyActive[0]] = false;
|
|
state.modals[state.currentlyActive[0]] = false;
|