mirror of
https://github.com/bitwarden/android.git
synced 2024-11-01 15:45:42 +03:00
82 lines
3.7 KiB
XML
82 lines
3.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.PasswordHistoryPage"
|
|
xmlns:pages="clr-namespace:Bit.App.Pages"
|
|
xmlns:controls="clr-namespace:Bit.App.Controls"
|
|
xmlns:u="clr-namespace:Bit.App.Utilities"
|
|
xmlns:views="clr-namespace:Bit.Core.Models.View;assembly=BitwardenCore"
|
|
x:DataType="pages:PasswordHistoryPageViewModel"
|
|
x:Name="_page"
|
|
Title="{Binding PageTitle}">
|
|
|
|
<ContentPage.BindingContext>
|
|
<pages:PasswordHistoryPageViewModel />
|
|
</ContentPage.BindingContext>
|
|
|
|
<ContentPage.Resources>
|
|
<ResourceDictionary>
|
|
<u:InverseBoolConverter x:Key="inverseBool" />
|
|
<u:DateTimeConverter x:Key="dateTime" />
|
|
</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>
|
|
<ListView x:Name="_listView"
|
|
IsVisible="{Binding ShowNoData, Converter={StaticResource inverseBool}}"
|
|
ItemsSource="{Binding History}"
|
|
VerticalOptions="FillAndExpand"
|
|
HasUnevenRows="true"
|
|
CachingStrategy="RecycleElement"
|
|
StyleClass="list, list-platform">
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate x:DataType="views:PasswordHistoryView">
|
|
<ViewCell>
|
|
<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="{Binding Password, Mode=OneWay}" />
|
|
<Label LineBreakMode="TailTruncation"
|
|
Grid.Column="0"
|
|
Grid.Row="1"
|
|
StyleClass="list-subtitle, list-subtitle-platform"
|
|
Text="{Binding LastUsedDate, Mode=OneWay, Converter={StaticResource dateTime}}" />
|
|
<controls:FaButton
|
|
StyleClass="list-row-button, list-row-button-platform"
|
|
Text=""
|
|
Command="{Binding BindingContext.CopyCommand, Source={x:Reference _page}}"
|
|
CommandParameter="{Binding .}"
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Grid.RowSpan="2" />
|
|
</Grid>
|
|
</ViewCell>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
</StackLayout>
|
|
|
|
</pages:BaseContentPage>
|