From c1288535e81d9ee53e9d3a365d7c55eed4cf47f9 Mon Sep 17 00:00:00 2001 From: Mahmut Gundogdu Date: Tue, 15 Aug 2023 11:57:48 +0300 Subject: [PATCH 1/4] if user does not defined skiped error, error handler should work --- .../packages/theme-shared/src/lib/handlers/error.handler.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts b/npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts index 3ae0c25d3c..1197940ca8 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts @@ -89,9 +89,10 @@ export class ErrorHandler { protected filterRestErrors = ({ status }: HttpErrorResponse): boolean => { if (typeof status !== 'number') return false; - + if(!this.httpErrorConfig.skipHandledErrorCodes){ + return true; + } return ( - !!this.httpErrorConfig.skipHandledErrorCodes && this.httpErrorConfig.skipHandledErrorCodes.findIndex(code => code === status) < 0 ); }; From 2950dbbee21c326c7e73952fc1e7e7cbbd1621a0 Mon Sep 17 00:00:00 2001 From: Engincan VESKE Date: Mon, 21 Aug 2023 17:29:40 +0300 Subject: [PATCH 2/4] Add Volo.Abp.Maui.Client to common.ps1 --- nupkg/common.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/nupkg/common.ps1 b/nupkg/common.ps1 index 1756c8002e..96d61dc74d 100644 --- a/nupkg/common.ps1 +++ b/nupkg/common.ps1 @@ -212,6 +212,7 @@ $projects = ( "framework/src/Volo.Abp.Ldap", "framework/src/Volo.Abp.Localization.Abstractions", "framework/src/Volo.Abp.MailKit", + "framework/src/Volo.Abp.Maui.Client", "framework/src/Volo.Abp.Localization", "framework/src/Volo.Abp.MemoryDb", "framework/src/Volo.Abp.MongoDB", From fdc6c4e0e8f8b79be5c08fa79829790d982ab0a2 Mon Sep 17 00:00:00 2001 From: Engincan VESKE <43685404+EngincanV@users.noreply.github.com> Date: Mon, 21 Aug 2023 17:42:39 +0300 Subject: [PATCH 3/4] Fix layout hooks filtering and show layout hooks for the specified layouts --- .../Components/LayoutHooks/LayoutHook.razor.cs | 2 +- .../Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Components/LayoutHooks/LayoutHook.razor.cs b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Components/LayoutHooks/LayoutHook.razor.cs index f5ce191f20..f51223dcd5 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Components/LayoutHooks/LayoutHook.razor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Components/LayoutHooks/LayoutHook.razor.cs @@ -26,7 +26,7 @@ public partial class LayoutHook : ComponentBase { layoutHooks = layoutHooks .Where(IsComponentBase) - .WhereIf(string.IsNullOrWhiteSpace(Layout), x => x.Layout == Layout) + .WhereIf(!string.IsNullOrWhiteSpace(Layout), x => x.Layout == Layout) .ToList(); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs index 082ca59ee0..562f3151e9 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs @@ -18,8 +18,10 @@ public class LayoutHookViewComponent : AbpViewComponent public virtual IViewComponentResult Invoke(string name, string layout) { - var hooks = Options.Hooks.GetOrDefault(name)?.Where(x => x.Layout == layout && IsViewComponent(x)).ToArray() - ?? Array.Empty(); + var hooks = Options.Hooks.GetOrDefault(name)? + .Where(IsViewComponent) + .WhereIf(!string.IsNullOrWhiteSpace(layout), x => x.Layout == layout) + .ToArray() ?? Array.Empty(); return View( "~/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/Default.cshtml", From f926804dbe4e05ba2aa7be1ba67ccdc1dc97019e Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 22 Aug 2023 09:09:09 +0800 Subject: [PATCH 4/4] Make `layout` nullable. --- .../Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs | 2 +- .../LayoutHook/ViewComponentHelperLayoutHookExtensions.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs index 562f3151e9..b4ea393fe7 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs @@ -16,7 +16,7 @@ public class LayoutHookViewComponent : AbpViewComponent Options = options.Value; } - public virtual IViewComponentResult Invoke(string name, string layout) + public virtual IViewComponentResult Invoke(string name, string? layout) { var hooks = Options.Hooks.GetOrDefault(name)? .Where(IsViewComponent) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/ViewComponentHelperLayoutHookExtensions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/ViewComponentHelperLayoutHookExtensions.cs index 516c1234a0..d5c42a42cd 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/ViewComponentHelperLayoutHookExtensions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/ViewComponentHelperLayoutHookExtensions.cs @@ -9,7 +9,7 @@ public static class ViewComponentHelperLayoutHookExtensions public static Task InvokeLayoutHookAsync( this IViewComponentHelper componentHelper, string name, - string layout) + string? layout = null) { return componentHelper.InvokeAsync( typeof(LayoutHookViewComponent),