wikijs-fork/client/store/editor.js

31 lines
584 B
JavaScript
Raw Permalink Normal View History

2018-07-15 23:16:19 +00:00
import { make } from 'vuex-pathify'
const state = {
editor: '',
2019-09-08 16:01:17 +00:00
editorKey: '',
content: '',
mode: 'create',
activeModal: '',
2020-07-12 23:20:10 +00:00
activeModalData: null,
media: {
folderTree: [],
currentFolderId: 0,
currentFileId: null
2020-03-21 23:18:08 +00:00
},
checkoutDateActive: ''
2018-07-15 23:16:19 +00:00
}
export default {
namespaced: true,
state,
mutations: {
...make.mutations(state),
2019-09-08 16:39:05 +00:00
pushMediaFolderTree: (st, folder) => {
st.media.folderTree = st.media.folderTree.concat(folder)
},
2019-09-08 16:39:05 +00:00
popMediaFolderTree: (st) => {
st.media.folderTree = st.media.folderTree.slice(0, -1)
}
}
2018-07-15 23:16:19 +00:00
}