mirror of
https://github.com/bitwarden/mobile
synced 2026-01-08 19:43:56 +00:00
106 lines
4.3 KiB
XML
106 lines
4.3 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<pages:BaseContentPage
|
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
|
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
x:Class="Bit.App.Pages.HomePage"
|
|
xmlns:pages="clr-namespace:Bit.App.Pages"
|
|
xmlns:controls="clr-namespace:Bit.App.Controls"
|
|
xmlns:view="clr-namespace:Bit.Core.Models.View;assembly=BitwardenCore"
|
|
xmlns:u="clr-namespace:Bit.App.Utilities"
|
|
x:DataType="pages:HomeViewModel"
|
|
Title="{Binding PageTitle}">
|
|
<ContentPage.BindingContext>
|
|
<pages:HomeViewModel />
|
|
</ContentPage.BindingContext>
|
|
|
|
<ContentPage.ToolbarItems>
|
|
<controls:ExtendedToolbarItem
|
|
x:Name="_accountAvatar"
|
|
x:Key="accountAvatar"
|
|
IconImageSource="{Binding AvatarImageSource}"
|
|
Clicked="AccountSwitch_Clicked"
|
|
Order="Primary"
|
|
Priority="-1"
|
|
UseOriginalImage="True"
|
|
AutomationProperties.IsInAccessibleTree="True"
|
|
AutomationProperties.Name="{u:I18n Account}" />
|
|
<ToolbarItem x:Name="_closeItem" x:Key="closeItem" Text="{u:I18n Close}"
|
|
Clicked="Close_Clicked" Order="Primary" Priority="-1" />
|
|
<ToolbarItem
|
|
Icon="cog_environment.png" Clicked="Environment_Clicked" Order="Primary"
|
|
AutomationProperties.IsInAccessibleTree="True"
|
|
AutomationProperties.Name="{u:I18n Options}" />
|
|
</ContentPage.ToolbarItems>
|
|
|
|
<ContentPage.Resources>
|
|
<ResourceDictionary>
|
|
<StackLayout x:Name="_mainLayout" x:Key="mainLayout" Spacing="0" Padding="10, 5">
|
|
<StackLayout VerticalOptions="CenterAndExpand" Spacing="20">
|
|
<Image
|
|
x:Name="_logo"
|
|
Source="logo.png"
|
|
VerticalOptions="Center" />
|
|
<Label Text="{u:I18n LoginOrCreateNewAccount}"
|
|
StyleClass="text-lg"
|
|
HorizontalTextAlignment="Center">
|
|
</Label>
|
|
<StackLayout Spacing="5">
|
|
<Button Text="{u:I18n LogIn}"
|
|
StyleClass="btn-primary"
|
|
Clicked="LogIn_Clicked" />
|
|
<Button Text="{u:I18n CreateAccount}"
|
|
Clicked="Register_Clicked" />
|
|
<Button Text="{u:I18n LogInSso}"
|
|
Clicked="LogInSso_Clicked" />
|
|
</StackLayout>
|
|
</StackLayout>
|
|
</StackLayout>
|
|
</ResourceDictionary>
|
|
</ContentPage.Resources>
|
|
|
|
<AbsoluteLayout
|
|
x:Name="_absLayout"
|
|
VerticalOptions="FillAndExpand"
|
|
HorizontalOptions="FillAndExpand">
|
|
<ContentView
|
|
x:Name="_mainContent"
|
|
AbsoluteLayout.LayoutFlags="All"
|
|
AbsoluteLayout.LayoutBounds="0, 0, 1, 1">
|
|
</ContentView>
|
|
|
|
<!-- Account Switching Overlay -->
|
|
<ContentView
|
|
x:Name="_accountListOverlay"
|
|
AbsoluteLayout.LayoutBounds="0, 0, 1, 1"
|
|
AbsoluteLayout.LayoutFlags="All"
|
|
IsVisible="False"
|
|
BackgroundColor="#22000000"
|
|
Padding="0">
|
|
|
|
<StackLayout
|
|
x:Name="_accountListView"
|
|
VerticalOptions="StartAndExpand"
|
|
HorizontalOptions="FillAndExpand"
|
|
BackgroundColor="{DynamicResource BackgroundColor}"
|
|
xct:ShadowEffect.Color="Black"
|
|
xct:ShadowEffect.Radius="10"
|
|
xct:ShadowEffect.OffsetY="3">
|
|
<ListView
|
|
ItemsSource="{Binding AccountViews}"
|
|
ItemSelected="AccountRow_Selected"
|
|
VerticalOptions="FillAndExpand"
|
|
RowHeight="60">
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate x:DataType="view:AccountView">
|
|
<controls:AccountViewCell
|
|
Account="{Binding .}" />
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
</StackLayout>
|
|
</ContentView>
|
|
</AbsoluteLayout>
|
|
|
|
</pages:BaseContentPage>
|