refactor: editor-video -> vue component + localization
This commit is contained in:
@@ -5,6 +5,7 @@ import alert from './modules/alert'
|
||||
import anchor from './modules/anchor'
|
||||
import editor from './modules/editor'
|
||||
import editorCodeblock from './modules/editor-codeblock'
|
||||
import editorVideo from './modules/editor-video'
|
||||
import modalCreatePage from './modules/modal-create-page'
|
||||
import modalCreateUser from './modules/modal-create-user'
|
||||
import modalDiscardPage from './modules/modal-discard-page'
|
||||
@@ -30,6 +31,7 @@ export default new Vuex.Store({
|
||||
anchor,
|
||||
editor,
|
||||
editorCodeblock,
|
||||
editorVideo,
|
||||
modalCreatePage,
|
||||
modalCreateUser,
|
||||
modalDiscardPage,
|
||||
|
19
client/js/store/modules/editor-video.js
Normal file
19
client/js/store/modules/editor-video.js
Normal file
@@ -0,0 +1,19 @@
|
||||
'use strict'
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
shown: false
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
shownChange: (state, shownState) => { state.shown = shownState }
|
||||
},
|
||||
actions: {
|
||||
open({ commit }) {
|
||||
commit('shownChange', true)
|
||||
wikijs.$emit('editorVideo/init')
|
||||
},
|
||||
close({ commit }) { commit('shownChange', false) }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user