refactor: editor-file.vue -> image + localization

This commit is contained in:
NGPixel
2017-06-07 22:16:43 -04:00
parent c38ba72b5b
commit 5d1550287d
10 changed files with 130 additions and 972 deletions

View File

@@ -3,15 +3,18 @@
export default {
namespaced: true,
state: {
shown: false
shown: false,
mode: 'image'
},
getters: {},
mutations: {
shownChange: (state, shownState) => { state.shown = shownState }
shownChange: (state, shownState) => { state.shown = shownState },
modeChange: (state, modeState) => { state.mode = modeState }
},
actions: {
open({ commit }, opts) {
commit('shownChange', true)
commit('modeChange', opts.mode)
wikijs.$emit('editorFile/init')
},
close({ commit }) { commit('shownChange', false) }