1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-09 03:53:15 +00:00

monospace fonts for card code

This commit is contained in:
Kyle Spearrin
2018-06-18 09:12:03 -04:00
parent 9523c7ab33
commit d359547dab
4 changed files with 41 additions and 13 deletions

View File

@@ -460,11 +460,15 @@ namespace Bit.App.Pages
}
else if(_type == CipherType.Card)
{
CardCodeCell = new FormEntryCell(AppResources.SecurityCode, Keyboard.Numeric, isPassword: true, nextElement: NotesCell.Editor, button1: "eye.png");
CardCodeCell = new FormEntryCell(AppResources.SecurityCode, Keyboard.Numeric,
isPassword: true, nextElement: NotesCell.Editor, button1: "eye.png");
if(!string.IsNullOrWhiteSpace(_defaultCardCode))
{
CardCodeCell.Entry.Text = _defaultCardCode;
}
CardCodeCell.Entry.FontFamily =
Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", Windows: "Courier");
CardExpYearCell = new FormEntryCell(AppResources.ExpirationYear, Keyboard.Numeric,
nextElement: CardCodeCell.Entry);
if(!string.IsNullOrWhiteSpace(_defaultCardExpYear))

View File

@@ -221,6 +221,8 @@ namespace Bit.App.Pages
CardCodeCell = new FormEntryCell(AppResources.SecurityCode, Keyboard.Numeric,
isPassword: true, nextElement: NotesCell.Editor, button1: "eye.png");
CardCodeCell.Entry.Text = Cipher.Card.Code?.Decrypt(Cipher.OrganizationId);
CardCodeCell.Entry.FontFamily =
Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", Windows: "Courier");
CardExpYearCell = new FormEntryCell(AppResources.ExpirationYear, Keyboard.Numeric,
nextElement: CardCodeCell.Entry);

View File

@@ -168,14 +168,15 @@ namespace Bit.App.Pages
CardExpCell = new LabeledValueCell(AppResources.Expiration);
CardExpCell.Value.SetBinding(Label.TextProperty, nameof(VaultViewCipherPageModel.CardExp));
CardCodeCell = new LabeledValueCell(AppResources.SecurityCode, button1Image: string.Empty, button2Image: "clipboard.png");
CardCodeCell.Value.SetBinding(Label.TextProperty,
nameof(VaultViewCipherPageModel.MaskedCardCode));
CardCodeCell = new LabeledValueCell(AppResources.SecurityCode, button1Image: string.Empty,
button2Image: "clipboard.png");
CardCodeCell.Value.SetBinding(Label.TextProperty, nameof(VaultViewCipherPageModel.MaskedCardCode));
CardCodeCell.Button1.SetBinding(Button.ImageProperty,
nameof(VaultViewCipherPageModel.CardCodeShowHideImage));
CardCodeCell.Button1.Command =
new Command(() => Model.RevealCardCode = !Model.RevealCardCode);
nameof(VaultViewCipherPageModel.CardCodeShowHideImage));
CardCodeCell.Button1.Command = new Command(() => Model.RevealCardCode = !Model.RevealCardCode);
CardCodeCell.Button2.Command = new Command(() => Copy(Model.CardCode, AppResources.SecurityCode));
CardCodeCell.Value.FontFamily =
Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", Windows: "Courier");
break;
case CipherType.Identity:
IdNameCell = new LabeledValueCell(AppResources.Name);