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.

51 lines
1.4 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 editorFile from './modules/editor-file'
  8. import editorVideo from './modules/editor-video'
  9. import modalCreatePage from './modules/modal-create-page'
  10. import modalCreateUser from './modules/modal-create-user'
  11. import modalDeleteUser from './modules/modal-delete-user'
  12. import modalDeletePage from './modules/modal-delete-page'
  13. import modalDiscardPage from './modules/modal-discard-page'
  14. import modalMovePage from './modules/modal-move-page'
  15. import modalProfile2fa from './modules/modal-profile-2fa'
  16. import modalUpgradeSystem from './modules/modal-upgrade-system'
  17. import pageLoader from './modules/page-loader'
  18. Vue.use(Vuex)
  19. export default new Vuex.Store({
  20. state: {
  21. loading: false
  22. },
  23. mutations: {
  24. loadingChange: (state, loadingState) => { state.loading = loadingState }
  25. },
  26. actions: {
  27. startLoading({ commit }) { commit('loadingChange', true) },
  28. stopLoading({ commit }) { commit('loadingChange', false) }
  29. },
  30. getters: {},
  31. modules: {
  32. alert,
  33. anchor,
  34. editor,
  35. editorCodeblock,
  36. editorFile,
  37. editorVideo,
  38. modalCreatePage,
  39. modalCreateUser,
  40. modalDeletePage,
  41. modalDeleteUser,
  42. modalDiscardPage,
  43. modalMovePage,
  44. modalProfile2fa,
  45. modalUpgradeSystem,
  46. pageLoader
  47. }
  48. })