1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-21 02:33:36 +00:00

2FA screen: move continue to a button (#1427)

* Move continue to a button

* Resolve pr comments

* Move use another two step method button

* Resolve code suggestions

* Resolve for iPhone

* Apply suggestions from code review

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
This commit is contained in:
Sang
2021-07-20 14:50:45 +10:00
committed by GitHub
parent a4db088eda
commit 6a979d0ff5
3 changed files with 55 additions and 30 deletions

View File

@@ -32,6 +32,7 @@ namespace Bit.App.Pages
private string _totpInstruction;
private string _webVaultUrl = "https://vault.bitwarden.com";
private bool _authingWithSso = false;
private bool _enableContinue = false;
public TwoFactorPageViewModel()
{
@@ -73,6 +74,14 @@ namespace Bit.App.Pages
public bool ShowTryAgain => YubikeyMethod && Device.RuntimePlatform == Device.iOS;
public bool ShowContinue { get; set; }
public bool EnableContinue
{
get => _enableContinue;
set => SetProperty(ref _enableContinue, value);
}
public string YubikeyInstruction => Device.RuntimePlatform == Device.iOS ? AppResources.YubiKeyInstructionIos :
AppResources.YubiKeyInstruction;
@@ -169,14 +178,7 @@ namespace Bit.App.Pages
{
_messagingService.Send("listenYubiKeyOTP", false);
}
if (SelectedProviderType == null || DuoMethod)
{
page.RemoveContinueButton();
}
else
{
page.AddContinueButton();
}
ShowContinue = !(SelectedProviderType == null || DuoMethod);
}
public async Task SubmitAsync()