mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-11 11:51:36 +00:00
Consolidate translations and reduce number of toasts
This commit is contained in:
parent
3dfbddda33
commit
c273626c3d
18 changed files with 15 additions and 48 deletions
|
|
@ -218,7 +218,6 @@ export default {
|
|||
.$post(`/api/emails/ereader-devices`, payload)
|
||||
.then((data) => {
|
||||
this.ereaderDevicesUpdated(data.ereaderDevices)
|
||||
this.$toast.success(this.$strings.ToastDeviceDeleteSuccess)
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Failed to delete device', error)
|
||||
|
|
|
|||
|
|
@ -290,7 +290,6 @@ export default {
|
|||
this.$axios
|
||||
.$post(`/api/sessions/batch/delete`, payload)
|
||||
.then(() => {
|
||||
this.$toast.success(this.$strings.ToastSessionsRemoved)
|
||||
if (isAllSessions) {
|
||||
// If all sessions were removed from the current page then go to the previous page
|
||||
if (this.currentPage > 0) {
|
||||
|
|
@ -358,12 +357,13 @@ export default {
|
|||
})
|
||||
|
||||
if (!libraryItem) {
|
||||
this.$toast.error(this.$strings.ToastGetLibraryItemFailed)
|
||||
this.$toast.error(this.$strings.ToastFailedToLoadData)
|
||||
this.processingGoToTimestamp = false
|
||||
return
|
||||
}
|
||||
if (session.episodeId && !libraryItem.media.episodes.some((ep) => ep.id === session.episodeId)) {
|
||||
this.$toast.error(this.$strings.ToastGetPodcastEpisodeFailed)
|
||||
console.error('Episode not found in library item', session.episodeId, libraryItem.media.episodes)
|
||||
this.$toast.error(this.$strings.ToastFailedToLoadData)
|
||||
this.processingGoToTimestamp = false
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,12 +127,13 @@ export default {
|
|||
})
|
||||
|
||||
if (!libraryItem) {
|
||||
this.$toast.error(this.$strings.ToastGetLibraryItemFailed)
|
||||
this.$toast.error(this.$strings.ToastFailedToLoadData)
|
||||
this.processingGoToTimestamp = false
|
||||
return
|
||||
}
|
||||
if (session.episodeId && !libraryItem.media.episodes.some((ep) => ep.id === session.episodeId)) {
|
||||
this.$toast.error(this.$strings.ToastGetPodcastEpisodeFailed)
|
||||
console.error('Episode not found in library item', session.episodeId, libraryItem.media.episodes)
|
||||
this.$toast.error(this.$strings.ToastFailedToLoadData)
|
||||
this.processingGoToTimestamp = false
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue