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

add/remove continue button

This commit is contained in:
Kyle Spearrin
2019-05-28 09:12:05 -04:00
parent 29ab7f7a30
commit 822fc7f308
3 changed files with 22 additions and 6 deletions

View File

@@ -114,6 +114,7 @@ namespace Bit.App.Pages
PageTitle = AppResources.LoginUnavailable;
return;
}
var page = Page as TwoFactorPage;
PageTitle = _authService.TwoFactorProviders[SelectedProviderType.Value].Name;
var providerData = _authService.TwoFactorProvidersData[SelectedProviderType.Value];
switch(SelectedProviderType.Value)
@@ -123,9 +124,9 @@ namespace Bit.App.Pages
break;
case TwoFactorProviderType.Duo:
case TwoFactorProviderType.OrganizationDuo:
page.RemoveContinueButton();
var host = WebUtility.UrlEncode(providerData["Host"] as string);
var req = WebUtility.UrlEncode(providerData["Signature"] as string);
var page = Page as TwoFactorPage;
page.DuoWebView.Uri = $"{_webVaultUrl}/duo-connector.html?host={host}&request={req}";
page.DuoWebView.RegisterAction(async sig =>
{
@@ -134,6 +135,7 @@ namespace Bit.App.Pages
});
break;
case TwoFactorProviderType.Email:
page.AddContinueButton();
TwoFactorEmail = providerData["Email"] as string;
if(_authService.TwoFactorProvidersData.Count > 1)
{
@@ -141,6 +143,7 @@ namespace Bit.App.Pages
}
break;
default:
page.AddContinueButton();
break;
}
}