mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 11:00:39 +00:00
- fileinfodetail renamed to clipboard
This commit is contained in:
@@ -104,7 +104,7 @@ export default {
|
||||
XIcon
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['user', 'homeDirectory', 'currentFolder', 'config', 'fileInfoDetail']),
|
||||
...mapGetters(['user', 'homeDirectory', 'currentFolder', 'config', 'clipboard']),
|
||||
favourites() {
|
||||
return this.user.data.relationships.favourites.data.attributes.folders
|
||||
},
|
||||
@@ -137,7 +137,7 @@ export default {
|
||||
dragEnter() {
|
||||
if (this.draggedItem && this.draggedItem.type !== 'folder') return
|
||||
|
||||
if (this.fileInfoDetail.length > 0 && this.fileInfoDetail.find(item => item.type !== 'folder')) return
|
||||
if (this.clipboard.length > 0 && this.clipboard.find(item => item.type !== 'folder')) return
|
||||
|
||||
this.area = true
|
||||
},
|
||||
@@ -156,17 +156,17 @@ export default {
|
||||
if (this.favourites.find(folder => folder.id == this.draggedItem.id)) return
|
||||
|
||||
// Prevent to move folders to self
|
||||
if (this.fileInfoDetail.length > 0 && this.fileInfoDetail.find(item => item.type !== 'folder')) return
|
||||
if (this.clipboard.length > 0 && this.clipboard.find(item => item.type !== 'folder')) return
|
||||
|
||||
// Store favourites folder
|
||||
|
||||
//Add to favourites non selected folder
|
||||
if (!this.fileInfoDetail.includes(this.draggedItem)) {
|
||||
if (!this.clipboard.includes(this.draggedItem)) {
|
||||
this.$store.dispatch('addToFavourites', this.draggedItem)
|
||||
}
|
||||
|
||||
//Add to favourites selected folders
|
||||
if (this.fileInfoDetail.includes(this.draggedItem)) {
|
||||
if (this.clipboard.includes(this.draggedItem)) {
|
||||
this.$store.dispatch('addToFavourites', null)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user