mirror of
https://github.com/bitwarden/android.git
synced 2025-01-06 16:27:34 +03:00
1d4e742d66
* Forms update with CollectionView conversion * updates * removed unnecessary import
105 lines
4.7 KiB
XML
105 lines
4.7 KiB
XML
<?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"
|
|
x:DataType="pages:AutofillCiphersPageViewModel"
|
|
Title="{Binding PageTitle}"
|
|
x:Name="_page">
|
|
|
|
<ContentPage.BindingContext>
|
|
<pages:AutofillCiphersPageViewModel />
|
|
</ContentPage.BindingContext>
|
|
|
|
<ContentPage.ToolbarItems>
|
|
<ToolbarItem Icon="search.png" Clicked="Search_Clicked" />
|
|
</ContentPage.ToolbarItems>
|
|
|
|
<ContentPage.Resources>
|
|
<ResourceDictionary>
|
|
<u:InverseBoolConverter x:Key="inverseBool" />
|
|
|
|
<DataTemplate x:Key="cipherTemplate"
|
|
x:DataType="pages:GroupingsPageListItem">
|
|
<controls:CipherViewCell
|
|
Cipher="{Binding Cipher}"
|
|
ButtonCommand="{Binding BindingContext.CipherOptionsCommand, Source={x:Reference _page}}"
|
|
WebsiteIconsEnabled="{Binding BindingContext.WebsiteIconsEnabled, Source={x:Reference _page}}" />
|
|
</DataTemplate>
|
|
|
|
<pages:GroupingsPageListItemSelector x:Key="listItemDataTemplateSelector"
|
|
CipherTemplate="{StaticResource cipherTemplate}" />
|
|
|
|
<StackLayout x:Key="mainLayout" x:Name="_mainLayout">
|
|
<StackLayout
|
|
VerticalOptions="CenterAndExpand"
|
|
Padding="20, 0"
|
|
Spacing="20"
|
|
IsVisible="{Binding ShowList, Converter={StaticResource inverseBool}}">
|
|
<Label
|
|
Text="{Binding NoDataText}"
|
|
HorizontalTextAlignment="Center"></Label>
|
|
<Button
|
|
Text="{u:I18n AddAnItem}"
|
|
Clicked="AddButton_Clicked"></Button>
|
|
</StackLayout>
|
|
|
|
<controls:ExtendedCollectionView
|
|
IsVisible="{Binding ShowList}"
|
|
ItemsSource="{Binding GroupedItems}"
|
|
VerticalOptions="FillAndExpand"
|
|
ItemTemplate="{StaticResource listItemDataTemplateSelector}"
|
|
IsGrouped="True"
|
|
SelectionMode="Single"
|
|
SelectionChanged="RowSelected"
|
|
StyleClass="list, list-platform">
|
|
|
|
<CollectionView.GroupHeaderTemplate>
|
|
<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" />
|
|
</StackLayout>
|
|
</StackLayout>
|
|
</DataTemplate>
|
|
</CollectionView.GroupHeaderTemplate>
|
|
</controls:ExtendedCollectionView>
|
|
</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
|
|
x:Name="_fab"
|
|
Image="plus.png"
|
|
Clicked="AddButton_Clicked"
|
|
Style="{StaticResource btn-fab}"
|
|
AbsoluteLayout.LayoutFlags="PositionProportional"
|
|
AbsoluteLayout.LayoutBounds="1, 1, AutoSize, AutoSize">
|
|
<Button.Effects>
|
|
<effects:FabShadowEffect />
|
|
</Button.Effects>
|
|
</Button>
|
|
</AbsoluteLayout>
|
|
|
|
</pages:BaseContentPage>
|