Browse Source

Moved the click from the icon to the button

pull/14648/head
malik masis 4 years ago
parent
commit
c0210c5d0b
  1. 4
      modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor
  2. 12
      modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor.cs

4
modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor

@ -101,8 +101,8 @@
</TextEdit>
</Addon>
<Addon AddonType="AddonType.End">
<Button Color="Color.Secondary" Clicked="@(() => ChangePasswordTextRole(null))">
<Icon Name="IsShowPasswordText ? IconName.Eye : IconName.EyeSlash" Clicked="@(() => IsShowPassword(IsShowPasswordText))" />
<Button Color="Color.Secondary" Clicked="@(() => ChangePasswordTextRole(null, IsShowPassword))">
<Icon Name="IsShowPassword ? IconName.Eye : IconName.EyeSlash" />
</Button>
</Addon>
</Addons>

12
modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor.cs

@ -35,7 +35,7 @@ public partial class UserManagement
protected string CreateModalSelectedTab = DefaultSelectedTab;
protected string EditModalSelectedTab = DefaultSelectedTab;
protected bool IsShowPasswordText { get; set; } = false;
protected bool IsShowPassword { get; set; }
protected PageToolbar Toolbar { get; } = new();
@ -229,7 +229,7 @@ public partial class UserManagement
return base.SetToolbarItemsAsync();
}
protected virtual void ChangePasswordTextRole(TextRole? textRole)
protected virtual void ChangePasswordTextRole(TextRole? textRole, bool? isShowPassword = null)
{
if (textRole == null)
{
@ -239,11 +239,11 @@ public partial class UserManagement
{
_passwordTextRole = textRole.Value;
}
}
protected virtual void IsShowPassword(bool isShowPassword)
{
IsShowPasswordText = !isShowPassword;
if (isShowPassword.HasValue)
{
IsShowPassword = !isShowPassword.Value;
}
}
}

Loading…
Cancel
Save