From a8799bd6eb4a368d9edb2ce80622756d8812e578 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Fri, 30 Oct 2020 11:28:28 +0300 Subject: [PATCH 01/12] Account Blazor refactored Added AccountComponentBase: #5961 Replace Abstract Base: #5962 --- .../AbpAccountComponentBase.cs | 14 ++++++++++++++ .../{Manage.razor => AccountManage.razor} | 10 ++++++---- .../{Manage.razor.cs => AccountManage.razor.cs} | 17 +++-------------- .../Volo.Abp.Account.Blazor.csproj | 2 +- 4 files changed, 24 insertions(+), 19 deletions(-) create mode 100644 modules/account/src/Volo.Abp.Account.Blazor/AbpAccountComponentBase.cs rename modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/{Manage.razor => AccountManage.razor} (88%) rename modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/{Manage.razor.cs => AccountManage.razor.cs} (82%) diff --git a/modules/account/src/Volo.Abp.Account.Blazor/AbpAccountComponentBase.cs b/modules/account/src/Volo.Abp.Account.Blazor/AbpAccountComponentBase.cs new file mode 100644 index 0000000000..61e3890ffd --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Blazor/AbpAccountComponentBase.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Account.Localization; +using Volo.Abp.AspNetCore.Components; + +namespace Volo.Abp.Account.Blazor +{ + public class AbpAccountComponentBase : AbpComponentBase + { + public AbpAccountComponentBase() + { + LocalizationResource = typeof(AccountResource); + ObjectMapperContext = typeof(AbpAccountBlazorModule); + } + } +} diff --git a/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/Manage.razor b/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor similarity index 88% rename from modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/Manage.razor rename to modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor index 3e101b38a4..e31cd25080 100644 --- a/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/Manage.razor +++ b/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor @@ -1,5 +1,7 @@ @page "/account/manage-profile" -@inherits AccountManageBase +@using Microsoft.AspNetCore.Components.Forms +@inherits AbpAccountComponentBase + @@ -14,15 +16,15 @@ @L["DisplayName:CurrentPassword"] - + @L["DisplayName:NewPassword"] - + @L["DisplayName:NewPasswordConfirm"] - + diff --git a/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/Manage.razor.cs b/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor.cs similarity index 82% rename from modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/Manage.razor.cs rename to modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor.cs index 7dfee0da53..63539db7f9 100644 --- a/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/Manage.razor.cs +++ b/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor.cs @@ -1,33 +1,22 @@ using System.Threading.Tasks; -using Localization.Resources.AbpUi; using Microsoft.AspNetCore.Components; -using Microsoft.Extensions.Localization; -using Volo.Abp.Account.Localization; using Volo.Abp.AspNetCore.Components.WebAssembly; using Volo.Abp.Identity; -using Volo.Abp.ObjectMapping; namespace Volo.Abp.Account.Blazor.Pages.Account { - public abstract class AccountManageBase : OwningComponentBase + public partial class AccountManage { - [Inject] protected IAccountAppService AccountAppService { get; set; } [Inject] protected IProfileAppService ProfileAppService { get; set; } - - [Inject] protected IObjectMapper ObjectMapper { get; set; } - + [Inject] protected IUiMessageService UiMessageService { get; set; } - [Inject] protected IStringLocalizer UiLocalizer { get; set; } - - [Inject] protected IStringLocalizer L { get; set; } - protected string SelectedTab = "Password"; protected ChangePasswordModel ChangePasswordModel; protected PersonalInfoModel PersonalInfoModel; - + protected override async Task OnInitializedAsync() { await GetUserInformations(); diff --git a/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj b/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj index 84d4e4a7f4..64633f0d25 100644 --- a/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj +++ b/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj @@ -18,7 +18,7 @@ - + true From e3bfda349280ae44e23a65e751562561645a9736 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Fri, 30 Oct 2020 11:34:15 +0300 Subject: [PATCH 02/12] FeatureManagement Blazor Refactored Added FeatureManagementComponentBase: #5961 --- .../AbpFeatureManagementComponentBase.cs | 13 +++++++++++++ .../Components/FeatureManagementModal.razor | 3 +++ .../Components/FeatureManagementModal.razor.cs | 2 -- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/AbpFeatureManagementComponentBase.cs diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/AbpFeatureManagementComponentBase.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/AbpFeatureManagementComponentBase.cs new file mode 100644 index 0000000000..dac2254ed0 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/AbpFeatureManagementComponentBase.cs @@ -0,0 +1,13 @@ +using Volo.Abp.AspNetCore.Components; +using Volo.Abp.FeatureManagement.Localization; + +namespace Volo.Abp.FeatureManagement.Blazor +{ + public class AbpFeatureManagementComponentBase : AbpComponentBase + { + public AbpFeatureManagementComponentBase() + { + LocalizationResource = typeof(AbpFeatureManagementResource); + } + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor index 90d2539841..5edd635564 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor @@ -1,5 +1,8 @@ @using Volo.Abp.Validation.StringValues @using Microsoft.Extensions.Localization +@using Microsoft.AspNetCore.Components.Forms + +@inherits AbpFeatureManagementComponentBase diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor.cs index aed44df8bc..c91b7f3892 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor.cs @@ -20,8 +20,6 @@ namespace Volo.Abp.FeatureManagement.Blazor.Components [Inject] protected IUiMessageService UiMessageService { get; set; } - [Inject] protected IStringLocalizer L { get; set; } - [Inject] protected IStringLocalizerFactory HtmlLocalizerFactory { get; set; } [Inject] protected IOptions LocalizationOptions { get; set; } From ed61188ec81622bc303c3fd1ccc0911a059ff527 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Fri, 30 Oct 2020 11:35:08 +0300 Subject: [PATCH 03/12] Update AccountManage.razor --- .../Pages/Account/AccountManage.razor | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor b/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor index e31cd25080..a6edb30a64 100644 --- a/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor +++ b/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor @@ -16,15 +16,15 @@ @L["DisplayName:CurrentPassword"] - + @L["DisplayName:NewPassword"] - + @L["DisplayName:NewPasswordConfirm"] - + @@ -38,25 +38,25 @@ @L["DisplayName:UserName"] - + @L["DisplayName:Name"] - + @L["DisplayName:Surname"] - + @L["DisplayName:Email"] - + @L["DisplayName:PhoneNumber"] - + From 4a7addfa848644f8e76a28485777db37b8c86b39 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Fri, 30 Oct 2020 15:22:40 +0300 Subject: [PATCH 04/12] Identity Blazor Refactored Replace Abstract Base: #5962 --- .../Pages/Identity/RoleManagement.razor | 4 +++- .../Pages/Identity/RoleManagement.razor.cs | 8 +++----- .../Pages/Identity/UserManagement.razor | 4 +++- .../Pages/Identity/UserManagement.razor.cs | 5 ++--- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/RoleManagement.razor b/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/RoleManagement.razor index 67e7e9290c..7b9e047abb 100644 --- a/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/RoleManagement.razor +++ b/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/RoleManagement.razor @@ -2,8 +2,10 @@ @attribute [Authorize(IdentityPermissions.Roles.Default)] @using Volo.Abp.Identity @using Microsoft.AspNetCore.Authorization +@using Microsoft.AspNetCore.Components.Forms @using Volo.Abp.PermissionManagement.Blazor.Components -@inherits RoleManagementBase + +@inherits AbpCrudPageBase @* ************************* PAGE HEADER ************************* *@ diff --git a/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/RoleManagement.razor.cs b/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/RoleManagement.razor.cs index 2a77f22a92..c2c9af510a 100644 --- a/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/RoleManagement.razor.cs +++ b/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/RoleManagement.razor.cs @@ -1,13 +1,11 @@ -using System; -using System.Threading.Tasks; +using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; -using Volo.Abp.BlazoriseUI; using Volo.Abp.Identity.Localization; using Volo.Abp.PermissionManagement.Blazor.Components; namespace Volo.Abp.Identity.Blazor.Pages.Identity { - public abstract class RoleManagementBase : AbpCrudPageBase + public partial class RoleManagement { protected const string PermissionProviderName = "R"; @@ -17,7 +15,7 @@ namespace Volo.Abp.Identity.Blazor.Pages.Identity protected bool ShouldShowEntityActions { get; set; } - public RoleManagementBase() + public RoleManagement() { ObjectMapperContext = typeof(AbpIdentityBlazorModule); LocalizationResource = typeof(IdentityResource); diff --git a/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor b/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor index 991b8d1606..255a6e4d05 100644 --- a/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor +++ b/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor @@ -1,8 +1,10 @@ @page "/identity/users" @attribute [Authorize(IdentityPermissions.Users.Default)] @using Microsoft.AspNetCore.Authorization +@using Microsoft.AspNetCore.Components.Forms @using Volo.Abp.PermissionManagement.Blazor.Components -@inherits UserManagementBase + +@inherits AbpCrudPageBase @* ************************* PAGE HEADER ************************* *@ diff --git a/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor.cs b/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor.cs index 423f452cd8..cadd329f21 100644 --- a/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor.cs +++ b/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor.cs @@ -3,13 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; -using Volo.Abp.BlazoriseUI; using Volo.Abp.Identity.Localization; using Volo.Abp.PermissionManagement.Blazor.Components; namespace Volo.Abp.Identity.Blazor.Pages.Identity { - public abstract class UserManagementBase : AbpCrudPageBase + public partial class UserManagement { protected const string PermissionProviderName = "U"; @@ -30,7 +29,7 @@ namespace Volo.Abp.Identity.Blazor.Pages.Identity protected string EditModalSelectedTab = DefaultSelectedTab; - public UserManagementBase() + public UserManagement() { ObjectMapperContext = typeof(AbpIdentityBlazorModule); LocalizationResource = typeof(IdentityResource); From eef52e4eedbec7c2cb6d15101748db5520288166 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Fri, 30 Oct 2020 20:00:46 +0300 Subject: [PATCH 05/12] refactor identity blazor package --- .../Pages/Identity/RoleManagement.razor | 9 +++------ .../Pages/Identity/UserManagement.razor | 7 ++----- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/RoleManagement.razor b/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/RoleManagement.razor index 16021a1705..f9d2375dc5 100644 --- a/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/RoleManagement.razor +++ b/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/RoleManagement.razor @@ -4,15 +4,12 @@ @using Microsoft.AspNetCore.Authorization @using Microsoft.AspNetCore.Components.Forms @using Volo.Abp.PermissionManagement.Blazor.Components - -@inherits AbpCrudPageBase - @using Microsoft.Extensions.Localization @using Volo.Abp.Identity.Localization -@using Volo.Abp.PermissionManagement.Blazor.Components -@inherits RoleManagementBase -@inject IStringLocalizer L @inject AbpIdentityBlazorMessageLocalizerHelper LH + +@inherits AbpCrudPageBase + @* ************************* PAGE HEADER ************************* *@ diff --git a/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor b/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor index d21c5acf2d..f8f6262c98 100644 --- a/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor +++ b/modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor @@ -3,14 +3,11 @@ @using Microsoft.AspNetCore.Authorization @using Microsoft.AspNetCore.Components.Forms @using Volo.Abp.PermissionManagement.Blazor.Components +@using Microsoft.Extensions.Localization +@using Volo.Abp.Identity.Localization @inherits AbpCrudPageBase -@using Microsoft.Extensions.Localization -@using Volo.Abp.Identity.Localization -@using Volo.Abp.PermissionManagement.Blazor.Components -@inherits UserManagementBase -@inject IStringLocalizer L @inject AbpIdentityBlazorMessageLocalizerHelper LH @* ************************* PAGE HEADER ************************* *@ From a2409787fc53e779e0665a075767cbfabf3eed02 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Fri, 30 Oct 2020 21:03:36 +0300 Subject: [PATCH 06/12] Setting Management Blazor refactored Replace Abstract Base: #5962 --- .../Pages/SettingManagement/SettingManagement.razor | 2 +- .../Pages/SettingManagement/SettingManagement.razor.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor index ce854161ef..cce73cea1f 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor @@ -1,5 +1,5 @@ @page "/setting-management" -@inherits SettingManagementBase + @* ************************* PAGE HEADER ************************* *@ diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor.cs index 3c4775fd02..edd34506a1 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor.cs @@ -10,7 +10,7 @@ using Volo.Abp.SettingManagement.Localization; namespace Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement { - public abstract class SettingManagementBase : OwningComponentBase + public partial class SettingManagement { [Inject] protected IServiceProvider ServiceProvider { get; set; } @@ -44,7 +44,7 @@ namespace Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement BreadcrumbItems.Add(new BreadcrumbItem(L["Settings"])); } - protected string GetNormalizedString(string value) + protected virtual string GetNormalizedString(string value) { return value.Replace('.', '_'); } From fa03241d7553fc7d3a34124ad6559ffe093744d0 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Fri, 30 Oct 2020 21:09:14 +0300 Subject: [PATCH 07/12] Tenant Management Blazor refactored Replace Abstract Base: #5962 --- .../Pages/TenantManagement/TenantManagement.razor | 7 +++---- .../Pages/TenantManagement/TenantManagement.razor.cs | 7 ++++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor index 0b2f60d23b..49292b7720 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor @@ -1,11 +1,10 @@ @page "/tenant-management/tenants" @attribute [Authorize(TenantManagementPermissions.Tenants.Default)] @using Microsoft.AspNetCore.Authorization -@using Microsoft.Extensions.Localization -@using Volo.Abp.TenantManagement.Localization @using Volo.Abp.FeatureManagement.Blazor.Components -@inherits TenantManagementBase -@inject IStringLocalizer L +@using Microsoft.AspNetCore.Components.Forms + +@inherits AbpCrudPageBase @* ************************* PAGE HEADER ************************* *@ diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor.cs index f9dd57422e..a3408a17d2 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor.cs @@ -4,11 +4,11 @@ using Blazorise; using Microsoft.AspNetCore.Authorization; using Volo.Abp.BlazoriseUI; using Volo.Abp.FeatureManagement.Blazor.Components; +using Volo.Abp.TenantManagement.Localization; namespace Volo.Abp.TenantManagement.Blazor.Pages.TenantManagement { - public abstract class TenantManagementBase - : AbpCrudPageBase + public partial class TenantManagement { protected const string FeatureProviderName = "T"; @@ -22,8 +22,9 @@ namespace Volo.Abp.TenantManagement.Blazor.Pages.TenantManagement protected TenantInfoModel TenantInfo; - public TenantManagementBase() + public TenantManagement() { + LocalizationResource = typeof(AbpTenantManagementResource); ObjectMapperContext = typeof(AbpTenantManagementBlazorModule); CreatePolicyName = TenantManagementPermissions.Tenants.Create; From 151414208fa7fd137313aa9ef76efa2ad2b717b6 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Sun, 1 Nov 2020 22:22:57 +0300 Subject: [PATCH 08/12] Remove EditForm from feature management modal --- .../Components/FeatureManagementModal.razor | 139 +++++++++--------- 1 file changed, 67 insertions(+), 72 deletions(-) diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor index 5edd635564..02fdd768a9 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor @@ -1,6 +1,5 @@ @using Volo.Abp.Validation.StringValues @using Microsoft.Extensions.Localization -@using Microsoft.AspNetCore.Components.Forms @inherits AbpFeatureManagementComponentBase @@ -12,84 +11,80 @@ - - @if (Groups == null) - { - @L["NoFeatureFoundMessage"] - } - else - { - - - @foreach (var group in Groups) - { - - @group.DisplayName - - } - - - @foreach (var group in Groups) - { - -

@group.DisplayName

- - @foreach (var feature in group.Features) + @if (Groups == null) + { + @L["NoFeatureFoundMessage"] + } + else + { + + + @foreach (var group in Groups) + { + + @group.DisplayName + + } + + + @foreach (var group in Groups) + { + +

@group.DisplayName

+ + @foreach (var feature in group.Features) + { + var disabled = IsDisabled(feature.Provider.Name); + + if (feature.ValueType is FreeTextStringValueType) + { + + @feature.DisplayName + + @if (feature.Description != null) + { + @feature.Description + } + + } + + if (feature.ValueType is SelectionStringValueType) { - var disabled = IsDisabled(feature.Provider.Name); - - if (feature.ValueType is FreeTextStringValueType) - { - - @feature.DisplayName - - @if (feature.Description != null) + var items = ((SelectionStringValueType)feature.ValueType).ItemSource.Items; + + + @feature.DisplayName + - @foreach (var item in items) - { - - @CreateStringLocalizer(item.DisplayText.ResourceName).GetString(item.DisplayText.Name) - - } - - - } - - if (feature.ValueType is ToggleStringValueType) - { - - @feature.DisplayName - - } + + + } + + if (feature.ValueType is ToggleStringValueType) + { + + @feature.DisplayName + } - -
- } -
-
- } -
+ } + + + } + +
+ } - + \ No newline at end of file From 60d9f1c701e6708c143a7fd0f2411cc6bb3e6e2c Mon Sep 17 00:00:00 2001 From: Ahmet Date: Sun, 1 Nov 2020 23:13:00 +0300 Subject: [PATCH 09/12] Update TenantManagement.razor --- .../TenantManagement/TenantManagement.razor | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor index 49292b7720..107522c8e0 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor @@ -52,7 +52,7 @@ } @if (HasDeletePermission) { - + @L["Delete"] } @@ -72,25 +72,25 @@ @if (HasCreatePermission) { - + @L["NewTenant"] - + @L["TenantName"] - + @L["DisplayName:AdminEmailAddress"] - + @L["DisplayName:AdminPassword"] - + @@ -106,17 +106,17 @@ @if (HasUpdatePermission) { - + @L["Edit"] - + @L["TenantName"] - + @@ -132,11 +132,11 @@ @if (HasUpdatePermission) { - + @L["ConnectionStrings"] - + @@ -148,7 +148,7 @@ { @L["DisplayName:DefaultConnectionString"] - + } @@ -163,5 +163,5 @@ @if (HasManageFeaturesPermission) { - + } \ No newline at end of file From d7c474f0242211e52727ef308f32bab905cc53df Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 2 Nov 2020 10:02:45 +0300 Subject: [PATCH 10/12] Update Volo.Abp.Account.Blazor.csproj --- .../Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj b/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj index 64633f0d25..727a49be5c 100644 --- a/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj +++ b/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj @@ -17,10 +17,4 @@ - - - true - - - From f447295fb17b301f7847e0899572148fe8d8806d Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 2 Nov 2020 14:24:28 +0300 Subject: [PATCH 11/12] Update AbpFeatureManagementComponentBase.cs --- .../AbpFeatureManagementComponentBase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/AbpFeatureManagementComponentBase.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/AbpFeatureManagementComponentBase.cs index dac2254ed0..5cb4961072 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/AbpFeatureManagementComponentBase.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/AbpFeatureManagementComponentBase.cs @@ -3,9 +3,9 @@ using Volo.Abp.FeatureManagement.Localization; namespace Volo.Abp.FeatureManagement.Blazor { - public class AbpFeatureManagementComponentBase : AbpComponentBase + public abstract class AbpFeatureManagementComponentBase : AbpComponentBase { - public AbpFeatureManagementComponentBase() + protected AbpFeatureManagementComponentBase() { LocalizationResource = typeof(AbpFeatureManagementResource); } From aaeaf84937a2029efd01f6ee9f0e762c436541a8 Mon Sep 17 00:00:00 2001 From: Ahmet Date: Mon, 2 Nov 2020 14:25:03 +0300 Subject: [PATCH 12/12] Update AbpAccountComponentBase.cs --- .../src/Volo.Abp.Account.Blazor/AbpAccountComponentBase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/account/src/Volo.Abp.Account.Blazor/AbpAccountComponentBase.cs b/modules/account/src/Volo.Abp.Account.Blazor/AbpAccountComponentBase.cs index 61e3890ffd..d41367d485 100644 --- a/modules/account/src/Volo.Abp.Account.Blazor/AbpAccountComponentBase.cs +++ b/modules/account/src/Volo.Abp.Account.Blazor/AbpAccountComponentBase.cs @@ -3,9 +3,9 @@ using Volo.Abp.AspNetCore.Components; namespace Volo.Abp.Account.Blazor { - public class AbpAccountComponentBase : AbpComponentBase + public abstract class AbpAccountComponentBase : AbpComponentBase { - public AbpAccountComponentBase() + protected AbpAccountComponentBase() { LocalizationResource = typeof(AccountResource); ObjectMapperContext = typeof(AbpAccountBlazorModule);