2018-09-02 23:26:15 +03:00
|
|
|
import Vuex from 'vuex'
|
2018-09-13 10:51:20 +03:00
|
|
|
import category from 'client/store/modules/category'
|
2018-09-21 16:09:32 +03:00
|
|
|
import categoryItem from 'client/store/modules/categoryItem'
|
2018-10-28 18:29:54 +03:00
|
|
|
import wiki from 'client/store/modules/wiki'
|
2018-09-02 23:26:15 +03:00
|
|
|
|
2019-02-04 10:57:28 +03:00
|
|
|
function createStore () {
|
2018-09-13 10:51:20 +03:00
|
|
|
// TODO loggins mutations in dev
|
2018-09-02 23:26:15 +03:00
|
|
|
return new Vuex.Store({
|
2019-02-10 15:00:50 +03:00
|
|
|
state: {
|
|
|
|
isPageLoading: false
|
|
|
|
},
|
2018-09-13 10:51:20 +03:00
|
|
|
actions: {},
|
2019-02-10 15:00:50 +03:00
|
|
|
mutations: {
|
|
|
|
tooglePageLoading (state) {
|
|
|
|
state.isPageLoading = !state.isPageLoading
|
|
|
|
}
|
|
|
|
},
|
2018-09-13 10:51:20 +03:00
|
|
|
modules: {
|
2018-09-21 16:09:32 +03:00
|
|
|
category,
|
2018-10-28 18:29:54 +03:00
|
|
|
categoryItem,
|
|
|
|
wiki
|
2018-09-13 10:51:20 +03:00
|
|
|
}
|
2018-09-02 23:26:15 +03:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
export {
|
|
|
|
createStore
|
|
|
|
}
|