1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-10 21:33:36 +00:00

Card Security Code masked (bitwarden/desktop issue 78) (#328)

* Card Security Code masked in the same way as Passwords. (bitwarden/desktop issue 78)

By default shows Card Security Code masked in the same way as Passwords. (bitwarden/desktop issue 78)

* Creating property to store value of Masked Card Code Shown
This commit is contained in:
Neil Burrows
2018-06-18 14:00:45 +01:00
committed by Kyle Spearrin
parent 7cac07c185
commit 9523c7ab33
4 changed files with 51 additions and 6 deletions

View File

@@ -23,6 +23,7 @@ namespace Bit.App.Models.Page
// Card
private string _cardName, _cardNumber, _cardBrand, _cardExpMonth, _cardExpYear, _cardCode;
private bool _cardRevealCardCode;
// Identity
private string _idFirstName, _idLastName, _idMiddleName, _idCompany, _idEmail, _idPhone, _idUsername,
@@ -250,6 +251,22 @@ namespace Bit.App.Models.Page
}
}
public bool ShowCardCode => !string.IsNullOrWhiteSpace(CardCode);
public bool RevealCardCode
{
get => _cardRevealCardCode;
set
{
_cardRevealCardCode = value;
PropertyChanged(this, new PropertyChangedEventArgs(nameof(RevealCardCode)));
PropertyChanged(this, new PropertyChangedEventArgs(nameof(MaskedCardCode)));
PropertyChanged(this, new PropertyChangedEventArgs(nameof(CardCodeShowHideImage)));
}
}
public string MaskedCardCode => RevealCardCode ?
CardCode : CardCode == null ? null : new String('•', CardCode.Length);
public ImageSource CardCodeShowHideImage => RevealCardCode ?
ImageSource.FromFile("eye_slash.png") : ImageSource.FromFile("eye.png");
// Identity