You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
584 B

5 years ago
  1. import { make } from 'vuex-pathify'
  2. const state = {
  3. editor: '',
  4. editorKey: '',
  5. content: '',
  6. mode: 'create',
  7. activeModal: '',
  8. activeModalData: null,
  9. media: {
  10. folderTree: [],
  11. currentFolderId: 0,
  12. currentFileId: null
  13. },
  14. checkoutDateActive: ''
  15. }
  16. export default {
  17. namespaced: true,
  18. state,
  19. mutations: {
  20. ...make.mutations(state),
  21. pushMediaFolderTree: (st, folder) => {
  22. st.media.folderTree = st.media.folderTree.concat(folder)
  23. },
  24. popMediaFolderTree: (st) => {
  25. st.media.folderTree = st.media.folderTree.slice(0, -1)
  26. }
  27. }
  28. }