Handle deleting library items

This commit is contained in:
ronaldheft
2022-08-11 14:12:45 -04:00
parent 8edeefc1cd
commit 60cb5f398c
7 changed files with 40 additions and 22 deletions
+2 -2
View File
@@ -322,13 +322,13 @@ export default {
async deleteItem() {
const { value } = await Dialog.confirm({
title: 'Confirm',
message: `Warning! This will delete the folder "${this.basePath}" and all contents. Are you sure?`
message: `Warning! This will delete "${this.media.metadata.title}" and all associated local files. Are you sure?`
})
if (value) {
var res = await AbsFileSystem.deleteItem(this.localLibraryItem)
if (res && res.success) {
this.$toast.success('Deleted Successfully')
this.$router.replace(`/localMedia/folders/${this.folderId}`)
this.$router.replace(this.isIos ? '/bookshelf' : `/localMedia/folders/${this.folderId}`)
} else this.$toast.error('Failed to delete')
}
},