bulk-operations v0.3 add multi shared cancel to contextMenu

This commit is contained in:
Milos Holba
2020-12-04 13:34:00 +01:00
parent ee14c34671
commit d31e2ab98b
10 changed files with 124 additions and 26 deletions
+3 -12
View File
@@ -158,7 +158,7 @@
changePassword() {
this.canChangePassword = false
},
destroySharing() {
async destroySharing() {
// Set confirm button
if (! this.isConfirmedDestroy) {
@@ -170,18 +170,9 @@
this.isDeleting = true
// Send delete request
axios
.post('/api/share/' + this.pickedItem.shared.token, {
_method: 'delete'
})
.then(() => {
// Remove item from file browser
if ( this.isSharedLocation ) {
this.$store.commit('REMOVE_ITEM', this.pickedItem.unique_id)
}
// Flush shared data
this.$store.commit('FLUSH_SHARED', this.pickedItem.unique_id)
await this.$store.dispatch('shareCancel' , this.pickedItem)
.then((response) => {
// End deleting spinner button
setTimeout(() => this.isDeleting = false, 150)