- fileinfodetail renamed to clipboard

This commit is contained in:
Peter Papp
2021-04-19 09:22:50 +02:00
parent b71072ddda
commit b0c81a692c
24 changed files with 382 additions and 353 deletions
+5 -5
View File
@@ -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)
}