|
@ -228,7 +228,7 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import _ from 'lodash' |
|
|
import _ from 'lodash' |
|
|
import { sync } from 'vuex-pathify' |
|
|
|
|
|
|
|
|
import { get, sync } from 'vuex-pathify' |
|
|
import vueFilePond from 'vue-filepond' |
|
|
import vueFilePond from 'vue-filepond' |
|
|
import 'filepond/dist/filepond.min.css' |
|
|
import 'filepond/dist/filepond.min.css' |
|
|
|
|
|
|
|
@ -255,7 +255,6 @@ export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
folders: [], |
|
|
folders: [], |
|
|
folderTree: [], |
|
|
|
|
|
files: [], |
|
|
files: [], |
|
|
assets: [], |
|
|
assets: [], |
|
|
pagination: {}, |
|
|
pagination: {}, |
|
@ -268,9 +267,6 @@ export default { |
|
|
{ text: 'Absolute Top Right', value: 'abstopright' } |
|
|
{ text: 'Absolute Top Right', value: 'abstopright' } |
|
|
], |
|
|
], |
|
|
imageAlignment: '', |
|
|
imageAlignment: '', |
|
|
currentFolderId: 0, |
|
|
|
|
|
currentFileId: null, |
|
|
|
|
|
previousFolderId: 0, |
|
|
|
|
|
loading: false, |
|
|
loading: false, |
|
|
newFolderDialog: false, |
|
|
newFolderDialog: false, |
|
|
newFolderName: '', |
|
|
newFolderName: '', |
|
@ -289,6 +285,9 @@ export default { |
|
|
set(val) { this.$emit('input', val) } |
|
|
set(val) { this.$emit('input', val) } |
|
|
}, |
|
|
}, |
|
|
activeModal: sync('editor/activeModal'), |
|
|
activeModal: sync('editor/activeModal'), |
|
|
|
|
|
folderTree: get('editor/media@folderTree'), |
|
|
|
|
|
currentFolderId: sync('editor/media@currentFolderId'), |
|
|
|
|
|
currentFileId: sync('editor/media@currentFileId'), |
|
|
pageTotal () { |
|
|
pageTotal () { |
|
|
if (this.pagination.rowsPerPage == null || this.pagination.totalItems == null) { |
|
|
if (this.pagination.rowsPerPage == null || this.pagination.totalItems == null) { |
|
|
return 0 |
|
|
return 0 |
|
@ -400,12 +399,12 @@ export default { |
|
|
await this.$apollo.queries.assets.refetch() |
|
|
await this.$apollo.queries.assets.refetch() |
|
|
}, |
|
|
}, |
|
|
downFolder(folder) { |
|
|
downFolder(folder) { |
|
|
this.folderTree.push(folder) |
|
|
|
|
|
|
|
|
this.$store.commit('editor/pushMediaFolderTree', folder) |
|
|
this.currentFolderId = folder.id |
|
|
this.currentFolderId = folder.id |
|
|
this.currentFileId = null |
|
|
this.currentFileId = null |
|
|
}, |
|
|
}, |
|
|
upFolder() { |
|
|
upFolder() { |
|
|
this.folderTree.pop() |
|
|
|
|
|
|
|
|
this.$store.commit('editor/popMediaFolderTree') |
|
|
const parentFolder = _.last(this.folderTree) |
|
|
const parentFolder = _.last(this.folderTree) |
|
|
this.currentFolderId = parentFolder ? parentFolder.id : 0 |
|
|
this.currentFolderId = parentFolder ? parentFolder.id : 0 |
|
|
this.currentFileId = null |
|
|
this.currentFileId = null |
|
|