1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-21 11:25:56 +01:00

two step login

This commit is contained in:
Kyle Spearrin 2016-07-28 00:39:35 -04:00
parent 9338552297
commit 010ae19284
4 changed files with 36 additions and 8 deletions

View File

@ -50,7 +50,7 @@ namespace Bit.App.Pages
VerticalOptions = LayoutOptions.Start,
EnableScrolling = false,
NoHeader = true,
Intent = TableIntent.Menu,
Intent = TableIntent.Settings,
HasUnevenRows = true,
Root = new TableRoot
{
@ -73,9 +73,8 @@ namespace Bit.App.Pages
Spacing = 0
};
Title = "About bitwarden";
Title = "About";
Content = new ScrollView { Content = stackLayout };
NavigationPage.SetBackButtonTitle(this, "About");
}
private void RateCell_Tapped(object sender, EventArgs e)

View File

@ -16,7 +16,7 @@ namespace Bit.App.Pages
var table = new ExtendedTableView
{
EnableScrolling = true,
Intent = TableIntent.Menu,
Intent = TableIntent.Settings,
HasUnevenRows = true,
EnableSelection = false,
Root = new TableRoot

View File

@ -61,6 +61,13 @@ namespace Bit.App.Pages
};
LockOptionsCell.Tapped += LockOptionsCell_Tapped;
var twoStepCell = new ExtendedTextCell
{
Text = "Two-step Login",
ShowDisclousure = true
};
twoStepCell.Tapped += TwoStepCell_Tapped; ;
var changeMasterPasswordCell = new ExtendedTextCell
{
Text = "Change Master Password",
@ -130,7 +137,8 @@ namespace Bit.App.Pages
{
LockOptionsCell,
FingerprintCell,
PinCell
PinCell,
twoStepCell
}
}
};
@ -216,6 +224,19 @@ namespace Bit.App.Pages
Content = new ScrollView { Content = stackLayout };
}
private async void TwoStepCell_Tapped(object sender, EventArgs e)
{
if(!await _userDialogs.ConfirmAsync("Two-step login makes your account more secure my requiring you to enter"
+ " a security code from an authenticator app whenever you log in. Two-step login can be enabled on the"
+ " bitwarden.com web vault. Do you want to visit the website now?",
null, AppResources.Yes, AppResources.Cancel))
{
return;
}
Device.OpenUri(new Uri("https://vault.bitwarden.com"));
}
private async void LockOptionsCell_Tapped(object sender, EventArgs e)
{
var selection = await DisplayActionSheet("Lock Options", AppResources.Cancel, null,
@ -300,7 +321,8 @@ namespace Bit.App.Pages
private async void ChangeMasterPasswordCell_Tapped(object sender, EventArgs e)
{
if(!await _userDialogs.ConfirmAsync("You can change your master password on the bitwarden.com web vault. Do you want to visit the website now?", null, AppResources.Yes, AppResources.Cancel))
if(!await _userDialogs.ConfirmAsync("You can change your master password on the bitwarden.com web vault."
+ "Do you want to visit the website now?", null, AppResources.Yes, AppResources.Cancel))
{
return;
}
@ -310,7 +332,8 @@ namespace Bit.App.Pages
private async void ChangeEmailCell_Tapped(object sender, EventArgs e)
{
if(!await _userDialogs.ConfirmAsync("You can change your email address on the bitwarden.com web vault. Do you want to visit the website now?", null, AppResources.Yes, AppResources.Cancel))
if(!await _userDialogs.ConfirmAsync("You can change your email address on the bitwarden.com web vault."
+ " Do you want to visit the website now?", null, AppResources.Yes, AppResources.Cancel))
{
return;
}
@ -415,6 +438,12 @@ namespace Bit.App.Pages
EnableScrolling = false;
Intent = TableIntent.Menu;
HasUnevenRows = true;
if(Device.OS == TargetPlatform.iOS)
{
RowHeight = -1;
EstimatedRowHeight = 44;
}
}
}
}

View File

@ -77,7 +77,7 @@ namespace Bit.App.Pages
var table = new ExtendedTableView
{
EnableScrolling = true,
Intent = TableIntent.Menu,
Intent = TableIntent.Settings,
HasUnevenRows = true,
EnableSelection = false,
Root = new TableRoot