From cc222a6f4a252e72a81a37548095efb0f5cecef4 Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 25 Feb 2024 08:52:55 +0800 Subject: [PATCH] Revert "removed AddModuleMessage from OnParametersSetAsync methods to mitigate risk of infinite loops" This reverts commit 92719d095a700675f2b869450ec299f457321452. --- Oqtane.Client/Modules/Admin/Files/Index.razor | 1 + Oqtane.Client/Modules/Admin/Logs/Index.razor | 1 + Oqtane.Client/Modules/Admin/ModuleDefinitions/Index.razor | 1 + Oqtane.Client/Modules/Admin/Themes/Index.razor | 1 + Oqtane.Client/Modules/HtmlText/Index.razor | 1 + 5 files changed, 5 insertions(+) diff --git a/Oqtane.Client/Modules/Admin/Files/Index.razor b/Oqtane.Client/Modules/Admin/Files/Index.razor index 47063d3fb..504a888f3 100644 --- a/Oqtane.Client/Modules/Admin/Files/Index.razor +++ b/Oqtane.Client/Modules/Admin/Files/Index.razor @@ -75,6 +75,7 @@ catch (Exception ex) { await logger.LogError(ex, "Error Loading Files {Error}", ex.Message); + AddModuleMessage(Localizer["Error.File.Load"], MessageType.Error); } } diff --git a/Oqtane.Client/Modules/Admin/Logs/Index.razor b/Oqtane.Client/Modules/Admin/Logs/Index.razor index 5cc5c590b..cf2f7cbc5 100644 --- a/Oqtane.Client/Modules/Admin/Logs/Index.razor +++ b/Oqtane.Client/Modules/Admin/Logs/Index.razor @@ -131,6 +131,7 @@ else catch (Exception ex) { await logger.LogError(ex, "Error Loading Logs {Error}", ex.Message); + AddModuleMessage(Localizer["Error.Log.Load"], MessageType.Error); } } diff --git a/Oqtane.Client/Modules/Admin/ModuleDefinitions/Index.razor b/Oqtane.Client/Modules/Admin/ModuleDefinitions/Index.razor index 30211df94..2d3b80a76 100644 --- a/Oqtane.Client/Modules/Admin/ModuleDefinitions/Index.razor +++ b/Oqtane.Client/Modules/Admin/ModuleDefinitions/Index.razor @@ -120,6 +120,7 @@ else if (_moduleDefinitions == null) { await logger.LogError(ex, "Error Loading Modules {Error}", ex.Message); + AddModuleMessage(Localizer["Error.Module.Load"], MessageType.Error); } } } diff --git a/Oqtane.Client/Modules/Admin/Themes/Index.razor b/Oqtane.Client/Modules/Admin/Themes/Index.razor index c9f09acc4..3a7d64ae0 100644 --- a/Oqtane.Client/Modules/Admin/Themes/Index.razor +++ b/Oqtane.Client/Modules/Admin/Themes/Index.razor @@ -86,6 +86,7 @@ else if (_themes == null) { await logger.LogError(ex, "Error Loading Themes {Error}", ex.Message); + AddModuleMessage(Localizer["Error.Theme.Load"], MessageType.Error); } } } diff --git a/Oqtane.Client/Modules/HtmlText/Index.razor b/Oqtane.Client/Modules/HtmlText/Index.razor index f52aaf854..9e8db9616 100644 --- a/Oqtane.Client/Modules/HtmlText/Index.razor +++ b/Oqtane.Client/Modules/HtmlText/Index.razor @@ -36,6 +36,7 @@ catch (Exception ex) { await logger.LogError(ex, "Error Loading Content {Error}", ex.Message); + AddModuleMessage(Localizer["Error.Content.Load"], MessageType.Error); } } } \ No newline at end of file