mirror of
https://github.com/bitwarden/android.git
synced 2024-12-31 21:38:27 +03:00
95 lines
4.6 KiB
XML
95 lines
4.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.GeneratorHistoryPage"
|
|
xmlns:pages="clr-namespace:Bit.App.Pages"
|
|
xmlns:controls="clr-namespace:Bit.App.Controls"
|
|
xmlns:u="clr-namespace:Bit.App.Utilities"
|
|
xmlns:domain="clr-namespace:Bit.Core.Models.Domain;assembly=BitwardenCore"
|
|
xmlns:core="clr-namespace:Bit.Core;assembly=BitwardenCore"
|
|
x:DataType="pages:GeneratorHistoryPageViewModel"
|
|
x:Name="_page"
|
|
Title="{Binding PageTitle}">
|
|
|
|
<ContentPage.BindingContext>
|
|
<pages:GeneratorHistoryPageViewModel />
|
|
</ContentPage.BindingContext>
|
|
|
|
<ContentPage.Resources>
|
|
<ResourceDictionary>
|
|
<u:InverseBoolConverter x:Key="inverseBool" />
|
|
<u:DateTimeConverter x:Key="dateTime" />
|
|
<u:ColoredPasswordConverter x:Key="coloredPassword" />
|
|
<ToolbarItem Text="{u:I18n Close}" Clicked="Close_Clicked" Order="Primary" Priority="-1"
|
|
x:Name="_closeItem" x:Key="closeItem" />
|
|
<ToolbarItem Text="{u:I18n Clear}"
|
|
Clicked="Clear_Clicked"
|
|
Order="Secondary"
|
|
x:Name="_clearItem"
|
|
x:Key="clearItem" />
|
|
<ToolbarItem Icon="more_vert.png"
|
|
AutomationProperties.IsInAccessibleTree="True"
|
|
AutomationProperties.Name="{u:I18n Options}"
|
|
Clicked="More_Clicked"
|
|
x:Name="_moreItem"
|
|
x:Key="moreItem" />
|
|
</ResourceDictionary>
|
|
</ContentPage.Resources>
|
|
|
|
<StackLayout x:Name="_mainLayout">
|
|
<Label IsVisible="{Binding ShowNoData}"
|
|
Text="{u:I18n NoPasswordsToList}"
|
|
Margin="20, 0"
|
|
VerticalOptions="CenterAndExpand"
|
|
HorizontalOptions="CenterAndExpand"
|
|
HorizontalTextAlignment="Center"></Label>
|
|
<controls:ExtendedCollectionView
|
|
IsVisible="{Binding ShowNoData, Converter={StaticResource inverseBool}}"
|
|
ItemsSource="{Binding History}"
|
|
VerticalOptions="FillAndExpand"
|
|
StyleClass="list, list-platform">
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate x:DataType="domain:GeneratedPasswordHistory">
|
|
<Grid
|
|
StyleClass="list-row, list-row-platform"
|
|
Padding="10"
|
|
RowSpacing="0"
|
|
ColumnSpacing="10">
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<controls:MonoLabel LineBreakMode="CharacterWrap"
|
|
Grid.Column="0"
|
|
Grid.Row="0"
|
|
StyleClass="list-title, list-title-platform, text-html"
|
|
Text="{Binding Password, Mode=OneWay, Converter={StaticResource coloredPassword}}" />
|
|
<Label LineBreakMode="TailTruncation"
|
|
Grid.Column="0"
|
|
Grid.Row="1"
|
|
StyleClass="list-subtitle, list-subtitle-platform"
|
|
Text="{Binding Date, Mode=OneWay, Converter={StaticResource dateTime}}" />
|
|
<controls:IconButton
|
|
StyleClass="list-row-button, list-row-button-platform"
|
|
Text="{Binding Source={x:Static core:BitwardenIcons.Paste}}"
|
|
Command="{Binding BindingContext.CopyCommand, Source={x:Reference _page}}"
|
|
CommandParameter="{Binding .}"
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Grid.RowSpan="2"
|
|
AutomationProperties.IsInAccessibleTree="True"
|
|
AutomationProperties.Name="{u:I18n CopyPassword}" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</controls:ExtendedCollectionView>
|
|
</StackLayout>
|
|
|
|
</pages:BaseContentPage>
|