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