Browse Source
Merge pull request #17435 from abpframework/auto-merge/rel-7-4/2136
Merge branch dev with rel-7.4
pull/17442/head
maliming
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
11 additions and
7 deletions
-
framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Components/LayoutHooks/LayoutHook.razor.cs
-
framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs
-
framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/ViewComponentHelperLayoutHookExtensions.cs
-
npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts
-
nupkg/common.ps1
|
|
|
@ -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(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -16,10 +16,12 @@ 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(x => x.Layout == layout && IsViewComponent(x)).ToArray() |
|
|
|
?? Array.Empty<LayoutHookInfo>(); |
|
|
|
var hooks = Options.Hooks.GetOrDefault(name)? |
|
|
|
.Where(IsViewComponent) |
|
|
|
.WhereIf(!string.IsNullOrWhiteSpace(layout), x => x.Layout == layout) |
|
|
|
.ToArray() ?? Array.Empty<LayoutHookInfo>(); |
|
|
|
|
|
|
|
return View( |
|
|
|
"~/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/Default.cshtml", |
|
|
|
|
|
|
|
@ -9,7 +9,7 @@ public static class ViewComponentHelperLayoutHookExtensions |
|
|
|
public static Task<IHtmlContent> InvokeLayoutHookAsync( |
|
|
|
this IViewComponentHelper componentHelper, |
|
|
|
string name, |
|
|
|
string layout) |
|
|
|
string? layout = null) |
|
|
|
{ |
|
|
|
return componentHelper.InvokeAsync( |
|
|
|
typeof(LayoutHookViewComponent), |
|
|
|
|
|
|
|
@ -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 |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
@ -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", |
|
|
|
|