diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/AbpDynamicLayoutComponentOptions.cs b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/AbpDynamicLayoutComponentOptions.cs new file mode 100644 index 0000000000..5bba550eff --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/AbpDynamicLayoutComponentOptions.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using JetBrains.Annotations; + +namespace Volo.Abp.AspNetCore.Components.Web.Theming; + +public class AbpDynamicLayoutComponentOptions +{ + /// + /// Used to define components that renders in the layout + /// + [NotNull] + public Dictionary?> Components { get; set; } + + public AbpDynamicLayoutComponentOptions() + { + Components = new Dictionary?>(); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Components/DynamicLayoutComponent.razor b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Components/DynamicLayoutComponent.razor new file mode 100644 index 0000000000..8354c02889 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Components/DynamicLayoutComponent.razor @@ -0,0 +1,7 @@ +@if (AbpDynamicLayoutComponentOptions.Value.Components.Any()) +{ + foreach (var (componentType, parameters) in AbpDynamicLayoutComponentOptions.Value.Components) + { + + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Components/DynamicLayoutComponent.razor.cs b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Components/DynamicLayoutComponent.razor.cs new file mode 100644 index 0000000000..3c4d68178e --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Components/DynamicLayoutComponent.razor.cs @@ -0,0 +1,10 @@ +using Microsoft.AspNetCore.Components; +using Microsoft.Extensions.Options; + +namespace Volo.Abp.AspNetCore.Components.Web.Theming.Components; + +public partial class DynamicLayoutComponent : ComponentBase +{ + [Inject] + protected IOptions AbpDynamicLayoutComponentOptions { get; set; } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs index 314372ddc3..492e938874 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs @@ -229,7 +229,7 @@ public class BundlingService : IBundlingService, ITransientDependency { var bundleContributors = module.Assembly .GetTypes() - .Where(t => t.IsAssignableTo()) + .Where(t => !t.IsAbstract && !t.IsInterface && t.IsAssignableTo()) .ToList(); if (bundleContributors.Count > 1) diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/MainLayout.razor b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/MainLayout.razor index 82c7cc0fc7..01500c8801 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/MainLayout.razor +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/MainLayout.razor @@ -1,4 +1,5 @@ -@inherits LayoutComponentBase +@using Volo.Abp.AspNetCore.Components.Web.Theming.Components; +@inherits LayoutComponentBase