refactor: vue comp: page-loader + modal-create-page

This commit is contained in:
NGPixel
2017-05-26 00:12:38 -04:00
parent f075c266ef
commit c13c754c4c
10 changed files with 89 additions and 42 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 pageLoader from './modules/page-loader'
Vue.use(Vuex)
@@ -24,6 +25,7 @@ export default new Vuex.Store({
alert,
anchor,
modalCreatePage,
modalCreateUser
modalCreateUser,
pageLoader
}
})

View File

@@ -0,0 +1,17 @@
'use strict'
export default {
namespaced: true,
state: {
shown: true,
msg: 'Loading...'
},
getters: {},
mutations: {
shownChange: (state, shownState) => { state.shown = shownState },
msgChange: (state, newText) => { state.msg = newText }
},
actions: {
complete({ commit }) { commit('shownChange', false) }
}
}