mirror of
https://github.com/bitwarden/mobile
synced 2025-12-15 15:53:44 +00:00
Added toggle apssword button to add site page as well
This commit is contained in:
@@ -70,6 +70,7 @@ namespace Bit.App.Controls
|
|||||||
if(ToggleIsPassword == null)
|
if(ToggleIsPassword == null)
|
||||||
{
|
{
|
||||||
IsPassword = IsPasswordFromToggled = !IsPassword;
|
IsPassword = IsPasswordFromToggled = !IsPassword;
|
||||||
|
Focus();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -41,7 +41,11 @@ namespace Bit.App.Pages
|
|||||||
private void Init()
|
private void Init()
|
||||||
{
|
{
|
||||||
var notesCell = new FormEditorCell(height: 90);
|
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;
|
||||||
|
|
||||||
var usernameCell = new FormEntryCell(AppResources.Username, nextElement: PasswordCell.Entry);
|
var usernameCell = new FormEntryCell(AppResources.Username, nextElement: PasswordCell.Entry);
|
||||||
usernameCell.Entry.DisableAutocapitalize = true;
|
usernameCell.Entry.DisableAutocapitalize = true;
|
||||||
usernameCell.Entry.Autocorrect = false;
|
usernameCell.Entry.Autocorrect = false;
|
||||||
@@ -180,6 +184,12 @@ namespace Bit.App.Pages
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void PasswordButton_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
PasswordCell.Entry.InvokeToggleIsPassword();
|
||||||
|
PasswordCell.Button.Image = "eye" + (!PasswordCell.Entry.IsPasswordFromToggled ? "_slash" : string.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
private async void GenerateCell_Tapped(object sender, EventArgs e)
|
private async void GenerateCell_Tapped(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var page = new ToolsPasswordGeneratorPage((password) =>
|
var page = new ToolsPasswordGeneratorPage((password) =>
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ namespace Bit.App.Pages
|
|||||||
usernameCell.Entry.DisableAutocapitalize = true;
|
usernameCell.Entry.DisableAutocapitalize = true;
|
||||||
usernameCell.Entry.Autocorrect = false;
|
usernameCell.Entry.Autocorrect = false;
|
||||||
|
|
||||||
|
|
||||||
usernameCell.Entry.FontFamily = PasswordCell.Entry.FontFamily =
|
usernameCell.Entry.FontFamily = PasswordCell.Entry.FontFamily =
|
||||||
Device.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier");
|
Device.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier");
|
||||||
|
|
||||||
@@ -198,12 +197,6 @@ namespace Bit.App.Pages
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PasswordButton_Clicked(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
PasswordCell.Entry.InvokeToggleIsPassword();
|
|
||||||
PasswordCell.Button.Image = "eye" + (!PasswordCell.Entry.IsPasswordFromToggled ? "_slash" : string.Empty);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnAppearing()
|
protected override void OnAppearing()
|
||||||
{
|
{
|
||||||
base.OnAppearing();
|
base.OnAppearing();
|
||||||
@@ -213,6 +206,12 @@ namespace Bit.App.Pages
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void PasswordButton_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
PasswordCell.Entry.InvokeToggleIsPassword();
|
||||||
|
PasswordCell.Button.Image = "eye" + (!PasswordCell.Entry.IsPasswordFromToggled ? "_slash" : string.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
private async void GenerateCell_Tapped(object sender, EventArgs e)
|
private async void GenerateCell_Tapped(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if(!string.IsNullOrWhiteSpace(PasswordCell.Entry.Text)
|
if(!string.IsNullOrWhiteSpace(PasswordCell.Entry.Text)
|
||||||
|
|||||||
Reference in New Issue
Block a user