mirror of
https://github.com/bitwarden/android.git
synced 2025-01-07 08:47:36 +03:00
57 lines
2.6 KiB
XML
57 lines
2.6 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.CollectionsPage"
|
|
xmlns:pages="clr-namespace:Bit.App.Pages"
|
|
xmlns:u="clr-namespace:Bit.App.Utilities"
|
|
xmlns:controls="clr-namespace:Bit.App.Controls"
|
|
x:DataType="pages:CollectionsPageViewModel"
|
|
x:Name="_page"
|
|
Title="{Binding PageTitle}">
|
|
<ContentPage.BindingContext>
|
|
<pages:CollectionsPageViewModel />
|
|
</ContentPage.BindingContext>
|
|
|
|
<ContentPage.ToolbarItems>
|
|
<ToolbarItem Text="{u:I18n Save}" Clicked="Save_Clicked" />
|
|
</ContentPage.ToolbarItems>
|
|
|
|
<ContentPage.Resources>
|
|
<ResourceDictionary>
|
|
<u:InverseBoolConverter x:Key="inverseBool" />
|
|
<u:IsNotNullConverter x:Key="notNull" />
|
|
</ResourceDictionary>
|
|
</ContentPage.Resources>
|
|
|
|
<ScrollView x:Name="_scrollView">
|
|
<StackLayout Spacing="20">
|
|
<StackLayout StyleClass="box">
|
|
<StackLayout StyleClass="box-row"
|
|
IsVisible="{Binding HasCollections, Converter={StaticResource inverseBool}}">
|
|
<Label Text="{u:I18n NoCollectionsToList}" />
|
|
</StackLayout>
|
|
<controls:RepeaterView ItemsSource="{Binding Collections}" IsVisible="{Binding HasCollections}">
|
|
<controls:RepeaterView.ItemTemplate>
|
|
<DataTemplate x:DataType="pages:CollectionViewModel">
|
|
<StackLayout Spacing="0" Padding="0">
|
|
<StackLayout StyleClass="box-row, box-row-switch">
|
|
<Label
|
|
Text="{Binding Collection.Name}"
|
|
StyleClass="box-label, box-label-regular"
|
|
HorizontalOptions="StartAndExpand" />
|
|
<Switch
|
|
IsToggled="{Binding Checked}"
|
|
StyleClass="box-value"
|
|
HorizontalOptions="End" />
|
|
</StackLayout>
|
|
<BoxView StyleClass="box-row-separator" />
|
|
</StackLayout>
|
|
</DataTemplate>
|
|
</controls:RepeaterView.ItemTemplate>
|
|
</controls:RepeaterView>
|
|
</StackLayout>
|
|
</StackLayout>
|
|
</ScrollView>
|
|
|
|
</pages:BaseContentPage>
|