mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
WIP Return of the Breadcrumb
Entry Title field added as part of the entry page Code cleanup
This commit is contained in:
@@ -205,12 +205,6 @@ namespace ModernKeePass.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsEditMode
|
|
||||||
{
|
|
||||||
get { return IsCurrentEntry && _isEditMode; }
|
|
||||||
set { Set(() => IsEditMode, ref _isEditMode, value); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public RelayCommand SaveCommand { get; }
|
public RelayCommand SaveCommand { get; }
|
||||||
public RelayCommand<string> MoveCommand { get; }
|
public RelayCommand<string> MoveCommand { get; }
|
||||||
public RelayCommand RestoreCommand { get; }
|
public RelayCommand RestoreCommand { get; }
|
||||||
@@ -238,7 +232,6 @@ namespace ModernKeePass.ViewModels
|
|||||||
private EntryVm _current;
|
private EntryVm _current;
|
||||||
private int _selectedIndex;
|
private int _selectedIndex;
|
||||||
private int _additionalFieldSelectedIndex = -1;
|
private int _additionalFieldSelectedIndex = -1;
|
||||||
private bool _isEditMode;
|
|
||||||
private bool _isDirty;
|
private bool _isDirty;
|
||||||
|
|
||||||
public EntryDetailVm(IMediator mediator, INavigationService navigation, IResourceProxy resource, IDialogService dialog, INotificationService notification, IFileProxy file, ICryptographyClient cryptography, IDateTime dateTime)
|
public EntryDetailVm(IMediator mediator, INavigationService navigation, IResourceProxy resource, IDialogService dialog, INotificationService notification, IFileProxy file, ICryptographyClient cryptography, IDateTime dateTime)
|
||||||
|
@@ -80,7 +80,7 @@ namespace ModernKeePass.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ParentGroupName => _parent?.Title;
|
public string ParentGroupName => _parent == null ? Database.Name : _parent.Title;
|
||||||
|
|
||||||
public bool IsRecycleOnDelete => Database.IsRecycleBinEnabled && !IsInRecycleBin;
|
public bool IsRecycleOnDelete => Database.IsRecycleBinEnabled && !IsInRecycleBin;
|
||||||
|
|
||||||
|
@@ -15,9 +15,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using CommonServiceLocator;
|
using CommonServiceLocator;
|
||||||
using GalaSoft.MvvmLight.Ioc;
|
using GalaSoft.MvvmLight.Ioc;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using ModernKeePass.Domain.Interfaces;
|
|
||||||
using GalaSoft.MvvmLight;
|
|
||||||
|
|
||||||
namespace ModernKeePass.ViewModels
|
namespace ModernKeePass.ViewModels
|
||||||
{
|
{
|
||||||
@@ -32,18 +29,6 @@ namespace ModernKeePass.ViewModels
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public ViewModelLocator()
|
public ViewModelLocator()
|
||||||
{
|
{
|
||||||
if (ViewModelBase.IsInDesignModeStatic)
|
|
||||||
{
|
|
||||||
// Create design time view services and models
|
|
||||||
//SimpleIoc.Default.Register<IDataService, DesignDataService>();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Create run time view services and models
|
|
||||||
//SimpleIoc.Default.Register<IDataService, DataService>();IDataService
|
|
||||||
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<IDateTime>());
|
|
||||||
}
|
|
||||||
|
|
||||||
SimpleIoc.Default.Register<SettingsVm>();
|
SimpleIoc.Default.Register<SettingsVm>();
|
||||||
SimpleIoc.Default.Register<MainVm>();
|
SimpleIoc.Default.Register<MainVm>();
|
||||||
SimpleIoc.Default.Register<GroupDetailVm>();
|
SimpleIoc.Default.Register<GroupDetailVm>();
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Grid Grid.Column="1">
|
<Grid Grid.Column="1">
|
||||||
<Hub x:Name="Hub" Padding="0">
|
<Hub x:Name="Hub" Padding="0">
|
||||||
<Hub.Resources>
|
<Hub.Resources>
|
||||||
@@ -51,6 +52,15 @@
|
|||||||
<Setter Property="FontSize" Value="18"/>
|
<Setter Property="FontSize" Value="18"/>
|
||||||
</Style>
|
</Style>
|
||||||
</StackPanel.Resources>
|
</StackPanel.Resources>
|
||||||
|
<TextBlock x:Uid="EntryTitle" Style="{StaticResource EntryTextBlockStyle}" />
|
||||||
|
<local:TextBoxWithButton x:Uid="TitleTextBox" Text="{Binding Title, Mode=TwoWay}" Style="{StaticResource TextBoxWithButtonStyle}" ButtonContent="" IsEnabled="{Binding IsCurrentEntry}">
|
||||||
|
<interactivity:Interaction.Behaviors>
|
||||||
|
<core:EventTriggerBehavior EventName="ButtonClick">
|
||||||
|
<actions:ClipboardAction Text="{Binding Title}" />
|
||||||
|
<actions:ToastAction x:Uid="ToastCopyTitle" Title="{Binding Title}" />
|
||||||
|
</core:EventTriggerBehavior>
|
||||||
|
</interactivity:Interaction.Behaviors>
|
||||||
|
</local:TextBoxWithButton>
|
||||||
<TextBlock x:Uid="EntryLogin" Style="{StaticResource EntryTextBlockStyle}" />
|
<TextBlock x:Uid="EntryLogin" Style="{StaticResource EntryTextBlockStyle}" />
|
||||||
<local:TextBoxWithButton x:Uid="LoginTextBox" Text="{Binding UserName, Mode=TwoWay}" Style="{StaticResource TextBoxWithButtonStyle}" ButtonContent="" IsEnabled="{Binding IsCurrentEntry}">
|
<local:TextBoxWithButton x:Uid="LoginTextBox" Text="{Binding UserName, Mode=TwoWay}" Style="{StaticResource TextBoxWithButtonStyle}" ButtonContent="" IsEnabled="{Binding IsCurrentEntry}">
|
||||||
<interactivity:Interaction.Behaviors>
|
<interactivity:Interaction.Behaviors>
|
||||||
@@ -220,57 +230,35 @@
|
|||||||
<Grid Grid.Row="0" Background="{ThemeResource AppBarBackgroundThemeBrush}">
|
<Grid Grid.Row="0" Background="{ThemeResource AppBarBackgroundThemeBrush}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="{StaticResource MenuWidthGridLength}"/>
|
<ColumnDefinition Width="{StaticResource MenuWidthGridLength}"/>
|
||||||
<ColumnDefinition Width="{StaticResource MenuWidthGridLength}"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Grid.Column="0"
|
<Button Grid.Column="0"
|
||||||
Command="{Binding GoBackCommand}"
|
Command="{Binding GoBackCommand}"
|
||||||
Height="{StaticResource MenuHeight}"
|
Height="{StaticResource MenuHeight}"
|
||||||
Width="{StaticResource MenuWidth}"
|
Width="{StaticResource MenuWidth}"
|
||||||
AutomationProperties.Name="Back"
|
AutomationProperties.Name="Back"
|
||||||
AutomationProperties.AutomationId="BackButton"
|
AutomationProperties.AutomationId="BackButton"
|
||||||
AutomationProperties.ItemType="Navigation Button"
|
AutomationProperties.ItemType="Navigation Button"
|
||||||
Style="{StaticResource NoBorderButtonStyle}">
|
Style="{StaticResource NoBorderButtonStyle}">
|
||||||
<SymbolIcon Symbol="Back" />
|
<SymbolIcon Symbol="Back" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button Grid.Column="1"
|
<Button Grid.Column="1"
|
||||||
Height="{StaticResource MenuHeight}"
|
Height="{StaticResource MenuHeight}"
|
||||||
Width="{StaticResource MenuWidth}"
|
|
||||||
Command="{Binding GoToParentCommand}"
|
Command="{Binding GoToParentCommand}"
|
||||||
Style="{StaticResource NoBorderButtonStyle}">
|
Style="{StaticResource NoBorderButtonStyle}">
|
||||||
<SymbolIcon Symbol="Up" />
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<SymbolIcon Symbol="Up" />
|
||||||
|
<TextBlock x:Name="UpButtonText" Margin="10,2,0,0" Text="{Binding ParentGroupName}" FontStyle="Italic" HorizontalAlignment="Center" />
|
||||||
|
</StackPanel>
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<ToolTip Content="{Binding ParentGroupName}" />
|
<ToolTip Content="{Binding ParentGroupName}" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
</Button>
|
</Button>
|
||||||
<Viewbox Grid.Column="2" MaxHeight="200">
|
|
||||||
<SymbolIcon Symbol="{Binding Icon}" Width="100" Height="70" />
|
|
||||||
</Viewbox>
|
|
||||||
<TextBox Grid.Column="3"
|
|
||||||
x:Uid="EntryTitle"
|
|
||||||
x:Name="TitleTextBox"
|
|
||||||
Text="{Binding Title, Mode=TwoWay}"
|
|
||||||
Background="Transparent"
|
|
||||||
IsHitTestVisible="{Binding IsEditMode}"
|
|
||||||
FontSize="20"
|
|
||||||
FontWeight="Light"
|
|
||||||
TextWrapping="NoWrap"
|
|
||||||
VerticalAlignment="Center">
|
|
||||||
<interactivity:Interaction.Behaviors>
|
|
||||||
<core:DataTriggerBehavior Binding="{Binding IsEditMode}" Value="True">
|
|
||||||
<actions:SetupFocusAction TargetObject="{Binding ElementName=TitleTextBox}" />
|
|
||||||
<core:ChangePropertyAction TargetObject="{Binding ElementName=TitleTextBox}" PropertyName="BorderThickness" Value="2" />
|
|
||||||
</core:DataTriggerBehavior>
|
|
||||||
<core:DataTriggerBehavior Binding="{Binding IsEditMode}" Value="False">
|
|
||||||
<core:ChangePropertyAction TargetObject="{Binding ElementName=TitleTextBox}" PropertyName="BorderThickness" Value="0" />
|
|
||||||
</core:DataTriggerBehavior>
|
|
||||||
</interactivity:Interaction.Behaviors>
|
|
||||||
</TextBox>
|
|
||||||
<controls:TopMenuUserControl
|
<controls:TopMenuUserControl
|
||||||
x:Name="TopMenu" Grid.Column="4"
|
x:Name="TopMenu" Grid.Column="4"
|
||||||
IsEditButtonChecked="{Binding IsEditMode, Mode=TwoWay}"
|
|
||||||
MoveButtonVisibility="{Binding IsCurrentEntry, Converter={StaticResource BooleanToVisibilityConverter}}"
|
MoveButtonVisibility="{Binding IsCurrentEntry, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
RestoreButtonVisibility="{Binding IsCurrentEntry, Converter={StaticResource InverseBooleanToVisibilityConverter}}"
|
RestoreButtonVisibility="{Binding IsCurrentEntry, Converter={StaticResource InverseBooleanToVisibilityConverter}}"
|
||||||
SaveCommand="{Binding SaveCommand}"
|
SaveCommand="{Binding SaveCommand}"
|
||||||
@@ -291,6 +279,9 @@
|
|||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Hub" Storyboard.TargetProperty="Margin">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Hub" Storyboard.TargetProperty="Margin">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="-30,0,0,0"/>
|
<DiscreteObjectKeyFrame KeyTime="0" Value="-30,0,0,0"/>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="UpButtonText" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
<VisualState x:Name="Medium">
|
<VisualState x:Name="Medium">
|
||||||
@@ -298,6 +289,9 @@
|
|||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Hub" Storyboard.TargetProperty="Margin">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Hub" Storyboard.TargetProperty="Margin">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="0,0,0,0"/>
|
<DiscreteObjectKeyFrame KeyTime="0" Value="0,0,0,0"/>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="UpButtonText" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
<VisualState x:Name="Large">
|
<VisualState x:Name="Large">
|
||||||
@@ -305,6 +299,9 @@
|
|||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Hub" Storyboard.TargetProperty="Margin">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Hub" Storyboard.TargetProperty="Margin">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="0,0,0,0"/>
|
<DiscreteObjectKeyFrame KeyTime="0" Value="0,0,0,0"/>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="UpButtonText" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
</VisualStateGroup>
|
</VisualStateGroup>
|
||||||
|
@@ -28,7 +28,6 @@ namespace ModernKeePass.Views
|
|||||||
if (args != null)
|
if (args != null)
|
||||||
{
|
{
|
||||||
await Model.Initialize(args.Id);
|
await Model.Initialize(args.Id);
|
||||||
Model.IsEditMode = args.IsNew;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -174,6 +174,7 @@
|
|||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
x:Name="HamburgerMenu"
|
x:Name="HamburgerMenu"
|
||||||
x:Uid="GroupsLeftListView"
|
x:Uid="GroupsLeftListView"
|
||||||
|
HeaderLabel="{Binding Title}"
|
||||||
ItemsSource="{Binding Groups}"
|
ItemsSource="{Binding Groups}"
|
||||||
CanDragItems="{Binding IsEditMode}"
|
CanDragItems="{Binding IsEditMode}"
|
||||||
ActionButtonCommand="{Binding CreateGroupCommand}"
|
ActionButtonCommand="{Binding CreateGroupCommand}"
|
||||||
@@ -189,7 +190,7 @@
|
|||||||
<Grid Grid.Row="0" Background="{ThemeResource AppBarBackgroundThemeBrush}">
|
<Grid Grid.Row="0" Background="{ThemeResource AppBarBackgroundThemeBrush}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="{StaticResource MenuWidthGridLength}"/>
|
<ColumnDefinition Width="{StaticResource MenuWidthGridLength}"/>
|
||||||
<ColumnDefinition Width="{StaticResource MenuWidthGridLength}"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
@@ -206,42 +207,25 @@
|
|||||||
</Button>
|
</Button>
|
||||||
<Button Grid.Column="1"
|
<Button Grid.Column="1"
|
||||||
Height="{StaticResource MenuHeight}"
|
Height="{StaticResource MenuHeight}"
|
||||||
Width="{StaticResource MenuWidth}"
|
|
||||||
Command="{Binding GoToParentCommand}"
|
Command="{Binding GoToParentCommand}"
|
||||||
Style="{StaticResource NoBorderButtonStyle}">
|
Style="{StaticResource NoBorderButtonStyle}">
|
||||||
<SymbolIcon Symbol="Up" />
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<SymbolIcon Symbol="Up" />
|
||||||
|
<TextBlock x:Name="UpButtonText" Margin="10,2,0,0" Text="{Binding ParentGroupName}" FontStyle="Italic" HorizontalAlignment="Center" />
|
||||||
|
</StackPanel>
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<ToolTip Content="{Binding ParentGroupName}" />
|
<ToolTip Content="{Binding ParentGroupName}" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
</Button>
|
</Button>
|
||||||
<Viewbox Grid.Column="2" MaxHeight="200" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}">
|
<!--<Viewbox Grid.Column="2" MaxHeight="200" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||||
<userControls:SymbolPickerUserControl Width="100" Height="70" SelectedSymbol="{Binding Icon, Mode=TwoWay}" />
|
<userControls:SymbolPickerUserControl Width="100" Height="70" SelectedSymbol="{Binding Icon, Mode=TwoWay}" />
|
||||||
</Viewbox>
|
</Viewbox>
|
||||||
<Viewbox Grid.Column="2" MaxHeight="200" Visibility="{Binding IsEditMode, Converter={StaticResource InverseBooleanToVisibilityConverter}}">
|
<Viewbox Grid.Column="2" MaxHeight="200" Visibility="{Binding IsEditMode, Converter={StaticResource InverseBooleanToVisibilityConverter}}">
|
||||||
<SymbolIcon Symbol="{Binding Icon}" Width="100" Height="70" />
|
<SymbolIcon Symbol="{Binding Icon}" Width="100" Height="70" />
|
||||||
</Viewbox>
|
</Viewbox>-->
|
||||||
<TextBox Grid.Column="3"
|
|
||||||
x:Uid="GroupTitle"
|
|
||||||
x:Name="TitleTextBox"
|
|
||||||
Text="{Binding Title, Mode=TwoWay}"
|
|
||||||
Background="Transparent"
|
|
||||||
IsHitTestVisible="{Binding IsEditMode}"
|
|
||||||
FontSize="20"
|
|
||||||
FontWeight="Light"
|
|
||||||
TextWrapping="NoWrap"
|
|
||||||
VerticalAlignment="Center">
|
|
||||||
<interactivity:Interaction.Behaviors>
|
|
||||||
<core:DataTriggerBehavior Binding="{Binding IsEditMode}" Value="True">
|
|
||||||
<actions:SetupFocusAction TargetObject="{Binding ElementName=TitleTextBox}" />
|
|
||||||
<core:ChangePropertyAction TargetObject="{Binding ElementName=TitleTextBox}" PropertyName="BorderThickness" Value="2" />
|
|
||||||
</core:DataTriggerBehavior>
|
|
||||||
<core:DataTriggerBehavior Binding="{Binding IsEditMode}" Value="False">
|
|
||||||
<core:ChangePropertyAction TargetObject="{Binding ElementName=TitleTextBox}" PropertyName="BorderThickness" Value="0" />
|
|
||||||
</core:DataTriggerBehavior>
|
|
||||||
</interactivity:Interaction.Behaviors>
|
|
||||||
</TextBox>
|
|
||||||
<userControls:TopMenuUserControl x:Name="TopMenu" Grid.Column="4"
|
<userControls:TopMenuUserControl x:Name="TopMenu" Grid.Column="4"
|
||||||
SortButtonVisibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}"
|
SortButtonVisibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
|
EditButtonVisibility="Visible"
|
||||||
IsEditButtonChecked="{Binding IsEditMode, Mode=TwoWay}"
|
IsEditButtonChecked="{Binding IsEditMode, Mode=TwoWay}"
|
||||||
SaveCommand="{Binding SaveCommand}"
|
SaveCommand="{Binding SaveCommand}"
|
||||||
MoveCommand="{Binding MoveCommand}"
|
MoveCommand="{Binding MoveCommand}"
|
||||||
@@ -269,6 +253,9 @@
|
|||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SemanticZoom" Storyboard.TargetProperty="Margin">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SemanticZoom" Storyboard.TargetProperty="Margin">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="-60,0,0,0"/>
|
<DiscreteObjectKeyFrame KeyTime="0" Value="-60,0,0,0"/>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="UpButtonText" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
<VisualState x:Name="Medium">
|
<VisualState x:Name="Medium">
|
||||||
@@ -279,6 +266,9 @@
|
|||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SemanticZoom" Storyboard.TargetProperty="Margin">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SemanticZoom" Storyboard.TargetProperty="Margin">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="0,0,0,0"/>
|
<DiscreteObjectKeyFrame KeyTime="0" Value="0,0,0,0"/>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="UpButtonText" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
<VisualState x:Name="Large">
|
<VisualState x:Name="Large">
|
||||||
@@ -292,6 +282,9 @@
|
|||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SemanticZoom" Storyboard.TargetProperty="Margin">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SemanticZoom" Storyboard.TargetProperty="Margin">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="0,0,0,0"/>
|
<DiscreteObjectKeyFrame KeyTime="0" Value="0,0,0,0"/>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="UpButtonText" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
</VisualStateGroup>
|
</VisualStateGroup>
|
||||||
|
@@ -61,6 +61,9 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<ToggleButton x:Name="HamburgerButton" Style="{StaticResource HamburgerToggleButton}" IsChecked="{Binding IsOpen, ElementName=UserControl, Mode=TwoWay}" Unchecked="ToggleButton_OnUnchecked">
|
<ToggleButton x:Name="HamburgerButton" Style="{StaticResource HamburgerToggleButton}" IsChecked="{Binding IsOpen, ElementName=UserControl, Mode=TwoWay}" Unchecked="ToggleButton_OnUnchecked">
|
||||||
|
<ToolTipService.ToolTip>
|
||||||
|
<ToolTip Content="{Binding HeaderLabel, ElementName=UserControl}" />
|
||||||
|
</ToolTipService.ToolTip>
|
||||||
<interactivity:Interaction.Behaviors>
|
<interactivity:Interaction.Behaviors>
|
||||||
<core:EventTriggerBehavior EventName="Checked">
|
<core:EventTriggerBehavior EventName="Checked">
|
||||||
<core:GoToStateAction StateName="Expanded" />
|
<core:GoToStateAction StateName="Expanded" />
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using Windows.System;
|
using Windows.System;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
@@ -26,7 +25,7 @@ namespace ModernKeePass.Views.UserControls
|
|||||||
typeof(string),
|
typeof(string),
|
||||||
typeof(HamburgerMenuUserControl),
|
typeof(HamburgerMenuUserControl),
|
||||||
new PropertyMetadata("Header", (o, args) => { }));
|
new PropertyMetadata("Header", (o, args) => { }));
|
||||||
|
|
||||||
public string ButtonLabel
|
public string ButtonLabel
|
||||||
{
|
{
|
||||||
get { return (string)GetValue(ButtonLabelProperty); }
|
get { return (string)GetValue(ButtonLabelProperty); }
|
||||||
|
@@ -98,7 +98,7 @@
|
|||||||
</MenuFlyout>
|
</MenuFlyout>
|
||||||
</Button.Flyout>
|
</Button.Flyout>
|
||||||
</Button>
|
</Button>
|
||||||
<ToggleButton Command="{Binding EditCommand, ElementName=UserControl}" IsChecked="{Binding IsEditButtonChecked, ElementName=UserControl, Mode=TwoWay}" Checked="EditButton_Click" Style="{StaticResource MenuToggleButtonStyle}">
|
<ToggleButton Visibility="{Binding EditButtonVisibility, ElementName=UserControl}" Command="{Binding EditCommand, ElementName=UserControl}" IsChecked="{Binding IsEditButtonChecked, ElementName=UserControl, Mode=TwoWay}" Checked="EditButton_Click" Style="{StaticResource MenuToggleButtonStyle}">
|
||||||
<SymbolIcon Symbol="Edit">
|
<SymbolIcon Symbol="Edit">
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<ToolTip x:Uid="TopMenuEditButton" />
|
<ToolTip x:Uid="TopMenuEditButton" />
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
<MenuFlyout Opening="OverflowFlyout_OnOpening">
|
<MenuFlyout Opening="OverflowFlyout_OnOpening">
|
||||||
<MenuFlyoutItem x:Uid="TopMenuSaveFlyout" x:Name="SaveFlyout" />
|
<MenuFlyoutItem x:Uid="TopMenuSaveFlyout" x:Name="SaveFlyout" />
|
||||||
<MenuFlyoutItem x:Uid="TopMenuRestoreFlyout" x:Name="RestoreFlyout" Visibility="{Binding RestoreButtonVisibility, ElementName=UserControl}" />
|
<MenuFlyoutItem x:Uid="TopMenuRestoreFlyout" x:Name="RestoreFlyout" Visibility="{Binding RestoreButtonVisibility, ElementName=UserControl}" />
|
||||||
<ToggleMenuFlyoutItem x:Uid="TopMenuEditFlyout" x:Name="EditFlyout" IsChecked="{Binding IsEditButtonChecked, ElementName=UserControl, Mode=TwoWay}" Click="EditButton_Click" />
|
<ToggleMenuFlyoutItem x:Uid="TopMenuEditFlyout" x:Name="EditFlyout" Visibility="{Binding EditButtonVisibility, ElementName=UserControl}" IsChecked="{Binding IsEditButtonChecked, ElementName=UserControl, Mode=TwoWay}" Click="EditButton_Click" />
|
||||||
<MenuFlyoutItem x:Uid="TopMenuDeleteFlyout" x:Name="DeleteFlyout" />
|
<MenuFlyoutItem x:Uid="TopMenuDeleteFlyout" x:Name="DeleteFlyout" />
|
||||||
<MenuFlyoutItem x:Uid="TopMenuSortEntriesFlyout" x:Name="SortEntriesFlyout" Visibility="{Binding SortButtonVisibility, ElementName=UserControl}" />
|
<MenuFlyoutItem x:Uid="TopMenuSortEntriesFlyout" x:Name="SortEntriesFlyout" Visibility="{Binding SortButtonVisibility, ElementName=UserControl}" />
|
||||||
<MenuFlyoutItem x:Uid="TopMenuSortGroupsFlyout" x:Name="SortGroupsFlyout" Visibility="{Binding SortButtonVisibility, ElementName=UserControl}" />
|
<MenuFlyoutItem x:Uid="TopMenuSortGroupsFlyout" x:Name="SortGroupsFlyout" Visibility="{Binding SortButtonVisibility, ElementName=UserControl}" />
|
||||||
|
@@ -39,6 +39,18 @@ namespace ModernKeePass.Views.UserControls
|
|||||||
typeof(TopMenuUserControl),
|
typeof(TopMenuUserControl),
|
||||||
new PropertyMetadata(null, (o, args) => { }));
|
new PropertyMetadata(null, (o, args) => { }));
|
||||||
|
|
||||||
|
public Visibility EditButtonVisibility
|
||||||
|
{
|
||||||
|
get { return (Visibility)GetValue(EditButtonVisibilityProperty); }
|
||||||
|
set { SetValue(EditButtonVisibilityProperty, value); }
|
||||||
|
}
|
||||||
|
public static readonly DependencyProperty EditButtonVisibilityProperty =
|
||||||
|
DependencyProperty.Register(
|
||||||
|
nameof(EditButtonVisibility),
|
||||||
|
typeof(Visibility),
|
||||||
|
typeof(TopMenuUserControl),
|
||||||
|
new PropertyMetadata(Visibility.Collapsed, (o, args) => { }));
|
||||||
|
|
||||||
public ICommand DeleteCommand
|
public ICommand DeleteCommand
|
||||||
{
|
{
|
||||||
get { return (ICommand)GetValue(DeleteCommandProperty); }
|
get { return (ICommand)GetValue(DeleteCommandProperty); }
|
||||||
|
@@ -372,9 +372,6 @@
|
|||||||
<data name="GroupsLeftListView.ButtonLabel" xml:space="preserve">
|
<data name="GroupsLeftListView.ButtonLabel" xml:space="preserve">
|
||||||
<value>New group</value>
|
<value>New group</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GroupsLeftListView.HeaderLabel" xml:space="preserve">
|
|
||||||
<value>Groups</value>
|
|
||||||
</data>
|
|
||||||
<data name="HistoryLeftListView.HeaderLabel" xml:space="preserve">
|
<data name="HistoryLeftListView.HeaderLabel" xml:space="preserve">
|
||||||
<value>History</value>
|
<value>History</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -453,9 +450,6 @@
|
|||||||
<data name="ToastUpdateDatabase.Title" xml:space="preserve">
|
<data name="ToastUpdateDatabase.Title" xml:space="preserve">
|
||||||
<value>Composite Key</value>
|
<value>Composite Key</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="EntryTitle.PlaceholderText" xml:space="preserve">
|
|
||||||
<value>New entry name...</value>
|
|
||||||
</data>
|
|
||||||
<data name="SearchButtonLabel.Text" xml:space="preserve">
|
<data name="SearchButtonLabel.Text" xml:space="preserve">
|
||||||
<value>Search</value>
|
<value>Search</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -570,4 +564,13 @@
|
|||||||
<data name="PasswordGenerationButton.ButtonContent" xml:space="preserve">
|
<data name="PasswordGenerationButton.ButtonContent" xml:space="preserve">
|
||||||
<value>Random</value>
|
<value>Random</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="EntryTitle.Text" xml:space="preserve">
|
||||||
|
<value>Title</value>
|
||||||
|
</data>
|
||||||
|
<data name="TitleTextBox.ButtonTooltip" xml:space="preserve">
|
||||||
|
<value>Copy title</value>
|
||||||
|
</data>
|
||||||
|
<data name="ToastCopyTitle.Message" xml:space="preserve">
|
||||||
|
<value>Title copied to clipboard</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@@ -372,9 +372,6 @@
|
|||||||
<data name="GroupsLeftListView.ButtonLabel" xml:space="preserve">
|
<data name="GroupsLeftListView.ButtonLabel" xml:space="preserve">
|
||||||
<value>Nouveau groupe</value>
|
<value>Nouveau groupe</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GroupsLeftListView.HeaderLabel" xml:space="preserve">
|
|
||||||
<value>Groupes</value>
|
|
||||||
</data>
|
|
||||||
<data name="HistoryLeftListView.HeaderLabel" xml:space="preserve">
|
<data name="HistoryLeftListView.HeaderLabel" xml:space="preserve">
|
||||||
<value>Historique</value>
|
<value>Historique</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -453,9 +450,6 @@
|
|||||||
<data name="ToastUpdateDatabase.Title" xml:space="preserve">
|
<data name="ToastUpdateDatabase.Title" xml:space="preserve">
|
||||||
<value>Clé maître</value>
|
<value>Clé maître</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="EntryTitle.PlaceholderText" xml:space="preserve">
|
|
||||||
<value>Nom de la nouvelle entrée...</value>
|
|
||||||
</data>
|
|
||||||
<data name="SearchButtonLabel.Text" xml:space="preserve">
|
<data name="SearchButtonLabel.Text" xml:space="preserve">
|
||||||
<value>Recherche</value>
|
<value>Recherche</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -570,4 +564,13 @@
|
|||||||
<data name="PasswordGenerationButton.ButtonContent" xml:space="preserve">
|
<data name="PasswordGenerationButton.ButtonContent" xml:space="preserve">
|
||||||
<value>Aléatoire</value>
|
<value>Aléatoire</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="EntryTitle.Text" xml:space="preserve">
|
||||||
|
<value>Titre</value>
|
||||||
|
</data>
|
||||||
|
<data name="TitleTextBox.ButtonTooltip" xml:space="preserve">
|
||||||
|
<value>Copier le titre</value>
|
||||||
|
</data>
|
||||||
|
<data name="ToastCopyTitle.Message" xml:space="preserve">
|
||||||
|
<value>Titre copié dans le presse-papiers</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@@ -21,6 +21,7 @@ using MediatR;
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using ModernKeePass.Application.Common.Interfaces;
|
using ModernKeePass.Application.Common.Interfaces;
|
||||||
using ModernKeePass.ViewModels.Settings;
|
using ModernKeePass.ViewModels.Settings;
|
||||||
|
using ModernKeePass.Domain.Interfaces;
|
||||||
|
|
||||||
namespace ModernKeePass.ViewModels
|
namespace ModernKeePass.ViewModels
|
||||||
{
|
{
|
||||||
@@ -45,7 +46,7 @@ namespace ModernKeePass.ViewModels
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Create run time view services and models
|
// Create run time view services and models
|
||||||
//SimpleIoc.Default.Register<IDataService, DataService>();IDataService
|
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<IDateTime>());
|
||||||
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<IMediator>());
|
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<IMediator>());
|
||||||
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<IRecentProxy>());
|
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<IRecentProxy>());
|
||||||
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<IResourceProxy>());
|
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<IResourceProxy>());
|
||||||
|
Reference in New Issue
Block a user