refactor: modal-move-page -> vue component

This commit is contained in:
NGPixel
2017-05-26 22:23:05 -04:00
parent 62e7ea5b2b
commit 3cb53bd1d5
11 changed files with 107 additions and 160 deletions

View File

@@ -5,6 +5,7 @@ import alert from './modules/alert'
import anchor from './modules/anchor'
import modalCreatePage from './modules/modal-create-page'
import modalCreateUser from './modules/modal-create-user'
import modalMovePage from './modules/modal-move-page'
import pageLoader from './modules/page-loader'
Vue.use(Vuex)
@@ -26,6 +27,7 @@ export default new Vuex.Store({
anchor,
modalCreatePage,
modalCreateUser,
modalMovePage,
pageLoader
}
})

View File

@@ -0,0 +1,16 @@
'use strict'
export default {
namespaced: true,
state: {
shown: false
},
getters: {},
mutations: {
shownChange: (state, shownState) => { state.shown = shownState }
},
actions: {
open({ commit }) { commit('shownChange', true) },
close({ commit }) { commit('shownChange', false) }
}
}