refactor: vuex re-org + modal-create-page

This commit is contained in:
NGPixel
2017-05-25 20:54:03 -04:00
parent 12132ad42e
commit f075c266ef
19 changed files with 201 additions and 116 deletions

View File

@@ -1,15 +1,19 @@
'use strict'
export default {
namespaced: true,
state: {
shown: false
entrypath: '',
shown: false,
invalid: false
},
getters: {},
mutations: {
shownChange: (state, shownState) => { state.shown = shownState }
shownChange: (state, shownState) => { state.shown = shownState },
pathChange: (state, newpath) => { state.entrypath = newpath }
},
actions: {
adminUsersCreateOpen({ commit }) { commit('shownChange', true) },
adminUsersCreateClose({ commit }) { commit('shownChange', false) }
open({ commit }) { commit('shownChange', true) },
close({ commit }) { commit('shownChange', false) }
}
}

View File

@@ -1,6 +1,7 @@
'use strict'
export default {
namespaced: true,
state: {
shown: false
},
@@ -9,7 +10,7 @@ export default {
shownChange: (state, shownState) => { state.shown = shownState }
},
actions: {
adminUsersCreateOpen({ commit }) { commit('shownChange', true) },
adminUsersCreateClose({ commit }) { commit('shownChange', false) }
open({ commit }) { commit('shownChange', true) },
close({ commit }) { commit('shownChange', false) }
}
}