From a6652ffe9a43b223e8f5429f6b75cf61f2e2367b Mon Sep 17 00:00:00 2001 From: Arnei Date: Thu, 20 Aug 2026 16:13:42 +0200 Subject: [PATCH] Notify user if series theme could not be saved If a user was trying to change the theme of a series, and the backend would report an error, the user would not be notified of this. The only chance the user had to notice that something went wrong is because it looked like nothing had happened. This adds a notification to properly inform the user that their change was not saved. --- .../adminui/languages/lang-en_US.json | 1 + src/slices/seriesDetailsSlice.ts | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/i18n/org/opencastproject/adminui/languages/lang-en_US.json b/src/i18n/org/opencastproject/adminui/languages/lang-en_US.json index 200b3c6d1a..1c4380470f 100644 --- a/src/i18n/org/opencastproject/adminui/languages/lang-en_US.json +++ b/src/i18n/org/opencastproject/adminui/languages/lang-en_US.json @@ -217,6 +217,7 @@ "MISSING_ACL_RULES": "At least one role with Read and Write permissions is required!", "SAVED_ACL_RULES": "The access rules have been saved.", "SERIES_THEME_REPROCESS_EXISTING_EVENTS": "The existing events in this series will need to be reprocessed", + "SERIES_THEME_NOT_SAVED": "The theme could not be saved", "SERIES_ACL_LOCKED": "Editing Access Policies is not allowed when operations are running on an event that is part of the series", "EVENT_ACL_MISSING_READWRITE_ROLE": "The Access Policy requires at least one role with Read and Write permissions.", "METADATA_SAVED": "The metadata has been saved.", diff --git a/src/slices/seriesDetailsSlice.ts b/src/slices/seriesDetailsSlice.ts index 47415588cd..99544e1307 100644 --- a/src/slices/seriesDetailsSlice.ts +++ b/src/slices/seriesDetailsSlice.ts @@ -335,6 +335,14 @@ export const updateSeriesTheme = (params: { }) .catch(response => { console.error(response); + dispatch( + addNotification({ + type: "error", + key: "SERIES_THEME_NOT_SAVED", + duration: -1, + context: NOTIFICATION_CONTEXT, + }), + ); }); } else { const data = new URLSearchParams(); @@ -359,6 +367,14 @@ export const updateSeriesTheme = (params: { }) .catch(response => { console.error(response); + dispatch( + addNotification({ + type: "error", + key: "SERIES_THEME_NOT_SAVED", + duration: -1, + context: NOTIFICATION_CONTEXT, + }), + ); }); } };