mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Corrected RecycleBin group bug
Database Settings page now has radio button for recycle bin
This commit is contained in:
@@ -315,6 +315,12 @@
|
||||
<data name="SettingsDatabaseRecycleBin.OnContent" xml:space="preserve">
|
||||
<value>Enabled</value>
|
||||
</data>
|
||||
<data name="SettingsDatabaseRecycleBinCreate.Content" xml:space="preserve">
|
||||
<value>Create a new group</value>
|
||||
</data>
|
||||
<data name="SettingsDatabaseRecycleBinExisting.Content" xml:space="preserve">
|
||||
<value>Use an existing group</value>
|
||||
</data>
|
||||
<data name="SettingsNewDatabaseDesc.Text" xml:space="preserve">
|
||||
<value>Here, you can change some default options when creating a database.</value>
|
||||
</data>
|
||||
|
@@ -315,6 +315,12 @@
|
||||
<data name="SettingsDatabaseRecycleBin.OnContent" xml:space="preserve">
|
||||
<value>Activé</value>
|
||||
</data>
|
||||
<data name="SettingsDatabaseRecycleBinCreate.Content" xml:space="preserve">
|
||||
<value>Créer un nouveau groupe</value>
|
||||
</data>
|
||||
<data name="SettingsDatabaseRecycleBinExisting.Content" xml:space="preserve">
|
||||
<value>Utiliser un groupe existant</value>
|
||||
</data>
|
||||
<data name="SettingsNewDatabaseDesc.Text" xml:space="preserve">
|
||||
<value>Ici, vous pouvez changer certains options lors de la création d'une nouvelle base de données</value>
|
||||
</data>
|
||||
|
@@ -63,7 +63,6 @@ namespace ModernKeePass.ViewModels
|
||||
{
|
||||
get
|
||||
{
|
||||
//if (_pwGroup == null) return Symbol.Add;
|
||||
var result = PwIconToSegoeMapping.GetSymbolFromIcon(_pwGroup.IconId);
|
||||
return result == Symbol.More ? Symbol.Folder : result;
|
||||
}
|
||||
|
@@ -94,7 +94,6 @@ namespace ModernKeePass.ViewModels
|
||||
{
|
||||
_database = database;
|
||||
Groups = _database?.RootGroup.Groups;
|
||||
Groups?.Insert(0, new GroupVm());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -5,35 +5,27 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:viewModels="using:ModernKeePass.ViewModels"
|
||||
xmlns:templateSelectors="using:ModernKeePass.TemplateSelectors"
|
||||
xmlns:converters="using:ModernKeePass.Converters"
|
||||
mc:Ignorable="d">
|
||||
<Page.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}" />
|
||||
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
<converters:NullToBooleanConverter x:Key="NullToBooleanConverter"/>
|
||||
</Page.Resources>
|
||||
<Page.DataContext>
|
||||
<viewModels:SettingsDatabaseVm />
|
||||
</Page.DataContext>
|
||||
|
||||
|
||||
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<ToggleSwitch x:Uid="SettingsDatabaseRecycleBin" IsOn="{Binding HasRecycleBin, Mode=TwoWay}" />
|
||||
<ComboBox ItemsSource="{Binding Source={StaticResource RecycleBinGroups}}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}" IsEnabled="{Binding HasRecycleBin}">
|
||||
<ComboBox.Resources>
|
||||
<DataTemplate x:Name="GroupFirstItem">
|
||||
<TextBlock x:Uid="GroupNewItemTextBox" />
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Name="GroupOtherItem">
|
||||
<TextBlock Text="{Binding}" />
|
||||
</DataTemplate>
|
||||
</ComboBox.Resources>
|
||||
<ComboBox.ItemTemplateSelector>
|
||||
<templateSelectors:FirstItemDataTemplateSelector
|
||||
FirstItem="{StaticResource GroupFirstItem}"
|
||||
OtherItem="{StaticResource GroupOtherItem}" />
|
||||
</ComboBox.ItemTemplateSelector>
|
||||
</ComboBox>
|
||||
<StackPanel Visibility="{Binding HasRecycleBin, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<RadioButton x:Uid="SettingsDatabaseRecycleBinCreate" GroupName="Recycle" IsChecked="True" />
|
||||
<RadioButton x:Name="RadioButton" x:Uid="SettingsDatabaseRecycleBinExisting" GroupName="Recycle" IsChecked="{Binding SelectedItem, Converter={StaticResource NullToBooleanConverter}}" />
|
||||
<ComboBox ItemsSource="{Binding Source={StaticResource RecycleBinGroups}}" SelectedItem="{Binding SelectedItem, 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}}" SelectedIndex="{Binding CipherIndex, Mode=TwoWay}" />
|
||||
<TextBlock x:Uid="SettingsDatabaseCompression" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
||||
|
Reference in New Issue
Block a user