From 90ed767d7543bc6bf9db2e2d858e9d263661e66e Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Mon, 6 Mar 2023 06:26:01 +0100 Subject: [PATCH 1/3] Fix Clearing modules from the Recycle Bin Modules and all related records now correctly deleted from the database. --- Oqtane.Client/Modules/Admin/RecycleBin/Index.razor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor b/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor index 51752e84..8e40eea0 100644 --- a/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor +++ b/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor @@ -185,7 +185,7 @@ else await PageModuleService.DeletePageModuleAsync(module.PageModuleId); // check if there are any remaining module instances in the site - if (!_modules.Exists(item => item.ModuleId == module.ModuleId)) + if (_modules.Exists(item => item.ModuleId == module.ModuleId)) { await ModuleService.DeleteModuleAsync(module.ModuleId); } @@ -211,7 +211,7 @@ else await PageModuleService.DeletePageModuleAsync(module.PageModuleId); // check if there are any remaining module instances in the site - if (!_modules.Exists(item => item.ModuleId == module.ModuleId)) + if (_modules.Exists(item => item.ModuleId == module.ModuleId)) { await ModuleService.DeleteModuleAsync(module.ModuleId); } From 3378f0e4ee067de08d42484435730953a3c4bf82 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Thu, 9 Mar 2023 11:47:19 +0100 Subject: [PATCH 2/3] Procedures now checks on PageModuleId --- Oqtane.Client/Modules/Admin/RecycleBin/Index.razor | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor b/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor index 8e40eea0..0d5b7b77 100644 --- a/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor +++ b/Oqtane.Client/Modules/Admin/RecycleBin/Index.razor @@ -76,8 +76,8 @@ else } @code { - private List _pages; - private List _modules; + private List _pages; + private List _modules; public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin; @@ -140,7 +140,7 @@ else try { ModuleInstance.ShowProgressIndicator(); - foreach (Page page in _pages.Where(item => item.IsDeleted)) + foreach (Page page in _pages.Where(item => item.IsDeleted)) { await PageService.DeletePageAsync(page.PageId); await logger.LogInformation("Page Permanently Deleted {Page}", page); @@ -185,7 +185,7 @@ else await PageModuleService.DeletePageModuleAsync(module.PageModuleId); // check if there are any remaining module instances in the site - if (_modules.Exists(item => item.ModuleId == module.ModuleId)) + if (!_modules.Exists (item => item.ModuleId == module.ModuleId && item.PageModuleId != module.PageModuleId)) { await ModuleService.DeleteModuleAsync(module.ModuleId); } @@ -206,12 +206,14 @@ else try { ModuleInstance.ShowProgressIndicator(); - foreach (Module module in _modules.Where(item => item.IsDeleted)) + foreach (Module module in _modules.Where(item => item.IsDeleted).ToList()) { await PageModuleService.DeletePageModuleAsync(module.PageModuleId); + // DeletePageModuleAsync does not update _modules so remove it. + _modules.Remove(module); // check if there are any remaining module instances in the site - if (_modules.Exists(item => item.ModuleId == module.ModuleId)) + if (!_modules.Exists(item => item.ModuleId == module.ModuleId && item.PageModuleId != module.PageModuleId)) { await ModuleService.DeleteModuleAsync(module.ModuleId); } From 9c6174e3f2d74eb12a9d4471d1392ca09aa3905e Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Thu, 9 Mar 2023 09:46:58 -0500 Subject: [PATCH 3/3] rolling back CSS changes so that it remains consistent with the Oqtane theme --- .../Themes/Templates/External/Client/Themes/Theme1.razor | 2 +- .../Client/wwwroot/Themes/[Owner].[Theme]/Theme.css | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Client/Themes/Theme1.razor b/Oqtane.Server/wwwroot/Themes/Templates/External/Client/Themes/Theme1.razor index 91d8b4b4..d285c05d 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Client/Themes/Theme1.razor +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Client/Themes/Theme1.razor @@ -5,7 +5,7 @@
diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Client/wwwroot/Themes/[Owner].[Theme]/Theme.css b/Oqtane.Server/wwwroot/Themes/Templates/External/Client/wwwroot/Themes/[Owner].[Theme]/Theme.css index be87af9f..0d325604 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Client/wwwroot/Themes/[Owner].[Theme]/Theme.css +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Client/wwwroot/Themes/[Owner].[Theme]/Theme.css @@ -4,12 +4,6 @@ body { padding-top: 7rem; } -.div main { - color: black; - filter: invert(1); - mix-blend-mode: difference; -} - .table > :not(caption) > * > * { box-shadow: none; } @@ -82,7 +76,7 @@ body { } div.app-moduleactions a.dropdown-toggle, div.app-moduleactions div.dropdown-menu { - + color: #000000; } @media (max-width: 767px) {