stub out options page

This commit is contained in:
Kyle Spearrin 2019-05-29 09:08:47 -04:00
parent bf022f8a41
commit d70de04816
5 changed files with 67 additions and 0 deletions

View file

@ -57,6 +57,9 @@
<Compile Update="Pages\Settings\FoldersPage.xaml.cs">
<DependentUpon>FoldersPage.xaml</DependentUpon>
</Compile>
<Compile Update="Pages\Settings\OptionsPage.xaml.cs">
<DependentUpon>OptionsPage.xaml</DependentUpon>
</Compile>
<Compile Update="Pages\Settings\SyncPage.xaml.cs">
<DependentUpon>SyncPage.xaml</DependentUpon>
</Compile>

View file

@ -0,0 +1,16 @@
<?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.OptionsPage"
xmlns:pages="clr-namespace:Bit.App.Pages"
xmlns:u="clr-namespace:Bit.App.Utilities"
x:DataType="pages:OptionsPageViewModel"
Title="{Binding PageTitle}">
<ContentPage.BindingContext>
<pages:OptionsPageViewModel />
</ContentPage.BindingContext>
</pages:BaseContentPage>

View file

@ -0,0 +1,21 @@
using System;
namespace Bit.App.Pages
{
public partial class OptionsPage : BaseContentPage
{
private readonly OptionsPageViewModel _vm;
public OptionsPage()
{
InitializeComponent();
_vm = BindingContext as OptionsPageViewModel;
_vm.Page = this;
}
protected override void OnAppearing()
{
base.OnAppearing();
}
}
}

View file

@ -0,0 +1,23 @@
using Bit.App.Abstractions;
using Bit.App.Resources;
using Bit.Core.Abstractions;
using Bit.Core.Exceptions;
using Bit.Core.Utilities;
using System.Threading.Tasks;
namespace Bit.App.Pages
{
public class OptionsPageViewModel : BaseViewModel
{
private readonly IDeviceActionService _deviceActionService;
private readonly IPlatformUtilsService _platformUtilsService;
public OptionsPageViewModel()
{
_deviceActionService = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService");
_platformUtilsService = ServiceContainer.Resolve<IPlatformUtilsService>("platformUtilsService");
PageTitle = AppResources.Options;
}
}
}

View file

@ -42,6 +42,10 @@ namespace Bit.App.Pages
{
await Navigation.PushModalAsync(new NavigationPage(new SyncPage()));
}
else if(item.Name == AppResources.Options)
{
await Navigation.PushModalAsync(new NavigationPage(new OptionsPage()));
}
else if(item.Name == AppResources.Folders)
{
await Navigation.PushModalAsync(new NavigationPage(new FoldersPage()));