From f99e01984d94030af8571e832f6ec67c1e226f76 Mon Sep 17 00:00:00 2001 From: Nicholas Wallace Date: Fri, 30 Aug 2024 10:19:04 -0700 Subject: [PATCH] Change: chapters remove toast --- client/pages/audiobook/_id/chapters.vue | 2 +- client/pages/config/sessions.vue | 4 ++-- client/strings/en-us.json | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/pages/audiobook/_id/chapters.vue b/client/pages/audiobook/_id/chapters.vue index d829b46bc..5449af094 100644 --- a/client/pages/audiobook/_id/chapters.vue +++ b/client/pages/audiobook/_id/chapters.vue @@ -611,7 +611,7 @@ export default { .$post(`/api/items/${this.libraryItem.id}/chapters`, payload) .then((data) => { if (data.updated) { - this.$toast.success('Chapters removed') + this.$toast.success(this.$strings.ToastChaptersRemoved) if (this.previousRoute) { this.$router.push(this.previousRoute) } else { diff --git a/client/pages/config/sessions.vue b/client/pages/config/sessions.vue index edb14cd23..e0b512c63 100644 --- a/client/pages/config/sessions.vue +++ b/client/pages/config/sessions.vue @@ -290,7 +290,7 @@ export default { this.$axios .$post(`/api/sessions/batch/delete`, payload) .then(() => { - this.$toast.success('Sessions removed') + 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) { @@ -303,7 +303,7 @@ export default { } }) .catch((error) => { - const errorMsg = error.response?.data || 'Failed to remove sessions' + const errorMsg = error.response?.data || this.$strings.ToastRemoveFailed this.$toast.error(errorMsg) }) .finally(() => { diff --git a/client/strings/en-us.json b/client/strings/en-us.json index b2dffde57..cd8037d69 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -834,6 +834,7 @@ "ToastCachePurgeSuccess": "Cache purged successfully", "ToastChaptersHaveErrors": "Chapters have errors", "ToastChaptersMustHaveTitles": "Chapters must have titles", + "ToastChaptersRemoved": "Chapters removed", "ToastCollectionItemsAddFailed": "Item(s) added to collection failed", "ToastCollectionItemsAddSuccess": "Item(s) added to collection success", "ToastCollectionItemsRemoveSuccess": "Item(s) removed from collection", @@ -924,6 +925,7 @@ "ToastServerSettingsUpdateSuccess": "Server settings updated", "ToastSessionDeleteFailed": "Failed to delete session", "ToastSessionDeleteSuccess": "Session deleted", + "ToastSessionsRemoved": "Sessions removed", "ToastSlugMustChange": "Slug contains invalid characters", "ToastSlugRequired": "Slug is required", "ToastSocketConnected": "Socket connected",