ux: add a toggle button to reveal password

This commit is contained in:
leo 2024-07-09 15:26:46 +08:00
parent c16bed1d9f
commit 51a68027c8
No known key found for this signature in database
2 changed files with 19 additions and 1 deletions

View file

@ -1,5 +1,6 @@
using System;
using Avalonia;
using Avalonia.Input;
using Avalonia.Interactivity;
@ -7,6 +8,15 @@ namespace SourceGit.Views
{
public partial class Askpass : ChromelessWindow
{
public static readonly StyledProperty<bool> ShowPasswordProperty =
AvaloniaProperty.Register<Askpass, bool>(nameof(ShowPassword), false);
public bool ShowPassword
{
get => GetValue(ShowPasswordProperty);
set => SetValue(ShowPasswordProperty, value);
}
public string KeyName
{
get;