2017-10-30 01:36:05 +00:00
|
|
|
/* global wikijs */
|
2017-05-27 22:03:24 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
namespaced: true,
|
2017-05-28 18:34:50 +00:00
|
|
|
state: {
|
|
|
|
busy: false,
|
|
|
|
insertContent: ''
|
|
|
|
},
|
2017-05-27 22:03:24 +00:00
|
|
|
getters: {},
|
2017-05-28 18:34:50 +00:00
|
|
|
mutations: {
|
|
|
|
busyChange: (state, busyState) => { state.shown = busyState },
|
|
|
|
insertContentChange: (state, newContent) => { state.insertContent = newContent }
|
|
|
|
},
|
|
|
|
actions: {
|
|
|
|
busyStart({ commit }) { commit('busyChange', true) },
|
|
|
|
busyStop({ commit }) { commit('busyChange', false) },
|
|
|
|
insert({ commit }, content) {
|
|
|
|
commit('insertContentChange', content)
|
|
|
|
wikijs.$emit('editor/insert')
|
|
|
|
}
|
|
|
|
}
|
2017-05-27 22:03:24 +00:00
|
|
|
}
|