2018-07-15 23:16:19 +00:00
|
|
|
import { make } from 'vuex-pathify'
|
|
|
|
|
|
|
|
const state = {
|
2019-01-01 22:03:30 +00:00
|
|
|
editor: '',
|
2019-09-08 16:01:17 +00:00
|
|
|
editorKey: '',
|
2018-07-22 20:25:39 +00:00
|
|
|
content: '',
|
2019-03-20 04:37:33 +00:00
|
|
|
mode: 'create',
|
2019-07-14 20:23:33 +00:00
|
|
|
activeModal: '',
|
|
|
|
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,
|
2019-07-14 20:23:33 +00:00
|
|
|
mutations: {
|
|
|
|
...make.mutations(state),
|
2019-09-08 16:39:05 +00:00
|
|
|
pushMediaFolderTree: (st, folder) => {
|
|
|
|
st.media.folderTree = st.media.folderTree.concat(folder)
|
2019-07-14 20:23:33 +00:00
|
|
|
},
|
2019-09-08 16:39:05 +00:00
|
|
|
popMediaFolderTree: (st) => {
|
|
|
|
st.media.folderTree = st.media.folderTree.slice(0, -1)
|
2019-07-14 20:23:33 +00:00
|
|
|
}
|
|
|
|
}
|
2018-07-15 23:16:19 +00:00
|
|
|
}
|