You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.1 KiB

  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. import alert from './modules/alert'
  4. import anchor from './modules/anchor'
  5. import editor from './modules/editor'
  6. import editorCodeblock from './modules/editor-codeblock'
  7. import editorVideo from './modules/editor-video'
  8. import modalCreatePage from './modules/modal-create-page'
  9. import modalCreateUser from './modules/modal-create-user'
  10. import modalDeleteUser from './modules/modal-delete-user'
  11. import modalDiscardPage from './modules/modal-discard-page'
  12. import modalMovePage from './modules/modal-move-page'
  13. import pageLoader from './modules/page-loader'
  14. Vue.use(Vuex)
  15. export default new Vuex.Store({
  16. state: {
  17. loading: false
  18. },
  19. mutations: {
  20. loadingChange: (state, loadingState) => { state.loading = loadingState }
  21. },
  22. actions: {
  23. startLoading({ commit }) { commit('loadingChange', true) },
  24. stopLoading({ commit }) { commit('loadingChange', false) }
  25. },
  26. getters: {},
  27. modules: {
  28. alert,
  29. anchor,
  30. editor,
  31. editorCodeblock,
  32. editorVideo,
  33. modalCreatePage,
  34. modalCreateUser,
  35. modalDeleteUser,
  36. modalDiscardPage,
  37. modalMovePage,
  38. pageLoader
  39. }
  40. })