mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-25 21:24:42 +02:00
Update:Bookmarks modal is not closed on updating/deleting and does not show a toast #882
This commit is contained in:
parent
e9251db647
commit
087e8553c4
2 changed files with 21 additions and 7 deletions
|
@ -105,30 +105,28 @@ export default {
|
|||
this.$nativeHttp
|
||||
.delete(`/api/me/item/${this.libraryItemId}/bookmark/${bm.time}`)
|
||||
.then(() => {
|
||||
this.$toast.success('Bookmark removed')
|
||||
this.$store.commit('user/deleteBookmark', { libraryItemId: this.libraryItemId, time: bm.time })
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$toast.error(`Failed to remove bookmark`)
|
||||
console.error(error)
|
||||
})
|
||||
this.show = false
|
||||
},
|
||||
async clickBookmark(bm) {
|
||||
await this.$hapticsImpact()
|
||||
this.$emit('select', bm)
|
||||
},
|
||||
submitUpdateBookmark(updatedBookmark) {
|
||||
var bookmark = { ...updatedBookmark }
|
||||
this.$nativeHttp
|
||||
.patch(`/api/me/item/${this.libraryItemId}/bookmark`, bookmark)
|
||||
.then(() => {
|
||||
this.$toast.success('Bookmark updated')
|
||||
.patch(`/api/me/item/${this.libraryItemId}/bookmark`, updatedBookmark)
|
||||
.then((bookmark) => {
|
||||
this.$store.commit('user/updateBookmark', bookmark)
|
||||
this.showBookmarkTitleInput = false
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$toast.error(`Failed to update bookmark`)
|
||||
console.error(error)
|
||||
})
|
||||
this.show = false
|
||||
},
|
||||
submitCreateBookmark() {
|
||||
if (!this.newBookmarkTitle) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue