stub out settings page

This commit is contained in:
Kyle Spearrin 2019-05-14 09:09:35 -04:00
parent cc7ccf921b
commit 4f3a3a5b19
3 changed files with 42 additions and 32 deletions

View file

@ -4,39 +4,46 @@
x:Class="Bit.App.Pages.SettingsPage" x:Class="Bit.App.Pages.SettingsPage"
xmlns:pages="clr-namespace:Bit.App.Pages" xmlns:pages="clr-namespace:Bit.App.Pages"
xmlns:controls="clr-namespace:Bit.App.Controls" xmlns:controls="clr-namespace:Bit.App.Controls"
xmlns:bv="clr-namespace:Bit.App.Controls.BoxedView" xmlns:u="clr-namespace:Bit.App.Utilities"
x:DataType="pages:SettingsPageViewModel" x:DataType="pages:SettingsPageViewModel"
Title="{Binding PageTitle}"> Title="{Binding PageTitle}">
<ContentPage.BindingContext> <ContentPage.BindingContext>
<pages:SettingsPageViewModel /> <pages:SettingsPageViewModel />
</ContentPage.BindingContext> </ContentPage.BindingContext>
<bv:BoxedView HasUnevenRows="True"> <ScrollView x:Name="_scrollView">
<bv:BoxedSection Title="The Title" <StackLayout Spacing="20">
FooterText="The Footer" <StackLayout StyleClass="box">
UseDragSort="True"> <StackLayout StyleClass="box-row-header">
<bv:EntryCell Title="The title" <Label Text="{u:I18n Manage}"
ValueText="The value for entry" StyleClass="box-header, box-header-platform" />
Button1Icon="cogs" </StackLayout>
Button1Command="{Binding ButtonCommand}" </StackLayout>
Button2Icon="cogs" <StackLayout StyleClass="box">
Button2Command="{Binding Button2Command}" <StackLayout StyleClass="box-row-header">
Button3Icon="cogs" /> <Label Text="{u:I18n Security}"
<bv:LabelCell Title="The title" StyleClass="box-header, box-header-platform" />
ValueText="The value" /> </StackLayout>
<bv:LabelCell Title="The title 2" </StackLayout>
Button1Icon="cogs" <StackLayout StyleClass="box">
Button1Command="{Binding ButtonCommand}" <StackLayout StyleClass="box-row-header">
Button3Icon="cogs" <Label Text="{u:I18n Account}"
ValueText="The value" /> StyleClass="box-header, box-header-platform" />
<bv:LabelCell Title="The title 3" </StackLayout>
ValueText="The value" </StackLayout>
Button3Icon="cogs" /> <StackLayout StyleClass="box">
<bv:LabelCell Title="The title 4" <StackLayout StyleClass="box-row-header">
ValueText="The value" /> <Label Text="{u:I18n Tools}"
<bv:LabelCell Title="The title 5" StyleClass="box-header, box-header-platform" />
ValueText="The value" /> </StackLayout>
</bv:BoxedSection> </StackLayout>
</bv:BoxedView> <StackLayout StyleClass="box">
<StackLayout StyleClass="box-row-header">
<Label Text="{u:I18n Other}"
StyleClass="box-header, box-header-platform" />
</StackLayout>
</StackLayout>
</StackLayout>
</ScrollView>
</ContentPage> </ContentPage>

View file

@ -10,11 +10,13 @@ namespace Bit.App.Pages
{ {
public partial class SettingsPage : ContentPage public partial class SettingsPage : ContentPage
{ {
private SettingsPageViewModel _vm;
public SettingsPage() public SettingsPage()
{ {
InitializeComponent(); InitializeComponent();
var viewModel = BindingContext as SettingsPageViewModel; _vm = BindingContext as SettingsPageViewModel;
viewModel.Page = this; _vm.Page = this;
} }
} }
} }

View file

@ -1,4 +1,5 @@
using System; using Bit.App.Resources;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Windows.Input; using System.Windows.Input;
@ -10,7 +11,7 @@ namespace Bit.App.Pages
{ {
public SettingsPageViewModel() public SettingsPageViewModel()
{ {
PageTitle = "Settings"; PageTitle = AppResources.Settings;
ButtonCommand = new Command(() => Page.DisplayAlert("Button 1 Command", "Button 1 message", "Cancel")); ButtonCommand = new Command(() => Page.DisplayAlert("Button 1 Command", "Button 1 message", "Cancel"));
Button2Command = new Command(() => Page.DisplayAlert("Button 2 Command", "Button 2 message", "Cancel")); Button2Command = new Command(() => Page.DisplayAlert("Button 2 Command", "Button 2 message", "Cancel"));