1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-19 17:53:47 +00:00

Added eye button icon for show/hide password

This commit is contained in:
Kyle Spearrin
2016-06-17 00:37:51 -04:00
parent 0c3bd0b92c
commit 79892cbf9f
9 changed files with 24 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.ComponentModel;
using Bit.App.Resources;
using Xamarin.Forms;
namespace Bit.App.Models.Page
{
@@ -103,10 +104,12 @@ namespace Bit.App.Models.Page
PropertyChanged(this, new PropertyChangedEventArgs(nameof(RevealPassword)));
PropertyChanged(this, new PropertyChangedEventArgs(nameof(MaskedPassword)));
PropertyChanged(this, new PropertyChangedEventArgs(nameof(ShowHideText)));
PropertyChanged(this, new PropertyChangedEventArgs(nameof(ShowHideImage)));
}
}
public string MaskedPassword => RevealPassword ? Password : Password == null ? null : new string('●', Password.Length);
public string ShowHideText => RevealPassword ? AppResources.Hide : AppResources.Show;
public ImageSource ShowHideImage => RevealPassword ? ImageSource.FromFile("eye_slash") : ImageSource.FromFile("eye");
public void Update(Site site)
{