masked password string constant

This commit is contained in:
Kyle Spearrin 2018-03-06 07:41:40 -05:00
parent 7c8f6a1cc7
commit 560d831e92

View file

@ -9,6 +9,8 @@ namespace Bit.App.Models.Page
{
public class VaultViewCipherPageModel : INotifyPropertyChanged
{
private const string MaskedPasswordString = "••••••••";
private string _name, _notes;
private List<Attachment> _attachments;
private List<Field> _fields;
@ -114,7 +116,7 @@ namespace Bit.App.Models.Page
}
}
public string MaskedLoginPassword => RevealLoginPassword ?
LoginPassword : LoginPassword == null ? null : new string('•', 8);
LoginPassword : LoginPassword == null ? null : MaskedPasswordString;
public ImageSource LoginShowHideImage => RevealLoginPassword ?
ImageSource.FromFile("eye_slash.png") : ImageSource.FromFile("eye.png");
@ -616,18 +618,7 @@ namespace Bit.App.Models.Page
public string Name { get; set; }
public string Value { get; set; }
public string MaskedValue
{
get
{
if(_maskedValue == null && Value != null)
{
_maskedValue = new string('•', 8);
}
return _maskedValue;
}
}
public string MaskedValue => MaskedPasswordString;
public FieldType Type { get; set; }
public bool Revealed { get; set; }
}