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.

22 lines
493 B

  1. 'use strict'
  2. export default {
  3. namespaced: true,
  4. state: {
  5. shown: false,
  6. mode: 'image'
  7. },
  8. getters: {},
  9. mutations: {
  10. shownChange: (state, shownState) => { state.shown = shownState },
  11. modeChange: (state, modeState) => { state.mode = modeState }
  12. },
  13. actions: {
  14. open({ commit }, opts) {
  15. commit('shownChange', true)
  16. commit('modeChange', opts.mode)
  17. wikijs.$emit('editorFile/init')
  18. },
  19. close({ commit }) { commit('shownChange', false) }
  20. }
  21. }