2020-04-06 20:20:45 +02:00
|
|
|
<Page
|
|
|
|
x:Class="ModernKeePass.Views.EntryPage"
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
xmlns:userControls="using:ModernKeePass.Views.UserControls"
|
|
|
|
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
|
|
|
|
xmlns:core="using:Microsoft.Xaml.Interactions.Core"
|
|
|
|
xmlns:actions="using:ModernKeePass.Actions"
|
|
|
|
xmlns:converters="using:ModernKeePass.Converters"
|
|
|
|
xmlns:listItems="using:ModernKeePass.ViewModels.ListItems"
|
|
|
|
mc:Ignorable="d"
|
|
|
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
|
|
|
|
|
|
|
<Page.Resources>
|
|
|
|
<converters:ProgressBarLegalValuesConverter x:Key="ProgressBarLegalValuesConverter" />
|
|
|
|
<converters:DoubleToSolidColorBrushConverter x:Key="DoubleToForegroungBrushComplexityConverter" />
|
|
|
|
<converters:ColorToBrushConverter x:Key="ColorToBrushConverter" />
|
|
|
|
<converters:IconToSymbolConverter x:Key="IntToSymbolConverter" />
|
|
|
|
</Page.Resources>
|
|
|
|
|
|
|
|
<Grid>
|
|
|
|
<Pivot>
|
|
|
|
<Pivot.TitleTemplate>
|
2020-04-29 16:39:20 +02:00
|
|
|
<DataTemplate x:DataType="listItems:EntryItemVm">
|
2020-04-06 20:20:45 +02:00
|
|
|
<Grid>
|
|
|
|
<TextBlock Text="{x:Bind Name}" Style="{ThemeResource HeaderTextBlockStyle}" />
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</Pivot.TitleTemplate>
|
|
|
|
<PivotItem Header="Main" Margin="0">
|
|
|
|
<Grid Background="White">
|
|
|
|
<RelativePanel>
|
|
|
|
<StackPanel Margin="20">
|
|
|
|
<StackPanel.Resources>
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
<Setter Property="Margin" Value="0,20,0,0"/>
|
|
|
|
<Setter Property="FontSize" Value="18"/>
|
|
|
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
|
|
|
</Style>
|
|
|
|
<Style TargetType="CheckBox">
|
|
|
|
<Setter Property="Margin" Value="0,20,0,0"/>
|
|
|
|
<Setter Property="FontSize" Value="18"/>
|
|
|
|
</Style>
|
|
|
|
<Style TargetType="TextBox" x:Key="EntryTextBoxWithButtonStyle">
|
|
|
|
<Setter Property="Width" Value="350"/>
|
|
|
|
<Setter Property="Height" Value="32"/>
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
|
|
|
</Style>
|
|
|
|
</StackPanel.Resources>
|
|
|
|
<TextBlock x:Uid="EntryLogin" />
|
|
|
|
<TextBox
|
2020-04-29 16:39:20 +02:00
|
|
|
Text="{x:Bind Vm.UserName, Mode=TwoWay}"
|
2020-04-06 20:20:45 +02:00
|
|
|
Style="{StaticResource EntryTextBoxWithButtonStyle}">
|
|
|
|
<interactivity:Interaction.Behaviors>
|
|
|
|
<core:EventTriggerBehavior EventName="ButtonClick">
|
2020-04-29 16:39:20 +02:00
|
|
|
<actions:ClipboardAction Text="{x:Bind Vm.UserName}" />
|
|
|
|
<actions:ToastAction x:Uid="ToastCopyLogin" Title="{x:Bind Vm.Name}" />
|
2020-04-06 20:20:45 +02:00
|
|
|
</core:EventTriggerBehavior>
|
|
|
|
</interactivity:Interaction.Behaviors>
|
|
|
|
</TextBox>
|
|
|
|
<TextBlock x:Uid="EntryPassword" />
|
|
|
|
<PasswordBox x:Name="Password"
|
|
|
|
HorizontalAlignment="Left"
|
2020-04-29 16:39:20 +02:00
|
|
|
Password="{x:Bind Vm.Password, Mode=TwoWay}"
|
2020-04-06 20:20:45 +02:00
|
|
|
Width="350"
|
|
|
|
Height="32"
|
|
|
|
PasswordRevealMode="Hidden">
|
|
|
|
<interactivity:Interaction.Behaviors>
|
|
|
|
<core:EventTriggerBehavior EventName="ButtonClick">
|
2020-04-29 16:39:20 +02:00
|
|
|
<actions:ClipboardAction Text="{x:Bind Vm.Password}" />
|
|
|
|
<actions:ToastAction x:Uid="ToastCopyPassword" Title="{x:Bind Vm.Name}" />
|
2020-04-06 20:20:45 +02:00
|
|
|
</core:EventTriggerBehavior>
|
|
|
|
</interactivity:Interaction.Behaviors>
|
|
|
|
</PasswordBox>
|
|
|
|
<ProgressBar
|
|
|
|
Maximum="128"
|
|
|
|
Width="350"
|
|
|
|
HorizontalAlignment="Left"
|
2020-04-29 16:39:20 +02:00
|
|
|
Value="{x:Bind Vm.PasswordComplexityIndicator, ConverterParameter=0\,128, Converter={StaticResource ProgressBarLegalValuesConverter}, Mode=OneWay}"
|
|
|
|
Foreground="{x:Bind Vm.PasswordComplexityIndicator, ConverterParameter=128, Converter={StaticResource DoubleToForegroungBrushComplexityConverter}, Mode=OneWay}" />
|
2020-04-06 20:20:45 +02:00
|
|
|
<CheckBox
|
|
|
|
x:Uid="EntryShowPassword"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Margin="0">
|
|
|
|
<interactivity:Interaction.Behaviors>
|
|
|
|
<core:EventTriggerBehavior EventName="Checked">
|
|
|
|
<core:ChangePropertyAction TargetObject="{Binding ElementName=Password}" PropertyName="PasswordRevealMode" Value="Visible" />
|
|
|
|
</core:EventTriggerBehavior>
|
|
|
|
<core:EventTriggerBehavior EventName="Unchecked">
|
|
|
|
<core:ChangePropertyAction TargetObject="{Binding ElementName=Password}" PropertyName="PasswordRevealMode" Value="Hidden" />
|
|
|
|
</core:EventTriggerBehavior>
|
|
|
|
</interactivity:Interaction.Behaviors>
|
|
|
|
</CheckBox>
|
|
|
|
<TextBlock TextWrapping="Wrap" Text="URL" FontSize="18"/>
|
|
|
|
<TextBox
|
2020-04-29 16:39:20 +02:00
|
|
|
Text="{x:Bind Vm.Url, Mode=TwoWay}"
|
2020-04-06 20:20:45 +02:00
|
|
|
MaxLength="256"
|
|
|
|
Style="{StaticResource EntryTextBoxWithButtonStyle}">
|
|
|
|
<interactivity:Interaction.Behaviors>
|
|
|
|
<core:EventTriggerBehavior EventName="ButtonClick">
|
2020-04-29 16:39:20 +02:00
|
|
|
<actions:NavigateToUrlAction Url="{x:Bind Vm.Url}" />
|
2020-04-06 20:20:45 +02:00
|
|
|
</core:EventTriggerBehavior>
|
|
|
|
</interactivity:Interaction.Behaviors>
|
|
|
|
</TextBox>
|
|
|
|
<TextBlock x:Uid="EntryNotes" />
|
|
|
|
<TextBox
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
TextWrapping="Wrap"
|
2020-04-29 16:39:20 +02:00
|
|
|
Text="{x:Bind Vm.Notes, Mode=TwoWay}"
|
2020-04-06 20:20:45 +02:00
|
|
|
Width="350"
|
|
|
|
Height="200"
|
|
|
|
AcceptsReturn="True"
|
|
|
|
IsSpellCheckEnabled="True" />
|
|
|
|
<CheckBox
|
|
|
|
x:Uid="EntryExpirationDate"
|
2020-04-29 16:39:20 +02:00
|
|
|
IsChecked="{x:Bind Vm.HasExpirationDate, Mode=TwoWay}" />
|
2020-04-06 20:20:45 +02:00
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<SymbolIcon
|
|
|
|
Grid.Column="0"
|
|
|
|
Symbol="Important"
|
|
|
|
Foreground="DarkRed"
|
2020-04-29 16:39:20 +02:00
|
|
|
Visibility="{x:Bind Vm.HasExpired}">
|
2020-04-06 20:20:45 +02:00
|
|
|
<ToolTipService.ToolTip>
|
|
|
|
<ToolTip x:Uid="EntryExpirationTooltip" />
|
|
|
|
</ToolTipService.ToolTip>
|
|
|
|
</SymbolIcon>
|
|
|
|
<StackPanel
|
|
|
|
Grid.Column="1"
|
|
|
|
x:Name="ExpirationDatePanel"
|
2020-04-29 16:39:20 +02:00
|
|
|
Visibility="{x:Bind Vm.HasExpirationDate, Mode=OneWay}">
|
2020-04-06 20:20:45 +02:00
|
|
|
<DatePicker
|
2020-04-29 16:39:20 +02:00
|
|
|
Date="{x:Bind Vm.ExpiryDate, Mode=TwoWay}"
|
2020-04-06 20:20:45 +02:00
|
|
|
Style="{StaticResource MainColorDatePicker}" />
|
|
|
|
<TimePicker
|
|
|
|
Margin="0,10,0,0"
|
2020-04-29 16:39:20 +02:00
|
|
|
Time="{x:Bind Vm.ExpiryTime, Mode=TwoWay}"
|
2020-04-06 20:20:45 +02:00
|
|
|
Style="{StaticResource MainColorTimePicker}" />
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
|
|
</RelativePanel>
|
|
|
|
</Grid>
|
|
|
|
</PivotItem>
|
|
|
|
<PivotItem Header="Additional">
|
|
|
|
<StackPanel Orientation="Vertical">
|
|
|
|
<TextBlock x:Uid="EntryIcon" />
|
|
|
|
<userControls:SymbolPickerUserControl
|
2020-04-29 16:39:20 +02:00
|
|
|
SelectedSymbol="{x:Bind Vm.Icon, Converter={StaticResource IntToSymbolConverter}, ConverterParameter=0, Mode=TwoWay}" />
|
2020-04-06 20:20:45 +02:00
|
|
|
<TextBlock x:Uid="EntryBackgroundColor" />
|
|
|
|
<userControls:ColorPickerUserControl
|
|
|
|
HorizontalAlignment="Left"
|
2020-04-29 16:39:20 +02:00
|
|
|
SelectedColor="{x:Bind Vm.BackgroundColor, Converter={StaticResource ColorToBrushConverter}, Mode=TwoWay}" />
|
2020-04-06 20:20:45 +02:00
|
|
|
<TextBlock x:Uid="EntryForegroundColor" />
|
|
|
|
<userControls:ColorPickerUserControl
|
2020-04-29 16:39:20 +02:00
|
|
|
SelectedColor="{x:Bind Vm.ForegroundColor, Converter={StaticResource ColorToBrushConverter}, Mode=TwoWay}" />
|
2020-04-06 20:20:45 +02:00
|
|
|
</StackPanel>
|
|
|
|
</PivotItem>
|
|
|
|
<PivotItem Header="History" />
|
|
|
|
</Pivot>
|
|
|
|
</Grid>
|
|
|
|
</Page>
|
|
|
|
|