1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-09-30 04:17:55 +02:00
bitwarden-mobile/src/App/Pages/Accounts/TwoFactorPage.xaml.cs

51 lines
1.1 KiB
C#
Raw Normal View History

2019-05-27 17:57:10 +02:00
using Bit.App.Controls;
using System;
2019-05-24 03:19:45 +02:00
namespace Bit.App.Pages
{
public partial class TwoFactorPage : BaseContentPage
{
private TwoFactorPageViewModel _vm;
public TwoFactorPage()
{
InitializeComponent();
_vm = BindingContext as TwoFactorPageViewModel;
_vm.Page = this;
2019-05-27 17:57:10 +02:00
DuoWebView = _duoWebView;
2019-05-24 03:19:45 +02:00
}
2019-05-27 17:57:10 +02:00
public HybridWebView DuoWebView { get; set; }
2019-05-27 16:28:38 +02:00
protected override void OnAppearing()
2019-05-24 03:19:45 +02:00
{
base.OnAppearing();
2019-05-27 16:28:38 +02:00
_vm.Init();
2019-05-24 03:19:45 +02:00
}
2019-05-27 16:28:38 +02:00
private async void Continue_Clicked(object sender, EventArgs e)
2019-05-24 03:19:45 +02:00
{
if(DoOnce())
{
2019-05-27 16:28:38 +02:00
await _vm.SubmitAsync();
2019-05-24 03:19:45 +02:00
}
}
2019-05-27 16:28:38 +02:00
private async void Methods_Clicked(object sender, EventArgs e)
2019-05-24 03:19:45 +02:00
{
if(DoOnce())
{
2019-05-27 16:28:38 +02:00
await _vm.AnotherMethodAsync();
}
}
2019-05-24 03:19:45 +02:00
2019-05-27 16:28:38 +02:00
private async void ResendEmail_Clicked(object sender, EventArgs e)
{
if(DoOnce())
{
await _vm.SendEmailAsync(true, true);
2019-05-24 03:19:45 +02:00
}
}
}
}