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.

29 lines
559 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. media: {
  9. folderTree: [],
  10. currentFolderId: 0,
  11. currentFileId: null
  12. },
  13. checkoutDateActive: ''
  14. }
  15. export default {
  16. namespaced: true,
  17. state,
  18. mutations: {
  19. ...make.mutations(state),
  20. pushMediaFolderTree: (st, folder) => {
  21. st.media.folderTree = st.media.folderTree.concat(folder)
  22. },
  23. popMediaFolderTree: (st) => {
  24. st.media.folderTree = st.media.folderTree.slice(0, -1)
  25. }
  26. }
  27. }