1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-07 11:03:54 +00:00

stub out various pages

This commit is contained in:
Kyle Spearrin
2019-03-28 23:52:33 -04:00
parent 30dd2e993f
commit 02e03c7654
22 changed files with 532 additions and 252 deletions

View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
@@ -20,8 +20,21 @@
</ItemGroup>
<ItemGroup>
<Compile Update="Pages\Accounts\HomePage.xaml.cs">
<DependentUpon>HomePage.xaml</DependentUpon>
<Compile Update="Pages\GeneratorPage.xaml.cs">
<DependentUpon>GeneratorPage.xaml</DependentUpon>
</Compile>
<Compile Update="Pages\SettingsPage.xaml.cs">
<DependentUpon>SettingsPage.xaml</DependentUpon>
</Compile>
<Compile Update="Pages\VaultGroupingsPage.xaml.cs">
<DependentUpon>VaultGroupingsPage.xaml</DependentUpon>
</Compile>
<Compile Update="Pages\TabsPage.xaml.cs">
<DependentUpon>TabsPage.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Folder Include="Pages\Accounts\" />
</ItemGroup>
</Project>

View File

@@ -11,7 +11,7 @@ namespace Bit.App
public App()
{
InitializeComponent();
MainPage = new HomePage();
MainPage = new TabsPage();
}
protected override void OnStart()

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace Bit.App.ViewModels
namespace Bit.App.Pages
{
public abstract class BaseViewModel : INotifyPropertyChanged
{

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Bit.App.Pages.GeneratorPage"
xmlns:pages="clr-namespace:Bit.App.Pages"
Title="{Binding PageTitle}">
<ContentPage.BindingContext>
<pages:GeneratorPageViewModel />
</ContentPage.BindingContext>
<StackLayout>
<!-- Place new controls here -->
<Label
Text="Generator!"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
<Label
Text="&#xf2b9;"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String"
Android="FontAwesome.ttf#FontAwesome"
iOS="FontAwesome" />
</Label.FontFamily>
</Label>
</StackLayout>
</ContentPage>

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace Bit.App.Pages
{
public partial class GeneratorPage : ContentPage
{
public GeneratorPage()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Bit.App.Pages
{
public class GeneratorPageViewModel : BaseViewModel
{
public GeneratorPageViewModel()
{
PageTitle = "Password Generator";
}
}
}

View File

@@ -3,10 +3,10 @@
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Bit.App.Pages.HomePage"
xmlns:vm="clr-namespace:Bit.App.ViewModels"
Title="{Binding Title}">
xmlns:pages="clr-namespace:Bit.App.Pages"
Title="{Binding PageTitle}">
<ContentPage.BindingContext>
<vm:HomeViewModel />
<pages:HomeViewModel />
</ContentPage.BindingContext>
<StackLayout>

View File

@@ -2,10 +2,13 @@
using System.Collections.Generic;
using System.Text;
namespace Bit.App.ViewModels
namespace Bit.App.Pages
{
public class HomeViewModel : BaseViewModel
{
public HomeViewModel()
{
PageTitle = "Home Page";
}
}
}

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Bit.App.Pages.SettingsPage"
xmlns:pages="clr-namespace:Bit.App.Pages"
Title="{Binding PageTitle}">
<ContentPage.BindingContext>
<pages:SettingsPageViewModel />
</ContentPage.BindingContext>
<StackLayout>
<!-- Place new controls here -->
<Label
Text="Settings!"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
<Label
Text="&#xf2b9;"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String"
Android="FontAwesome.ttf#FontAwesome"
iOS="FontAwesome" />
</Label.FontFamily>
</Label>
</StackLayout>
</ContentPage>

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace Bit.App.Pages
{
public partial class SettingsPage : ContentPage
{
public SettingsPage()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Bit.App.Pages
{
public class SettingsPageViewModel : BaseViewModel
{
public SettingsPageViewModel()
{
PageTitle = "Settings";
}
}
}

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Bit.App.Pages.TabsPage"
xmlns:pages="clr-namespace:Bit.App.Pages"
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
android:TabbedPage.ToolbarPlacement="Bottom">
<TabbedPage.Children>
<NavigationPage Title="My Vault">
<NavigationPage.Icon>
<FileImageSource File="lock.png"></FileImageSource>
</NavigationPage.Icon>
<x:Arguments>
<pages:VaultGroupingsPage />
</x:Arguments>
</NavigationPage>
<NavigationPage Title="Generator">
<NavigationPage.Icon>
<FileImageSource File="refresh.png"></FileImageSource>
</NavigationPage.Icon>
<x:Arguments>
<pages:GeneratorPage />
</x:Arguments>
</NavigationPage>
<NavigationPage Title="Settings">
<NavigationPage.Icon>
<FileImageSource File="cogs.png"></FileImageSource>
</NavigationPage.Icon>
<x:Arguments>
<pages:SettingsPage />
</x:Arguments>
</NavigationPage>
</TabbedPage.Children>
</TabbedPage>

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace Bit.App.Pages
{
public partial class TabsPage : TabbedPage
{
public TabsPage()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Bit.App.Pages.VaultGroupingsPage"
xmlns:pages="clr-namespace:Bit.App.Pages"
Title="{Binding PageTitle}">
<ContentPage.BindingContext>
<pages:VaultGroupingsPageViewModel />
</ContentPage.BindingContext>
<StackLayout>
<!-- Place new controls here -->
<Label
Text="Vault Groupings!"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
<Label
Text="&#xf2b9;"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String"
Android="FontAwesome.ttf#FontAwesome"
iOS="FontAwesome" />
</Label.FontFamily>
</Label>
</StackLayout>
</ContentPage>

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace Bit.App.Pages
{
public partial class VaultGroupingsPage : ContentPage
{
public VaultGroupingsPage()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Bit.App.Pages
{
public class VaultGroupingsPageViewModel : BaseViewModel
{
public VaultGroupingsPageViewModel()
{
PageTitle = "My Vault";
}
}
}