From 36fd83c3fda55e159bcd6d37d78aa74ac7720379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 4 Mar 2021 16:20:22 +0300 Subject: [PATCH] Revisit project dependencies --- ...CoreComponentsUiBasicThemeServerModule.cs} | 7 ++- .../AbpFeatureManagementBlazorModule.cs | 4 +- .../Volo.Abp.FeatureManagement.Blazor.csproj | 2 +- .../_Imports.razor | 3 +- .../Abp/Identity/IdentityRoleAppService.cs | 5 ++ .../AbpIdentityBlazorModule.cs | 2 +- .../Volo.Abp.Identity.Blazor.csproj | 2 +- .../AbpPermissionManagementBlazorModule.cs | 4 +- ...olo.Abp.PermissionManagement.Blazor.csproj | 3 -- .../AbpTenantManagementBlazorModule.cs | 2 +- .../Volo.Abp.TenantManagement.Blazor.csproj | 1 - .../_Imports.razor | 1 - ...anyName.MyProjectName.Blazor.Server.csproj | 27 +++++++---- .../MyProjectNameBlazorServerModule.cs | 43 +++++++++-------- .../_Imports.razor | 1 - .../wwwroot/global-styles.css | 1 + .../wwwroot/main.css | 48 ------------------- .../appsettings.json | 2 +- 18 files changed, 61 insertions(+), 97 deletions(-) rename framework/src/Volo.Abp.AspNetCore.Components.UI.BasicTheme.Server/{AbpAspNetCoreComponentsServerBasicTheme.cs => AbpAspNetCoreComponentsUiBasicThemeServerModule.cs} (74%) create mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/wwwroot/global-styles.css delete mode 100644 templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/wwwroot/main.css diff --git a/framework/src/Volo.Abp.AspNetCore.Components.UI.BasicTheme.Server/AbpAspNetCoreComponentsServerBasicTheme.cs b/framework/src/Volo.Abp.AspNetCore.Components.UI.BasicTheme.Server/AbpAspNetCoreComponentsUiBasicThemeServerModule.cs similarity index 74% rename from framework/src/Volo.Abp.AspNetCore.Components.UI.BasicTheme.Server/AbpAspNetCoreComponentsServerBasicTheme.cs rename to framework/src/Volo.Abp.AspNetCore.Components.UI.BasicTheme.Server/AbpAspNetCoreComponentsUiBasicThemeServerModule.cs index 1072341339..fef91af1ca 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.UI.BasicTheme.Server/AbpAspNetCoreComponentsServerBasicTheme.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.UI.BasicTheme.Server/AbpAspNetCoreComponentsUiBasicThemeServerModule.cs @@ -4,13 +4,16 @@ using Volo.Abp.Modularity; namespace Volo.Abp.AspNetCore.Components.UI.BasicTheme.Server { - public class AbpAspNetCoreComponentsServerBasicTheme : AbpModule + [DependsOn( + typeof(AbpAspNetCoreComponentsUiBasicThemeModule) + )] + public class AbpAspNetCoreComponentsUiBasicThemeServerModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { Configure(options => { - options.AdditionalAssemblies.Add(typeof(AbpAspNetCoreComponentsServerBasicTheme).Assembly); + options.AdditionalAssemblies.Add(typeof(AbpAspNetCoreComponentsUiBasicThemeServerModule).Assembly); }); Configure(options => diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/AbpFeatureManagementBlazorModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/AbpFeatureManagementBlazorModule.cs index 497d7553da..3df1ff06f5 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/AbpFeatureManagementBlazorModule.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/AbpFeatureManagementBlazorModule.cs @@ -1,11 +1,11 @@ -using Volo.Abp.AspNetCore.Components.WebAssembly.Theming; +using Volo.Abp.AspNetCore.Components.UI.Theming; using Volo.Abp.AutoMapper; using Volo.Abp.Modularity; namespace Volo.Abp.FeatureManagement.Blazor { [DependsOn( - typeof(AbpAspNetCoreComponentsWebAssemblyThemingModule), + typeof(AbpAspNetCoreComponentsUiThemingModule), typeof(AbpAutoMapperModule), typeof(AbpFeatureManagementHttpApiClientModule) )] diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Volo.Abp.FeatureManagement.Blazor.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Volo.Abp.FeatureManagement.Blazor.csproj index a0cbf9b999..a3d79757f6 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Volo.Abp.FeatureManagement.Blazor.csproj +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Volo.Abp.FeatureManagement.Blazor.csproj @@ -8,7 +8,7 @@ - + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/_Imports.razor b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/_Imports.razor index b52766daad..08dd8158d6 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/_Imports.razor +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/_Imports.razor @@ -1,5 +1,4 @@ -@using Microsoft.AspNetCore.Components.Web -@using Volo.Abp.AspNetCore.Components.WebAssembly +@using Microsoft.AspNetCore.Components.Web @using Volo.Abp.BlazoriseUI @using Blazorise @using Blazorise.DataGrid \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityRoleAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityRoleAppService.cs index 070f55901e..c63a3e2490 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityRoleAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityRoleAppService.cs @@ -39,6 +39,11 @@ namespace Volo.Abp.Identity public virtual async Task> GetListAsync(GetIdentityRolesInput input) { + if (input.Sorting.IsNullOrWhiteSpace()) + { + input.Sorting = nameof(IdentityRole.Name); + } + var list = await RoleRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter); var totalCount = await RoleRepository.GetCountAsync(input.Filter); diff --git a/modules/identity/src/Volo.Abp.Identity.Blazor/AbpIdentityBlazorModule.cs b/modules/identity/src/Volo.Abp.Identity.Blazor/AbpIdentityBlazorModule.cs index b4de67835e..e973b91749 100644 --- a/modules/identity/src/Volo.Abp.Identity.Blazor/AbpIdentityBlazorModule.cs +++ b/modules/identity/src/Volo.Abp.Identity.Blazor/AbpIdentityBlazorModule.cs @@ -9,7 +9,7 @@ using Volo.Abp.UI.Navigation; namespace Volo.Abp.Identity.Blazor { [DependsOn( - typeof(AbpIdentityHttpApiClientModule), + typeof(AbpIdentityApplicationContractsModule), typeof(AbpAutoMapperModule), typeof(AbpPermissionManagementBlazorModule), typeof(AbpBlazoriseUIModule) diff --git a/modules/identity/src/Volo.Abp.Identity.Blazor/Volo.Abp.Identity.Blazor.csproj b/modules/identity/src/Volo.Abp.Identity.Blazor/Volo.Abp.Identity.Blazor.csproj index 6d4d7d148e..6b6eb9d4cb 100644 --- a/modules/identity/src/Volo.Abp.Identity.Blazor/Volo.Abp.Identity.Blazor.csproj +++ b/modules/identity/src/Volo.Abp.Identity.Blazor/Volo.Abp.Identity.Blazor.csproj @@ -13,7 +13,7 @@ - + diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/AbpPermissionManagementBlazorModule.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/AbpPermissionManagementBlazorModule.cs index e7202f0100..a91765ca94 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/AbpPermissionManagementBlazorModule.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/AbpPermissionManagementBlazorModule.cs @@ -1,11 +1,11 @@ -using Volo.Abp.AspNetCore.Components.UI.Theming.WebAssembly; +using Volo.Abp.AspNetCore.Components.UI.Theming; using Volo.Abp.AutoMapper; using Volo.Abp.Modularity; namespace Volo.Abp.PermissionManagement.Blazor { [DependsOn( - typeof( AbpAspNetCoreComponentsWebAssemblyThemingModule ), + typeof(AbpAspNetCoreComponentsUiThemingModule), typeof(AbpAutoMapperModule), typeof(AbpPermissionManagementHttpApiClientModule) )] diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Volo.Abp.PermissionManagement.Blazor.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Volo.Abp.PermissionManagement.Blazor.csproj index fc75bc55d2..9da8291dad 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Volo.Abp.PermissionManagement.Blazor.csproj +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Volo.Abp.PermissionManagement.Blazor.csproj @@ -8,10 +8,7 @@ - - - diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorModule.cs index c5a4970e79..9a6085bc76 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorModule.cs @@ -1,5 +1,5 @@ using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Routing; +using Volo.Abp.AspNetCore.Components.UI.Theming.Routing; using Volo.Abp.AutoMapper; using Volo.Abp.FeatureManagement.Blazor; using Volo.Abp.Modularity; diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Volo.Abp.TenantManagement.Blazor.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Volo.Abp.TenantManagement.Blazor.csproj index d7fe63ca1b..440f81de18 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Volo.Abp.TenantManagement.Blazor.csproj +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Volo.Abp.TenantManagement.Blazor.csproj @@ -9,7 +9,6 @@ - diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/_Imports.razor b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/_Imports.razor index 51955030c9..2d58420556 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/_Imports.razor +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/_Imports.razor @@ -1,5 +1,4 @@ @using Microsoft.AspNetCore.Components.Web -@using Volo.Abp.AspNetCore.Components.WebAssembly @using Microsoft.AspNetCore.Components.Forms @using Volo.Abp.BlazoriseUI @using Volo.Abp.BlazoriseUI.Components diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj index da43c69aa7..3a6d74d70e 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj @@ -7,30 +7,39 @@ + + - - - - - - + - + + - - + + + + + + + + + Always + + + Always + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameBlazorServerModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameBlazorServerModule.cs index fdb3c77c53..13c68e848b 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameBlazorServerModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameBlazorServerModule.cs @@ -16,7 +16,6 @@ using MyCompanyName.MyProjectName.MultiTenancy; using Volo.Abp; using Volo.Abp.Account.Web; using Volo.Abp.AspNetCore.Authentication.JwtBearer; -using Volo.Abp.AspNetCore.Components.UI.BasicTheme; using Volo.Abp.AspNetCore.Components.UI.BasicTheme.Server; using Volo.Abp.AspNetCore.Components.UI.Theming.Routing; using Volo.Abp.AspNetCore.Components.UI.Theming.Toolbars; @@ -29,12 +28,13 @@ using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; +using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.Autofac; using Volo.Abp.AutoMapper; -using Volo.Abp.BlazoriseUI; using Volo.Abp.Identity.Blazor; using Volo.Abp.Localization; using Volo.Abp.Modularity; +using Volo.Abp.Swashbuckle; using Volo.Abp.TenantManagement.Blazor; using Volo.Abp.UI; using Volo.Abp.UI.Navigation; @@ -45,18 +45,17 @@ namespace MyCompanyName.MyProjectName.Blazor.Server { [DependsOn( typeof(MyProjectNameApplicationModule), - typeof(AbpAutofacModule), - typeof(AbpAspNetCoreMvcModule), - typeof(AbpAspNetCoreMvcUiBasicThemeModule), - typeof(AbpBlazoriseUIModule), - typeof(AbpAspNetCoreComponentsUiBasicThemeModule), - typeof(AbpIdentityBlazorModule), - typeof(AbpTenantManagementBlazorModule), - typeof(AbpAccountWebIdentityServerModule), - typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(MyProjectNameEntityFrameworkCoreDbMigrationsModule), typeof(MyProjectNameHttpApiModule), - typeof(MyProjectNameHttpApiClientModule) + typeof(AbpAspNetCoreMvcUiBasicThemeModule), + typeof(AbpAutofacModule), + typeof(AbpSwashbuckleModule), + typeof(AbpAspNetCoreAuthenticationJwtBearerModule), + typeof(AbpAspNetCoreSerilogModule), + typeof(AbpAccountWebIdentityServerModule), + typeof(AbpAspNetCoreComponentsUiBasicThemeServerModule), + typeof(AbpIdentityBlazorModule), + typeof(AbpTenantManagementBlazorModule) )] public class MyProjectNameBlazorServerModule : AbpModule { @@ -121,16 +120,18 @@ namespace MyCompanyName.MyProjectName.Blazor.Server private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration) { - context.Services.AddOidcAuthentication(options => - { - configuration.Bind("AuthServer", options.ProviderOptions); - options.UserOptions.RoleClaim = JwtClaimTypes.Role; - options.ProviderOptions.DefaultScopes.Add("MyProjectName"); - options.ProviderOptions.DefaultScopes.Add("role"); - options.ProviderOptions.DefaultScopes.Add("email"); - options.ProviderOptions.DefaultScopes.Add("phone"); - }); + // context.Services.AddOidcAuthentication(options => + // { + // configuration.Bind("AuthServer", options.ProviderOptions); + // options.UserOptions.RoleClaim = JwtClaimTypes.Role; + // options.ProviderOptions.DefaultScopes.Add("MyProjectName"); + // options.ProviderOptions.DefaultScopes.Add("role"); + // options.ProviderOptions.DefaultScopes.Add("email"); + // options.ProviderOptions.DefaultScopes.Add("phone"); + // }); + + context.Services.AddAuthentication() .AddJwtBearer(options => { diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/_Imports.razor b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/_Imports.razor index 32bd8089a1..fe27745143 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/_Imports.razor +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/_Imports.razor @@ -6,7 +6,6 @@ @using Microsoft.AspNetCore.Components.Web @using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.JSInterop -@using Volo.Abp.AspNetCore.Components.WebAssembly @using MyCompanyName.MyProjectName.Blazor.Server @using Blazorise @using Blazorise.DataGrid diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/wwwroot/global-styles.css b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/wwwroot/global-styles.css new file mode 100644 index 0000000000..e5d20ea346 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/wwwroot/global-styles.css @@ -0,0 +1 @@ +/* Your Global Styles */ diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/wwwroot/main.css b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/wwwroot/main.css deleted file mode 100644 index eb9395b846..0000000000 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/wwwroot/main.css +++ /dev/null @@ -1,48 +0,0 @@ -.spinner { - width: 40px; - height: 40px; - display: block; - position: fixed; - top: calc( 50% - ( 40px / 2) ); - right: calc( 50% - ( 40px / 2) ); -} - -.double-bounce1, .double-bounce2 { - width: 100%; - height: 100%; - border-radius: 50%; - background-color: #333; - opacity: 0.6; - position: absolute; - top: 0; - left: 0; - -webkit-animation: sk-bounce 2.0s infinite ease-in-out; - animation: sk-bounce 2.0s infinite ease-in-out; -} - -.double-bounce2 { - -webkit-animation-delay: -1.0s; - animation-delay: -1.0s; -} - -@-webkit-keyframes sk-bounce { - 0%, 100% { - -webkit-transform: scale(0.0) - } - - 50% { - -webkit-transform: scale(1.0) - } -} - -@keyframes sk-bounce { - 0%, 100% { - transform: scale(0.0); - -webkit-transform: scale(0.0); - } - - 50% { - transform: scale(1.0); - -webkit-transform: scale(1.0); - } -} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json index 0578efe4a4..b9ba4298dd 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json @@ -1,6 +1,6 @@ { "ConnectionStrings": { - "Default": "Server=localhost;Database=BookStore;Trusted_Connection=True" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True" }, "IdentityServer": { "Clients": {