mirror of
https://github.com/bitwarden/android.git
synced 2025-01-12 11:17:30 +03:00
masked password string constant
This commit is contained in:
parent
7c8f6a1cc7
commit
560d831e92
1 changed files with 4 additions and 13 deletions
|
@ -9,6 +9,8 @@ namespace Bit.App.Models.Page
|
||||||
{
|
{
|
||||||
public class VaultViewCipherPageModel : INotifyPropertyChanged
|
public class VaultViewCipherPageModel : INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
|
private const string MaskedPasswordString = "••••••••";
|
||||||
|
|
||||||
private string _name, _notes;
|
private string _name, _notes;
|
||||||
private List<Attachment> _attachments;
|
private List<Attachment> _attachments;
|
||||||
private List<Field> _fields;
|
private List<Field> _fields;
|
||||||
|
@ -114,7 +116,7 @@ namespace Bit.App.Models.Page
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public string MaskedLoginPassword => RevealLoginPassword ?
|
public string MaskedLoginPassword => RevealLoginPassword ?
|
||||||
LoginPassword : LoginPassword == null ? null : new string('•', 8);
|
LoginPassword : LoginPassword == null ? null : MaskedPasswordString;
|
||||||
public ImageSource LoginShowHideImage => RevealLoginPassword ?
|
public ImageSource LoginShowHideImage => RevealLoginPassword ?
|
||||||
ImageSource.FromFile("eye_slash.png") : ImageSource.FromFile("eye.png");
|
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 Name { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
public string MaskedValue
|
public string MaskedValue => MaskedPasswordString;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if(_maskedValue == null && Value != null)
|
|
||||||
{
|
|
||||||
_maskedValue = new string('•', 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _maskedValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public FieldType Type { get; set; }
|
public FieldType Type { get; set; }
|
||||||
public bool Revealed { get; set; }
|
public bool Revealed { get; set; }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue