mirror of
https://github.com/bitwarden/android.git
synced 2025-01-08 01:07:40 +03:00
85 lines
4.1 KiB
XML
85 lines
4.1 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.SharePage"
|
|
xmlns:pages="clr-namespace:Bit.App.Pages"
|
|
xmlns:u="clr-namespace:Bit.App.Utilities"
|
|
xmlns:controls="clr-namespace:Bit.App.Controls"
|
|
x:DataType="pages:SharePageViewModel"
|
|
x:Name="_page"
|
|
Title="{Binding PageTitle}">
|
|
<ContentPage.BindingContext>
|
|
<pages:SharePageViewModel />
|
|
</ContentPage.BindingContext>
|
|
|
|
<ContentPage.ToolbarItems>
|
|
<ToolbarItem Text="{u:I18n Close}" Clicked="Close_Clicked" Order="Primary" Priority="-1" />
|
|
<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"
|
|
IsVisible="{Binding HasOrganizations, Converter={StaticResource inverseBool}}">
|
|
<StackLayout StyleClass="box-row" Padding="10, 20">
|
|
<Label Text="{u:I18n NoOrgsToList}" HorizontalTextAlignment="Center" />
|
|
</StackLayout>
|
|
</StackLayout>
|
|
<StackLayout StyleClass="box"
|
|
IsVisible="{Binding HasOrganizations}">
|
|
<StackLayout StyleClass="box-row, box-row-input, box-row-input-options-platform">
|
|
<Label
|
|
Text="{u:I18n Organization}"
|
|
StyleClass="box-label" />
|
|
<Picker
|
|
x:Name="_organizationPicker"
|
|
ItemsSource="{Binding OrganizationOptions, Mode=OneTime}"
|
|
SelectedIndex="{Binding OrganizationSelectedIndex}"
|
|
StyleClass="box-value" />
|
|
</StackLayout>
|
|
<Label
|
|
Text="{u:I18n ShareDesc}"
|
|
StyleClass="box-footer-label" />
|
|
</StackLayout>
|
|
<StackLayout StyleClass="box"
|
|
IsVisible="{Binding OrganizationId, Converter={StaticResource notNull}}">
|
|
<StackLayout StyleClass="box-row-header">
|
|
<Label Text="{u:I18n Collections, Header=True}"
|
|
StyleClass="box-header, box-header-platform" />
|
|
</StackLayout>
|
|
<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>
|