diff --git a/src/App/Controls/FormEntryCell.cs b/src/App/Controls/FormEntryCell.cs index 0a81fe53c..099cb185e 100644 --- a/src/App/Controls/FormEntryCell.cs +++ b/src/App/Controls/FormEntryCell.cs @@ -10,7 +10,7 @@ namespace Bit.App.Controls public FormEntryCell( string labelText, Keyboard entryKeyboard = null, - bool IsPassword = false, + bool isPassword = false, VisualElement nextElement = null, bool useLabelAsPlaceholder = false, string imageSource = null, @@ -32,7 +32,7 @@ namespace Bit.App.Controls { Keyboard = entryKeyboard, HasBorder = false, - IsPassword = IsPassword, + IsPassword = isPassword, AllowClear = true, HorizontalOptions = LayoutOptions.FillAndExpand, WidthRequest = 1, diff --git a/src/App/Pages/Lock/LockPasswordPage.cs b/src/App/Pages/Lock/LockPasswordPage.cs index a60fe5c1b..edd6fdb6d 100644 --- a/src/App/Pages/Lock/LockPasswordPage.cs +++ b/src/App/Pages/Lock/LockPasswordPage.cs @@ -38,7 +38,7 @@ namespace Bit.App.Pages Android: new Thickness(15, 8), WinPhone: new Thickness(15, 20)); - PasswordCell = new FormEntryCell(AppResources.MasterPassword, IsPassword: true, + PasswordCell = new FormEntryCell(AppResources.MasterPassword, isPassword: true, useLabelAsPlaceholder: true, imageSource: "lock", containerPadding: padding); PasswordCell.Entry.ReturnType = Enums.ReturnType.Go; diff --git a/src/App/Pages/LoginPage.cs b/src/App/Pages/LoginPage.cs index 9c9c0816c..7c99d85a2 100644 --- a/src/App/Pages/LoginPage.cs +++ b/src/App/Pages/LoginPage.cs @@ -55,7 +55,7 @@ namespace Bit.App.Pages Android: new Thickness(15, 8), WinPhone: new Thickness(15, 20)); - PasswordCell = new FormEntryCell(AppResources.MasterPassword, IsPassword: true, + PasswordCell = new FormEntryCell(AppResources.MasterPassword, isPassword: true, useLabelAsPlaceholder: true, imageSource: "lock", containerPadding: padding); EmailCell = new FormEntryCell(AppResources.EmailAddress, nextElement: PasswordCell.Entry, entryKeyboard: Keyboard.Email, useLabelAsPlaceholder: true, imageSource: "envelope", diff --git a/src/App/Pages/RegisterPage.cs b/src/App/Pages/RegisterPage.cs index fda62251d..2e779d83d 100644 --- a/src/App/Pages/RegisterPage.cs +++ b/src/App/Pages/RegisterPage.cs @@ -47,10 +47,10 @@ namespace Bit.App.Pages PasswordHintCell = new FormEntryCell("Master Password Hint (optional)", useLabelAsPlaceholder: true, imageSource: "lightbulb", containerPadding: padding); - ConfirmPasswordCell = new FormEntryCell("Re-type Master Password", IsPassword: true, + ConfirmPasswordCell = new FormEntryCell("Re-type Master Password", isPassword: true, nextElement: PasswordHintCell.Entry, useLabelAsPlaceholder: true, imageSource: "lock", containerPadding: padding); - PasswordCell = new FormEntryCell(AppResources.MasterPassword, IsPassword: true, + PasswordCell = new FormEntryCell(AppResources.MasterPassword, isPassword: true, nextElement: ConfirmPasswordCell.Entry, useLabelAsPlaceholder: true, imageSource: "lock", containerPadding: padding); EmailCell = new FormEntryCell(AppResources.EmailAddress, nextElement: PasswordCell.Entry, diff --git a/src/App/Pages/Vault/VaultAddSitePage.cs b/src/App/Pages/Vault/VaultAddSitePage.cs index bbd27a371..6598e5147 100644 --- a/src/App/Pages/Vault/VaultAddSitePage.cs +++ b/src/App/Pages/Vault/VaultAddSitePage.cs @@ -41,20 +41,18 @@ namespace Bit.App.Pages private void Init() { var notesCell = new FormEditorCell(height: 90); - PasswordCell = new FormEntryCell(AppResources.Password, IsPassword: true, nextElement: notesCell.Editor, + PasswordCell = new FormEntryCell(AppResources.Password, isPassword: true, nextElement: notesCell.Editor, useButton: true); PasswordCell.Button.Image = "eye"; PasswordCell.Button.Clicked += PasswordButton_Clicked; PasswordCell.Entry.DisableAutocapitalize = true; PasswordCell.Entry.Autocorrect = false; + PasswordCell.Entry.FontFamily = Device.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier"); var usernameCell = new FormEntryCell(AppResources.Username, nextElement: PasswordCell.Entry); usernameCell.Entry.DisableAutocapitalize = true; usernameCell.Entry.Autocorrect = false; - usernameCell.Entry.FontFamily = PasswordCell.Entry.FontFamily = Device.OnPlatform( - iOS: "Courier", Android: "monospace", WinPhone: "Courier"); - var uriCell = new FormEntryCell(AppResources.URI, Keyboard.Url, nextElement: usernameCell.Entry); var nameCell = new FormEntryCell(AppResources.Name, nextElement: uriCell.Entry); diff --git a/src/App/Pages/Vault/VaultEditSitePage.cs b/src/App/Pages/Vault/VaultEditSitePage.cs index 56bf8a1cd..fd5d7984f 100644 --- a/src/App/Pages/Vault/VaultEditSitePage.cs +++ b/src/App/Pages/Vault/VaultEditSitePage.cs @@ -46,22 +46,20 @@ namespace Bit.App.Pages var notesCell = new FormEditorCell(height: 90); notesCell.Editor.Text = site.Notes?.Decrypt(); - PasswordCell = new FormEntryCell(AppResources.Password, IsPassword: true, nextElement: notesCell.Editor, + PasswordCell = new FormEntryCell(AppResources.Password, isPassword: true, nextElement: notesCell.Editor, useButton: true); PasswordCell.Entry.Text = site.Password?.Decrypt(); PasswordCell.Button.Image = "eye"; PasswordCell.Button.Clicked += PasswordButton_Clicked; PasswordCell.Entry.DisableAutocapitalize = true; PasswordCell.Entry.Autocorrect = false; + PasswordCell.Entry.FontFamily = Device.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier"); var usernameCell = new FormEntryCell(AppResources.Username, nextElement: PasswordCell.Entry); usernameCell.Entry.Text = site.Username?.Decrypt(); usernameCell.Entry.DisableAutocapitalize = true; usernameCell.Entry.Autocorrect = false; - usernameCell.Entry.FontFamily = PasswordCell.Entry.FontFamily = - Device.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier"); - var uriCell = new FormEntryCell(AppResources.URI, Keyboard.Url, nextElement: usernameCell.Entry); uriCell.Entry.Text = site.Uri?.Decrypt(); var nameCell = new FormEntryCell(AppResources.Name, nextElement: uriCell.Entry); diff --git a/src/App/Pages/Vault/VaultViewSitePage.cs b/src/App/Pages/Vault/VaultViewSitePage.cs index b4ada9279..8753d049a 100644 --- a/src/App/Pages/Vault/VaultViewSitePage.cs +++ b/src/App/Pages/Vault/VaultViewSitePage.cs @@ -64,9 +64,7 @@ namespace Bit.App.Pages } PasswordCell.Button1.Command = new Command(() => Model.RevealPassword = !Model.RevealPassword); PasswordCell.Button2.Command = new Command(() => Copy(Model.Password, AppResources.Password)); - - UsernameCell.Value.FontFamily = PasswordCell.Value.FontFamily = Device.OnPlatform( - iOS: "Courier", Android: "monospace", WinPhone: "Courier"); + PasswordCell.Value.FontFamily = Device.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier"); // URI UriCell = new LabeledValueCell(AppResources.Website, button1Text: AppResources.Launch);