bitwarden-android/src/App/Pages/Vault/AutofillCiphersPage.xaml

106 lines
4.7 KiB
Text
Raw Normal View History

2019-05-17 20:14:26 +03:00
<?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.AutofillCiphersPage"
xmlns:pages="clr-namespace:Bit.App.Pages"
xmlns:u="clr-namespace:Bit.App.Utilities"
xmlns:controls="clr-namespace:Bit.App.Controls"
xmlns:effects="clr-namespace:Bit.App.Effects;assembly=BitwardenApp"
2019-05-17 20:14:26 +03:00
x:DataType="pages:AutofillCiphersPageViewModel"
Title="{Binding PageTitle}"
x:Name="_page">
<ContentPage.BindingContext>
<pages:AutofillCiphersPageViewModel />
</ContentPage.BindingContext>
<ContentPage.ToolbarItems>
2019-05-29 23:44:18 +03:00
<ToolbarItem Icon="search.png" Clicked="Search_Clicked" />
2019-05-17 20:14:26 +03:00
</ContentPage.ToolbarItems>
<ContentPage.Resources>
<ResourceDictionary>
2019-05-17 21:58:42 +03:00
<u:InverseBoolConverter x:Key="inverseBool" />
2019-07-02 07:19:59 +03:00
2019-05-17 20:14:26 +03:00
<DataTemplate x:Key="cipherTemplate"
x:DataType="pages:GroupingsPageListItem">
<controls:CipherViewCell
Cipher="{Binding Cipher}"
2019-06-08 19:18:49 +03:00
ButtonCommand="{Binding BindingContext.CipherOptionsCommand, Source={x:Reference _page}}"
WebsiteIconsEnabled="{Binding BindingContext.WebsiteIconsEnabled, Source={x:Reference _page}}" />
2019-05-17 20:14:26 +03:00
</DataTemplate>
<pages:GroupingsPageListItemSelector x:Key="listItemDataTemplateSelector"
CipherTemplate="{StaticResource cipherTemplate}" />
<StackLayout x:Key="mainLayout" x:Name="_mainLayout">
<StackLayout
VerticalOptions="CenterAndExpand"
Padding="20, 0"
Spacing="20"
2019-05-17 21:58:42 +03:00
IsVisible="{Binding ShowList, Converter={StaticResource inverseBool}}">
2019-05-17 20:14:26 +03:00
<Label
2019-05-17 21:58:42 +03:00
Text="{Binding NoDataText}"
2019-05-17 20:14:26 +03:00
HorizontalTextAlignment="Center"></Label>
<Button
Text="{u:I18n AddAnItem}"
Clicked="AddButton_Clicked"></Button>
</StackLayout>
<controls:ExtendedCollectionView
2019-05-17 20:14:26 +03:00
IsVisible="{Binding ShowList}"
ItemsSource="{Binding GroupedItems}"
VerticalOptions="FillAndExpand"
ItemTemplate="{StaticResource listItemDataTemplateSelector}"
IsGrouped="True"
SelectionMode="Single"
SelectionChanged="RowSelected"
2019-05-17 20:14:26 +03:00
StyleClass="list, list-platform">
<CollectionView.GroupHeaderTemplate>
2019-05-17 20:14:26 +03:00
<DataTemplate x:DataType="pages:GroupingsPageListGroup">
<StackLayout
Spacing="0" Padding="0" VerticalOptions="FillAndExpand"
StyleClass="list-row-header-container, list-row-header-container-platform">
<BoxView
StyleClass="list-section-separator-top, list-section-separator-top-platform" />
<StackLayout StyleClass="list-row-header, list-row-header-platform">
<Label
Text="{Binding Name}"
StyleClass="list-header, list-header-platform" />
<Label
Text="{Binding ItemCount}"
StyleClass="list-header-sub" />
2019-05-17 20:14:26 +03:00
</StackLayout>
</StackLayout>
2019-05-17 20:14:26 +03:00
</DataTemplate>
</CollectionView.GroupHeaderTemplate>
</controls:ExtendedCollectionView>
2019-05-17 20:14:26 +03:00
</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>
<Button
2019-05-17 20:14:26 +03:00
x:Name="_fab"
Image="plus.png"
Clicked="AddButton_Clicked"
Style="{StaticResource btn-fab}"
2019-05-17 20:14:26 +03:00
AbsoluteLayout.LayoutFlags="PositionProportional"
AbsoluteLayout.LayoutBounds="1, 1, AutoSize, AutoSize">
<Button.Effects>
<effects:FabShadowEffect />
</Button.Effects>
</Button>
2019-05-17 20:14:26 +03:00
</AbsoluteLayout>
</pages:BaseContentPage>