2017-05-21 20:43:58 +00:00
|
|
|
import Vue from 'vue'
|
|
|
|
import Vuex from 'vuex'
|
|
|
|
|
|
|
|
import alert from './modules/alert'
|
2017-05-22 17:32:52 +00:00
|
|
|
import anchor from './modules/anchor'
|
2017-05-23 04:27:16 +00:00
|
|
|
import modalCreatePage from './modules/modal-create-page'
|
|
|
|
import modalCreateUser from './modules/modal-create-user'
|
2017-05-26 04:12:38 +00:00
|
|
|
import pageLoader from './modules/page-loader'
|
2017-05-21 20:43:58 +00:00
|
|
|
|
|
|
|
Vue.use(Vuex)
|
|
|
|
|
|
|
|
export default new Vuex.Store({
|
|
|
|
state: {
|
|
|
|
loading: false
|
|
|
|
},
|
|
|
|
mutations: {
|
|
|
|
loadingChange: (state, loadingState) => { state.loading = loadingState }
|
|
|
|
},
|
|
|
|
actions: {
|
|
|
|
startLoading({ commit }) { commit('loadingChange', true) },
|
|
|
|
stopLoading({ commit }) { commit('loadingChange', false) }
|
|
|
|
},
|
|
|
|
getters: {},
|
|
|
|
modules: {
|
|
|
|
alert,
|
2017-05-22 17:32:52 +00:00
|
|
|
anchor,
|
2017-05-23 04:27:16 +00:00
|
|
|
modalCreatePage,
|
2017-05-26 04:12:38 +00:00
|
|
|
modalCreateUser,
|
|
|
|
pageLoader
|
2017-05-21 20:43:58 +00:00
|
|
|
}
|
|
|
|
})
|