1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-13 23:03:23 +00:00

add reveal button to password reprompt on iOS (#1607)

* add reveal button to password reprompt on iOS

* format special chars as unicode
This commit is contained in:
Jake Fink
2021-10-26 17:46:11 -04:00
committed by GitHub
parent b8c1107c94
commit 0e9cbe4539
2 changed files with 31 additions and 7 deletions

View File

@@ -43,7 +43,7 @@ namespace Bit.iOS.Core.Controllers
public abstract Action Cancel { get; }
public FormEntryTableViewCell MasterPasswordCell { get; set; } = new FormEntryTableViewCell(
AppResources.MasterPassword);
AppResources.MasterPassword, useButton: true);
public string BiometricIntegrityKey { get; set; }
@@ -95,6 +95,12 @@ namespace Bit.iOS.Core.Controllers
{
MasterPasswordCell.TextField.KeyboardType = UIKeyboardType.NumberPad;
}
MasterPasswordCell.Button.TitleLabel.Font = UIFont.FromName("FontAwesome", 28f);
MasterPasswordCell.Button.SetTitle("\uf06e", UIControlState.Normal);
MasterPasswordCell.Button.TouchUpInside += (sender, e) => {
MasterPasswordCell.TextField.SecureTextEntry = !MasterPasswordCell.TextField.SecureTextEntry;
MasterPasswordCell.Button.SetTitle(MasterPasswordCell.TextField.SecureTextEntry ? "\uf06e" : "\uf070", UIControlState.Normal);
};
TableView.RowHeight = UITableView.AutomaticDimension;
TableView.EstimatedRowHeight = 70;