mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 02:50:39 +00:00
bulk-operations v0.3 add multi shared cancel to contextMenu
This commit is contained in:
@@ -130,6 +130,14 @@
|
||||
: $t('context_menu.share')
|
||||
}}
|
||||
</div>
|
||||
</li>
|
||||
<li class="menu-option" @click="shareCancel" v-if="this.fileInfoDetail.length > 1 && !multiSelectContextMenu">
|
||||
<div class="icon">
|
||||
<link-icon size="17"></link-icon>
|
||||
</div>
|
||||
<div class="text-label">
|
||||
{{$t('context_menu.share_cancel')}}
|
||||
</div>
|
||||
</li>
|
||||
<li class="menu-option" @click="deleteItem">
|
||||
<div class="icon">
|
||||
@@ -404,6 +412,9 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
shareCancel() {
|
||||
this.$store.dispatch('shareCancel')
|
||||
},
|
||||
renameItem() {
|
||||
events.$emit('popup:open', { name: 'rename-item', item: this.item })
|
||||
},
|
||||
|
||||
@@ -226,17 +226,17 @@ export default {
|
||||
events.$emit("popup:open", { name: "move", item: this.fileInfoDetail });
|
||||
},
|
||||
shareItem() {
|
||||
if (this.fileInfoDetail) {
|
||||
if (this.fileInfoDetail[0]) {
|
||||
//ADD BY M
|
||||
if (this.fileInfoDetail.shared) {
|
||||
if (this.fileInfoDetail[0].shared) {
|
||||
events.$emit("popup:open", {
|
||||
name: "share-edit",
|
||||
item: this.fileInfoDetail,
|
||||
item: this.fileInfoDetail[0],
|
||||
});
|
||||
} else {
|
||||
events.$emit("popup:open", {
|
||||
name: "share-create",
|
||||
item: this.fileInfoDetail,
|
||||
item: this.fileInfoDetail[0],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user