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

stub out two factor page

This commit is contained in:
Kyle Spearrin 2019-05-23 21:19:45 -04:00
parent 23f27282d6
commit 6d49253ee5
4 changed files with 116 additions and 0 deletions

View File

@ -34,6 +34,9 @@
<Compile Update="Pages\Accounts\LockPage.xaml.cs">
<DependentUpon>LockPage.xaml</DependentUpon>
</Compile>
<Compile Update="Pages\Accounts\TwoFactorPage.xaml.cs">
<DependentUpon>TwoFactorPage.xaml</DependentUpon>
</Compile>
<Compile Update="Pages\Accounts\RegisterPage.xaml.cs">
<DependentUpon>RegisterPage.xaml</DependentUpon>
</Compile>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<pages:BaseContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Bit.App.Pages.TwoFactorPage"
xmlns:pages="clr-namespace:Bit.App.Pages"
xmlns:controls="clr-namespace:Bit.App.Controls"
xmlns:u="clr-namespace:Bit.App.Utilities"
x:DataType="pages:TwoFactorPageViewModel"
Title="{Binding PageTitle}">
<ContentPage.BindingContext>
<pages:TwoFactorPageViewModel />
</ContentPage.BindingContext>
<ContentPage.Resources>
<ResourceDictionary>
<u:InverseBoolConverter x:Key="inverseBool" />
</ResourceDictionary>
</ContentPage.Resources>
<ContentPage.ToolbarItems>
<ToolbarItem Text="{u:I18n Continue}" Clicked="Continue_Clicked" />
</ContentPage.ToolbarItems>
<ScrollView>
</ScrollView>
</pages:BaseContentPage>

View File

@ -0,0 +1,39 @@
using System;
using Xamarin.Forms;
namespace Bit.App.Pages
{
public partial class TwoFactorPage : BaseContentPage
{
private TwoFactorPageViewModel _vm;
public TwoFactorPage()
{
InitializeComponent();
_vm = BindingContext as TwoFactorPageViewModel;
_vm.Page = this;
}
protected override async void OnAppearing()
{
base.OnAppearing();
await _vm.InitAsync();
}
private void Continue_Clicked(object sender, EventArgs e)
{
if(DoOnce())
{
}
}
private void Methods_Clicked(object sender, EventArgs e)
{
if(DoOnce())
{
}
}
}
}

View File

@ -0,0 +1,44 @@
using Bit.App.Abstractions;
using Bit.App.Resources;
using Bit.Core.Abstractions;
using Bit.Core.Exceptions;
using Bit.Core.Utilities;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace Bit.App.Pages
{
public class TwoFactorPageViewModel : BaseViewModel
{
private readonly IDeviceActionService _deviceActionService;
private readonly IAuthService _authService;
private readonly ISyncService _syncService;
private readonly IStorageService _storageService;
private string _email;
public TwoFactorPageViewModel()
{
_deviceActionService = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService");
_authService = ServiceContainer.Resolve<IAuthService>("authService");
_syncService = ServiceContainer.Resolve<ISyncService>("syncService");
_storageService = ServiceContainer.Resolve<IStorageService>("storageService");
}
public string Email
{
get => _email;
set => SetProperty(ref _email, value);
}
public async Task InitAsync()
{
}
public async Task SubmitAsync()
{
}
}
}