mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-07 00:19:41 +00:00
Update: switch to target library view after moving items
This commit is contained in:
parent
b0280f614b
commit
ed48fd8558
1 changed files with 4 additions and 0 deletions
|
|
@ -210,12 +210,16 @@ export default {
|
||||||
}
|
}
|
||||||
// Clear selection after batch move
|
// Clear selection after batch move
|
||||||
this.$store.commit('globals/resetSelectedMediaItems')
|
this.$store.commit('globals/resetSelectedMediaItems')
|
||||||
|
if (response.successCount > 0) {
|
||||||
|
this.$router.push(`/library/${this.selectedLibraryId}`)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Single item move
|
// Single item move
|
||||||
const response = await this.$axios.$post(`/api/items/${this.libraryItem.id}/move`, payload)
|
const response = await this.$axios.$post(`/api/items/${this.libraryItem.id}/move`, payload)
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
this.$toast.success(this.$strings.ToastItemMoved)
|
this.$toast.success(this.$strings.ToastItemMoved)
|
||||||
this.$store.commit('setSelectedLibraryItem', null)
|
this.$store.commit('setSelectedLibraryItem', null)
|
||||||
|
this.$router.push(`/library/${this.selectedLibraryId}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.show = false
|
this.show = false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue