mirror of
https://github.com/bitwarden/mobile
synced 2026-01-08 03:23:23 +00:00
PM-3349 PM-3350 MAUI Migration Initial
This commit is contained in:
49
src/Core/Pages/Accounts/VerificationCodePage.xaml.cs
Normal file
49
src/Core/Pages/Accounts/VerificationCodePage.xaml.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Bit.App.Pages.Accounts
|
||||
{
|
||||
public partial class VerificationCodePage : BaseContentPage
|
||||
{
|
||||
VerificationCodeViewModel _vm;
|
||||
|
||||
public VerificationCodePage(string mainActionText, bool mainActionStyleDanger)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_vm = BindingContext as VerificationCodeViewModel;
|
||||
_vm.Page = this;
|
||||
_vm.MainActionText = mainActionText;
|
||||
|
||||
_mainActionButton.StyleClass = new[]
|
||||
{
|
||||
mainActionStyleDanger ? "btn-danger" : "btn-primary"
|
||||
};
|
||||
}
|
||||
|
||||
protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
base.OnPropertyChanged(propertyName);
|
||||
|
||||
if (propertyName == nameof(VerificationCodeViewModel.ShowPassword))
|
||||
{
|
||||
RequestFocus(_secret);
|
||||
}
|
||||
}
|
||||
|
||||
protected async override void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
await _vm.InitAsync();
|
||||
RequestFocus(_secret);
|
||||
}
|
||||
|
||||
private async void Close_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
if (DoOnce())
|
||||
{
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user