diff --git a/src/Corsinvest.AppHero.AppBss/Pages/_Index.cshtml b/src/Corsinvest.AppHero.AppBss/Pages/_Host.cshtml similarity index 100% rename from src/Corsinvest.AppHero.AppBss/Pages/_Index.cshtml rename to src/Corsinvest.AppHero.AppBss/Pages/_Host.cshtml diff --git a/src/Corsinvest.AppHero.AppBss/Program.cs b/src/Corsinvest.AppHero.AppBss/Program.cs index c20dbe6..5ca4665 100644 --- a/src/Corsinvest.AppHero.AppBss/Program.cs +++ b/src/Corsinvest.AppHero.AppBss/Program.cs @@ -100,7 +100,7 @@ options.Transports = HttpTransportType.WebSockets | HttpTransportType.LongPolling; }); -app.MapFallbackToPage("/_Index"); +app.MapFallbackToPage("/_Host"); await app.OnPostApplicationInitializationAsync(); diff --git a/src/Corsinvest.AppHero.Auditing/Module.cs b/src/Corsinvest.AppHero.Auditing/Module.cs index bf75600..f42a480 100644 --- a/src/Corsinvest.AppHero.Auditing/Module.cs +++ b/src/Corsinvest.AppHero.Auditing/Module.cs @@ -24,7 +24,7 @@ public Module() Description = "Auditing"; Slug = "Auditing"; - Link = new ModuleLink(this, Description) + Link = new(this, Description) { Icon = UIIcon.PersonSearch.GetName(), }; diff --git a/src/Corsinvest.AppHero.Authentication/OptionsBase.cs b/src/Corsinvest.AppHero.Authentication/OptionsBase.cs index fd132ac..2a18c79 100644 --- a/src/Corsinvest.AppHero.Authentication/OptionsBase.cs +++ b/src/Corsinvest.AppHero.Authentication/OptionsBase.cs @@ -5,7 +5,6 @@ using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication.OAuth.Claims; using System.ComponentModel.DataAnnotations; -using System.Xml.Linq; namespace Corsinvest.AppHero.Authentication; diff --git a/src/Corsinvest.AppHero.Core.FluentUI/Corsinvest.AppHero.Core.FluentUI.csproj b/src/Corsinvest.AppHero.Core.FluentUI/Corsinvest.AppHero.Core.FluentUI.csproj index 1c198e7..03dfda1 100644 --- a/src/Corsinvest.AppHero.Core.FluentUI/Corsinvest.AppHero.Core.FluentUI.csproj +++ b/src/Corsinvest.AppHero.Core.FluentUI/Corsinvest.AppHero.Core.FluentUI.csproj @@ -7,7 +7,7 @@ - + diff --git a/src/Corsinvest.AppHero.Core.MudBlazorUI/Corsinvest.AppHero.Core.MudBlazorUI.csproj b/src/Corsinvest.AppHero.Core.MudBlazorUI/Corsinvest.AppHero.Core.MudBlazorUI.csproj index a82c8e1..1f4a682 100644 --- a/src/Corsinvest.AppHero.Core.MudBlazorUI/Corsinvest.AppHero.Core.MudBlazorUI.csproj +++ b/src/Corsinvest.AppHero.Core.MudBlazorUI/Corsinvest.AppHero.Core.MudBlazorUI.csproj @@ -7,12 +7,12 @@ - + - + diff --git a/src/Corsinvest.AppHero.Core.MudBlazorUI/Extensions/ModularityExtensions.cs b/src/Corsinvest.AppHero.Core.MudBlazorUI/Extensions/ModularityExtensions.cs index 8351d66..c4948cd 100644 --- a/src/Corsinvest.AppHero.Core.MudBlazorUI/Extensions/ModularityExtensions.cs +++ b/src/Corsinvest.AppHero.Core.MudBlazorUI/Extensions/ModularityExtensions.cs @@ -8,7 +8,7 @@ namespace Corsinvest.AppHero.Core.MudBlazorUI.Extensions; public static class ModularityExtensions { - public static string ToMBIcon(this IModularityService modularityService, string category) + public static string ToMBIcon(this IModularityService modularityService, string category) => MudBlazorHelper.ToMBIcon(modularityService.GetCategoryIcon(category)); public static string ToMBIcon(this IGroupableService groupableService) => MudBlazorHelper.ToMBIcon(groupableService.GetGroupIcon()); diff --git a/src/Corsinvest.AppHero.Core.MudBlazorUI/Extensions/MudBlazorHelper.cs b/src/Corsinvest.AppHero.Core.MudBlazorUI/Extensions/MudBlazorHelper.cs index 427a36e..a9f8353 100644 --- a/src/Corsinvest.AppHero.Core.MudBlazorUI/Extensions/MudBlazorHelper.cs +++ b/src/Corsinvest.AppHero.Core.MudBlazorUI/Extensions/MudBlazorHelper.cs @@ -68,10 +68,7 @@ public static void InitializeIcons() _ => string.Empty, }; - if (!string.IsNullOrEmpty(value)) - { - IconConvert.Add($"{nameof(UIIcon)}.{item}", value); - } + if (!string.IsNullOrEmpty(value)) { IconConvert.Add($"{nameof(UIIcon)}.{item}", value); } } } } diff --git a/src/Corsinvest.AppHero.Core.MudBlazorUI/Helpers/MudExObjectEditFormHelper.cs b/src/Corsinvest.AppHero.Core.MudBlazorUI/Helpers/MudExObjectEditFormHelper.cs index 40cf34f..2cb0775 100644 --- a/src/Corsinvest.AppHero.Core.MudBlazorUI/Helpers/MudExObjectEditFormHelper.cs +++ b/src/Corsinvest.AppHero.Core.MudBlazorUI/Helpers/MudExObjectEditFormHelper.cs @@ -3,6 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ using Humanizer; +using Microsoft.AspNetCore.Components.Rendering; using MudBlazor.Extensions; using MudBlazor.Extensions.Components.ObjectEdit; using MudBlazor.Extensions.Components.ObjectEdit.Options; @@ -16,6 +17,15 @@ namespace Corsinvest.AppHero.Core.MudBlazorUI.Helpers; public static class MudExObjectEditFormHelper { + class CustomRenderer : ICustomRenderer + { + public void Render(RenderTreeBuilder builder, IHandleEvent eventTarget, ObjectEditPropertyMeta propertyMeta) + { + // FixPropertyItem(propertyMeta); + } + } + + public static void FixPropertyItem(ObjectEditPropertyMeta item) { if (!string.IsNullOrEmpty(item.GroupInfo.Name)) { item.GroupInfo.Name = item.GroupInfo.Name.Humanize(LetterCasing.Title); } @@ -51,6 +61,13 @@ public static void FixPropertyItem(ObjectEditPropertyMeta item) DisablePositionMargin = true }); + //item.Value + //RenderDataDefaults.RegisterDefault, MudExCollectionEditor>(f => f.Items); + + // item.RenderWith(new CustomRenderer()); + + //item.RenderData + //var cc = //foreach (var item1 in item.MainEditMeta.Properties()) //{ // FixPropertyItem(item1, stringLocalizer); diff --git a/src/Corsinvest.AppHero.Core.MudBlazorUI/Module.cs b/src/Corsinvest.AppHero.Core.MudBlazorUI/Module.cs index deb532b..26bd509 100644 --- a/src/Corsinvest.AppHero.Core.MudBlazorUI/Module.cs +++ b/src/Corsinvest.AppHero.Core.MudBlazorUI/Module.cs @@ -49,10 +49,10 @@ public override async Task OnApplicationInitializationAsync(IHost host) { await Task.CompletedTask; var modularityService = host.Services.GetRequiredService(); - modularityService.SetRenderIndex(); - modularityService.SetRenderIndex(); + modularityService.SetRenderIndex(); + modularityService.SetRenderIndex(); //modularityService.SetRenderOptions(); - modularityService.SetRenderIndex(); + modularityService.SetRenderIndex(); //security modularityService.SetRenderOptions(); diff --git a/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/MainLayout.razor b/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/MainLayout.razor index 776dfbe..971d09f 100644 --- a/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/MainLayout.razor +++ b/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/MainLayout.razor @@ -70,28 +70,20 @@ - - - @AppOptions.Author - - - @if (ReleaseInfo == null) - { + + + + + @AppOptions.Author + + @L["version"] @ApplicationHelper.ProductVersion - } - else - { - - - @L["version"] @ApplicationHelper.ProductVersion - - - } - + + diff --git a/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/NavMenu.razor b/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/NavMenu.razor index 46676ec..35c40cf 100644 --- a/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/NavMenu.razor +++ b/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/NavMenu.razor @@ -40,7 +40,7 @@ Icon="@link.ToMBIcon()" IconColor="@link.IconColor.ToMBColor()" Match="NavLinkMatch.All" - Target="@(link.IsExternal ? "_blank" : null)" + Target="@(link.IsExternal ? "_blank" : null)" Disabled="@(!link.Enabled)"> @link.Text diff --git a/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/Options/AHDialogEditOptions.razor.cs b/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/Options/AHDialogEditOptions.razor.cs index 0bcc9f1..ee60755 100644 --- a/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/Options/AHDialogEditOptions.razor.cs +++ b/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/Options/AHDialogEditOptions.razor.cs @@ -24,7 +24,7 @@ private async Task SubmitAsync() InSaving = false; - Logger.LogInformation(L["Save options {Module}", Module.FullInfo]); + Logger.LogInformation(L["Save options {0}", Module.FullInfo]); MudDialog.Close(DialogResult.Ok(true)); //force refresh //NavigationManager.NavigateTo(NavigationManager.Uri, true); diff --git a/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/Options/GenericRenderOptions.razor b/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/Options/GenericRenderOptions.razor index 8bc660d..fe02e78 100644 --- a/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/Options/GenericRenderOptions.razor +++ b/src/Corsinvest.AppHero.Core.MudBlazorUI/Shared/Options/GenericRenderOptions.razor @@ -16,11 +16,11 @@ ShowCancelButton="false" ShowSaveButton="false" Localizer="L" - AutoHideDisabledFields + AutoHideDisabledFields="true" GroupingStyle="GroupingStyle.DefaultExpansionPanel" GroupElevation="1" DefaultGroupName="@DefaultGroupName" - AutoSkeletonOnLoad + AutoSkeletonOnLoad="true" AddScrollToTop="false" - ConfigureMetaInformationAlways + ConfigureMetaInformationAlways="true" MetaConfiguration="@Configure" /> \ No newline at end of file diff --git a/src/Corsinvest.AppHero.Core.MudBlazorUI/Style/LayoutService.cs b/src/Corsinvest.AppHero.Core.MudBlazorUI/Style/LayoutService.cs index 16996eb..198f559 100644 --- a/src/Corsinvest.AppHero.Core.MudBlazorUI/Style/LayoutService.cs +++ b/src/Corsinvest.AppHero.Core.MudBlazorUI/Style/LayoutService.cs @@ -2,7 +2,6 @@ * SPDX-FileCopyrightText: Copyright Corsinvest Srl * SPDX-License-Identifier: AGPL-3.0-only */ - namespace Corsinvest.AppHero.Core.MudBlazorUI.Style; public class LayoutService diff --git a/src/Corsinvest.AppHero.Core.RazdenUI/Corsinvest.AppHero.Core.RazdenUI.csproj b/src/Corsinvest.AppHero.Core.RazdenUI/Corsinvest.AppHero.Core.RazdenUI.csproj index ba48640..daca760 100644 --- a/src/Corsinvest.AppHero.Core.RazdenUI/Corsinvest.AppHero.Core.RazdenUI.csproj +++ b/src/Corsinvest.AppHero.Core.RazdenUI/Corsinvest.AppHero.Core.RazdenUI.csproj @@ -7,7 +7,7 @@ - + diff --git a/src/Corsinvest.AppHero.Core/Helpers/ApplicationHelper.cs b/src/Corsinvest.AppHero.Core/Helpers/ApplicationHelper.cs index fb9a82e..ad7656d 100644 --- a/src/Corsinvest.AppHero.Core/Helpers/ApplicationHelper.cs +++ b/src/Corsinvest.AppHero.Core/Helpers/ApplicationHelper.cs @@ -2,7 +2,6 @@ * SPDX-FileCopyrightText: Copyright Corsinvest Srl * SPDX-License-Identifier: AGPL-3.0-only */ -using Microsoft.AspNetCore.Components; using System.Reflection; using System.Security.Cryptography; using System.Text; diff --git a/src/Corsinvest.AppHero.Core/Modularity/ModuleBase.cs b/src/Corsinvest.AppHero.Core/Modularity/ModuleBase.cs index 1224732..472f460 100644 --- a/src/Corsinvest.AppHero.Core/Modularity/ModuleBase.cs +++ b/src/Corsinvest.AppHero.Core/Modularity/ModuleBase.cs @@ -110,7 +110,6 @@ public virtual void ConfigureServices(IServiceCollection services, IConfiguratio //public virtual async Task ShutdownAsync() => await Task.CompletedTask; public virtual async Task RefreshOptionsAsync(IServiceScope scope) => await Task.CompletedTask; - protected IServiceCollection AddOptions(IServiceCollection services, IConfiguration config, string? section = null) where TType : class, new() { Options = new() diff --git a/src/Corsinvest.AppHero.Core/Modularity/ModuleCategory.cs b/src/Corsinvest.AppHero.Core/Modularity/ModuleCategory.cs index 53adf3e..f7e7a5f 100644 --- a/src/Corsinvest.AppHero.Core/Modularity/ModuleCategory.cs +++ b/src/Corsinvest.AppHero.Core/Modularity/ModuleCategory.cs @@ -2,7 +2,6 @@ * SPDX-FileCopyrightText: Copyright Corsinvest Srl * SPDX-License-Identifier: AGPL-3.0-only */ - namespace Corsinvest.AppHero.Core.Modularity; public class ModuleCategory diff --git a/src/Corsinvest.AppHero.Core/Notification/WebHook/BodyType.cs b/src/Corsinvest.AppHero.Core/Notification/WebHook/BodyType.cs index 865bdef..8d19ad8 100644 --- a/src/Corsinvest.AppHero.Core/Notification/WebHook/BodyType.cs +++ b/src/Corsinvest.AppHero.Core/Notification/WebHook/BodyType.cs @@ -2,7 +2,6 @@ * SPDX-FileCopyrightText: Copyright Corsinvest Srl * SPDX-License-Identifier: AGPL-3.0-only */ - namespace Corsinvest.AppHero.Core.Notification.WebHook; public enum BodyType diff --git a/src/Corsinvest.AppHero.Core/Security/Auth/AccessTokenProvider.cs b/src/Corsinvest.AppHero.Core/Security/Auth/AccessTokenProvider.cs index 66a6d3c..6d98987 100644 --- a/src/Corsinvest.AppHero.Core/Security/Auth/AccessTokenProvider.cs +++ b/src/Corsinvest.AppHero.Core/Security/Auth/AccessTokenProvider.cs @@ -1,4 +1,8 @@ -using Corsinvest.AppHero.Core.Security.Identity; +/* + * SPDX-FileCopyrightText: Copyright Corsinvest Srl + * SPDX-License-Identifier: AGPL-3.0-only + */ +using Corsinvest.AppHero.Core.Security.Identity; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage; using System.Security.Claims; @@ -6,7 +10,7 @@ namespace Corsinvest.AppHero.Core.Security.Auth; -public class AccessTokenProvider +public class AccessTokenProvider { private readonly string _tokenKey = nameof(_tokenKey); private readonly ProtectedLocalStorage _localStorage; diff --git a/src/Corsinvest.AppHero.Core/Security/Auth/AuthenticationService.cs b/src/Corsinvest.AppHero.Core/Security/Auth/AuthenticationService.cs index e4c0152..ee6bc3e 100644 --- a/src/Corsinvest.AppHero.Core/Security/Auth/AuthenticationService.cs +++ b/src/Corsinvest.AppHero.Core/Security/Auth/AuthenticationService.cs @@ -48,6 +48,7 @@ public override async Task GetAuthenticationStateAsync() public async Task LoginAsync(LoginRequest loginRequest) { var userManager = _serviceProvider.GetRequiredService>(); + var user = await userManager.FindByNameAsync(loginRequest.Username); var valid = user != null && user.IsActive @@ -85,7 +86,7 @@ public async Task LogoutAsync() } else { - _navigationManager.NavigateTo("/logout" ,true); + _navigationManager.NavigateTo("/logout", true); } //NotifyAuthenticationStateChanged(Task.FromResult(new AuthenticationState(_httpContextAccessor.HttpContext!.User))); } diff --git a/src/Corsinvest.AppHero.Core/SoftwareUpdater/UpdaterOptions.cs b/src/Corsinvest.AppHero.Core/SoftwareUpdater/UpdaterOptions.cs index f67ec9d..1e658dc 100644 --- a/src/Corsinvest.AppHero.Core/SoftwareUpdater/UpdaterOptions.cs +++ b/src/Corsinvest.AppHero.Core/SoftwareUpdater/UpdaterOptions.cs @@ -2,7 +2,6 @@ * SPDX-FileCopyrightText: Copyright Corsinvest Srl * SPDX-License-Identifier: AGPL-3.0-only */ - namespace Corsinvest.AppHero.Core.SoftwareUpdater; public class UpdaterOptions diff --git a/src/common.props b/src/common.props index 5c817b0..d0bf133 100644 --- a/src/common.props +++ b/src/common.props @@ -5,7 +5,7 @@ enable latest - 0.0.108 + 0.0.110 $(NoWarn);CS1591