Browse Source

Renamed property and method names

pull/14648/head
malik masis 3 years ago
parent
commit
5c19b69075
  1. 8
      modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor
  2. 9
      modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor.cs
  3. 6
      modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor
  4. 6
      modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor.cs

8
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, IsShowPassword))">
<Icon Name="IsShowPassword ? IconName.Eye : IconName.EyeSlash" />
<Button Color="Color.Secondary" Clicked="@(() => ChangePasswordTextRole(null))">
<Icon Name="ShowPassword ? IconName.Eye : IconName.EyeSlash" />
</Button>
</Addon>
</Addons>
@ -222,7 +222,9 @@
</TextEdit>
</Addon>
<Addon AddonType="AddonType.End">
<Button Color="Color.Secondary" Clicked="@(() => ChangePasswordTextRole(null))"><Icon Name="IconName.EyeSlash"/></Button>
<Button Color="Color.Secondary" Clicked="@(() => ChangePasswordTextRole(null))">
<Icon Name="ShowPassword ? IconName.Eye : IconName.EyeSlash" />
</Button>
</Addon>
</Addons>
<ValidationError Style="display: block"/>

9
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 IsShowPassword { get; set; }
protected bool ShowPassword { get; set; }
protected PageToolbar Toolbar { get; } = new();
@ -229,21 +229,18 @@ public partial class UserManagement
return base.SetToolbarItemsAsync();
}
protected virtual void ChangePasswordTextRole(TextRole? textRole, bool? isShowPassword = null)
protected virtual void ChangePasswordTextRole(TextRole? textRole)
{
if (textRole == null)
{
ChangePasswordTextRole(_passwordTextRole == TextRole.Password ? TextRole.Text : TextRole.Password);
ShowPassword = !ShowPassword;
}
else
{
_passwordTextRole = textRole.Value;
}
if (isShowPassword.HasValue)
{
IsShowPassword = !isShowPassword.Value;
}
}
}

6
modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor

@ -69,12 +69,12 @@
<FieldLabel>@L["DisplayName:AdminPassword"] *</FieldLabel>
<Addons>
<Addon AddonType="AddonType.Body">
<TextEdit Role="IsShowPassword ? TextRole.Text : TextRole.Password" @bind-Text="@NewEntity.AdminPassword">
<TextEdit Role="ShowPassword ? TextRole.Text : TextRole.Password" @bind-Text="@NewEntity.AdminPassword">
</TextEdit>
</Addon>
<Addon AddonType="AddonType.End">
<Button Color="Color.Secondary" Clicked="@(() => ShowHidePassword(IsShowPassword))">
<Icon Name="IsShowPassword ? IconName.Eye : IconName.EyeSlash" />
<Button Color="Color.Secondary" Clicked="@(() => TogglePasswordVisibility())">
<Icon Name="ShowPassword ? IconName.Eye : IconName.EyeSlash" />
</Button>
</Addon>
</Addons>

6
modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor.cs

@ -21,7 +21,7 @@ public partial class TenantManagement
protected FeatureManagementModal FeatureManagementModal;
protected bool IsShowPassword { get; set; }
protected bool ShowPassword { get; set; }
protected PageToolbar Toolbar { get; } = new();
@ -127,8 +127,8 @@ public partial class TenantManagement
return base.SetTableColumnsAsync();
}
protected virtual void ShowHidePassword(bool isShowPassword)
protected virtual void TogglePasswordVisibility()
{
IsShowPassword = !isShowPassword;
ShowPassword = !ShowPassword;
}
}

Loading…
Cancel
Save