mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Updated Settings page
Added new settings (history and clipboard) Renamed and moved Settings Vms
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<Page
|
||||
x:Class="ModernKeePass.Views.SettingsCredentialsPage"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
DataContext="{Binding Source={StaticResource Locator}, Path=Credentials}">
|
||||
|
||||
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<TextBlock x:Uid="SettingsSecurityTitle" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,0,0,0" />
|
||||
<TextBlock TextWrapping="WrapWholeWords" Margin="5,0,0,0">
|
||||
<Run x:Uid="SettingsSecurityDesc1" />
|
||||
<Run x:Uid="SettingsSecurityDesc2" FontWeight="SemiBold" />
|
||||
<Run x:Uid="SettingsSecurityDesc3" />
|
||||
</TextBlock>
|
||||
<userControls:SetCredentialsUserControl Margin="0,20,0,0" x:Uid="SettingsSecurityUpdateButton"/>
|
||||
</StackPanel>
|
||||
</Page>
|
@@ -5,9 +5,9 @@ namespace ModernKeePass.Views
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class SettingsDatabasePage
|
||||
public sealed partial class SettingsCredentialsPage
|
||||
{
|
||||
public SettingsDatabasePage()
|
||||
public SettingsCredentialsPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
@@ -1,15 +1,17 @@
|
||||
<Page
|
||||
x:Class="ModernKeePass.Views.SettingsSavePage"
|
||||
x:Class="ModernKeePass.Views.SettingsGeneralPage"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
DataContext="{Binding Source={StaticResource Locator}, Path=SettingsSave}">
|
||||
DataContext="{Binding Source={StaticResource Locator}, Path=General}">
|
||||
|
||||
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<TextBlock x:Uid="SettingsSaveDatabaseSuspendTitle" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,0,0,10"/>
|
||||
<TextBlock x:Uid="SettingsSaveDatabaseSuspendDesc" TextWrapping="WrapWholeWords" Margin="5,0,0,10"/>
|
||||
<ToggleSwitch x:Uid="SettingsSaveDatabaseSuspend" IsOn="{Binding IsSaveSuspend, Mode=TwoWay}" />
|
||||
<TextBlock x:Uid="SettingsCopyExpiration" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
||||
<TextBox Text="{Binding CopyExpiration, Mode=TwoWay}" InputScope="Number" KeyDown="UIElement_OnKeyDown" />
|
||||
</StackPanel>
|
||||
</Page>
|
@@ -0,0 +1,26 @@
|
||||
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
|
||||
|
||||
using Windows.System;
|
||||
using Windows.UI.Xaml.Input;
|
||||
|
||||
namespace ModernKeePass.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class SettingsGeneralPage
|
||||
{
|
||||
public SettingsGeneralPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void UIElement_OnKeyDown(object sender, KeyRoutedEventArgs e)
|
||||
{
|
||||
if ((e.Key < VirtualKey.NumberPad0 || e.Key > VirtualKey.NumberPad9) & (e.Key < VirtualKey.Number0 || e.Key > VirtualKey.Number9))
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
<Page
|
||||
x:Class="ModernKeePass.Views.SettingsPageFrames.SettingsHistoryPage"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
DataContext="{Binding Source={StaticResource Locator}, Path=History}">
|
||||
|
||||
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<TextBlock x:Uid="SettingsHistoryMaxCount" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
||||
<TextBox Text="{Binding MaxCount, Mode=TwoWay}" InputScope="Number" KeyDown="UIElement_OnKeyDown" />
|
||||
<TextBlock x:Uid="SettingsHistoryMaxSize" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
||||
<TextBox Text="{Binding MaxSize, Mode=TwoWay}" InputScope="Number" KeyDown="UIElement_OnKeyDown" />
|
||||
</StackPanel>
|
||||
</Page>
|
@@ -0,0 +1,26 @@
|
||||
using Windows.System;
|
||||
using Windows.UI.Xaml.Input;
|
||||
|
||||
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
|
||||
|
||||
namespace ModernKeePass.Views.SettingsPageFrames
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class SettingsHistoryPage
|
||||
{
|
||||
public SettingsHistoryPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void UIElement_OnKeyDown(object sender, KeyRoutedEventArgs e)
|
||||
{
|
||||
if ((e.Key < VirtualKey.NumberPad0 || e.Key > VirtualKey.NumberPad9) & (e.Key < VirtualKey.Number0 || e.Key > VirtualKey.Number9))
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,12 +1,12 @@
|
||||
<Page
|
||||
x:Class="ModernKeePass.Views.SettingsDatabasePage"
|
||||
x:Class="ModernKeePass.Views.SettingsPageFrames.SettingsRecycleBinPage"
|
||||
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:converters="using:ModernKeePass.Converters"
|
||||
mc:Ignorable="d"
|
||||
DataContext="{Binding Source={StaticResource Locator}, Path=SettingsDatabase}">
|
||||
DataContext="{Binding Source={StaticResource Locator}, Path=RecycleBin}">
|
||||
<Page.Resources>
|
||||
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
<converters:NullToBooleanConverter x:Key="NullToBooleanConverter"/>
|
||||
@@ -15,9 +15,6 @@
|
||||
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<StackPanel.Resources>
|
||||
<CollectionViewSource x:Name="RecycleBinGroups" Source="{Binding Groups}" />
|
||||
<CollectionViewSource x:Name="Ciphers" Source="{Binding Ciphers}" />
|
||||
<CollectionViewSource x:Name="Compressions" Source="{Binding Compressions}" />
|
||||
<CollectionViewSource x:Name="KeyDerivations" Source="{Binding KeyDerivations}" />
|
||||
</StackPanel.Resources>
|
||||
<ToggleSwitch x:Uid="SettingsDatabaseRecycleBin" IsOn="{Binding HasRecycleBin, Mode=TwoWay}" />
|
||||
<StackPanel Visibility="{Binding HasRecycleBin, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
@@ -25,11 +22,5 @@
|
||||
<RadioButton x:Name="RadioButton" x:Uid="SettingsDatabaseRecycleBinExisting" GroupName="Recycle" IsChecked="{Binding SelectedRecycleBin, Converter={StaticResource NullToBooleanConverter}}" />
|
||||
<ComboBox ItemsSource="{Binding Source={StaticResource RecycleBinGroups}}" SelectedItem="{Binding SelectedRecycleBin, Mode=TwoWay}" IsEnabled="{Binding IsChecked, ElementName=RadioButton}" />
|
||||
</StackPanel>
|
||||
<TextBlock x:Uid="SettingsDatabaseEncryption" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
||||
<ComboBox ItemsSource="{Binding Source={StaticResource Ciphers}}" DisplayMemberPath="Name" SelectedItem="{Binding SelectedCipher, Mode=TwoWay}" />
|
||||
<TextBlock x:Uid="SettingsDatabaseCompression" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
||||
<ComboBox ItemsSource="{Binding Source={StaticResource Compressions}}" SelectedItem="{Binding SelectedCompression, Mode=TwoWay}" />
|
||||
<TextBlock x:Uid="SettingsDatabaseKdf" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
||||
<ComboBox ItemsSource="{Binding Source={StaticResource KeyDerivations}}" DisplayMemberPath="Name" SelectedItem="{Binding SelectedKeyDerivation, Mode=TwoWay}" />
|
||||
</StackPanel>
|
||||
</Page>
|
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Controls.Primitives;
|
||||
using Windows.UI.Xaml.Data;
|
||||
using Windows.UI.Xaml.Input;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
|
||||
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
|
||||
|
||||
namespace ModernKeePass.Views.SettingsPageFrames
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class SettingsRecycleBinPage : Page
|
||||
{
|
||||
public SettingsRecycleBinPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,15 +0,0 @@
|
||||
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
|
||||
|
||||
namespace ModernKeePass.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class SettingsSavePage
|
||||
{
|
||||
public SettingsSavePage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@@ -4,17 +4,20 @@
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
DataContext="{Binding Source={StaticResource Locator}, Path=SettingsSecurity}">
|
||||
DataContext="{Binding Source={StaticResource Locator}, Path=Security}">
|
||||
|
||||
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<TextBlock x:Uid="SettingsSecurityTitle" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,0,0,0" />
|
||||
<TextBlock TextWrapping="WrapWholeWords" Margin="5,0,0,0">
|
||||
<Run x:Uid="SettingsSecurityDesc1" />
|
||||
<Run x:Uid="SettingsSecurityDesc2" FontWeight="SemiBold" />
|
||||
<Run x:Uid="SettingsSecurityDesc3" />
|
||||
</TextBlock>
|
||||
<userControls:SetCredentialsUserControl Margin="0,20,0,0" x:Uid="SettingsSecurityUpdateButton"/>
|
||||
<StackPanel.Resources>
|
||||
<CollectionViewSource x:Name="Ciphers" Source="{Binding Ciphers}" />
|
||||
<CollectionViewSource x:Name="Compressions" Source="{Binding Compressions}" />
|
||||
<CollectionViewSource x:Name="KeyDerivations" Source="{Binding KeyDerivations}" />
|
||||
</StackPanel.Resources>
|
||||
<TextBlock x:Uid="SettingsDatabaseEncryption" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
||||
<ComboBox ItemsSource="{Binding Source={StaticResource Ciphers}}" DisplayMemberPath="Name" SelectedItem="{Binding SelectedCipher, Mode=TwoWay}" />
|
||||
<TextBlock x:Uid="SettingsDatabaseCompression" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
||||
<ComboBox ItemsSource="{Binding Source={StaticResource Compressions}}" SelectedItem="{Binding SelectedCompression, Mode=TwoWay}" />
|
||||
<TextBlock x:Uid="SettingsDatabaseKdf" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
||||
<ComboBox ItemsSource="{Binding Source={StaticResource KeyDerivations}}" DisplayMemberPath="Name" SelectedItem="{Binding SelectedKeyDerivation, Mode=TwoWay}" />
|
||||
</StackPanel>
|
||||
</Page>
|
||||
|
Reference in New Issue
Block a user