mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
KeepassLib version 2.38
Added a new settings page to allow auto-save or not App now resumes correctly from suspend Settings service now allows getting default values Removed french special characters from metadata Code cleanup
This commit is contained in:
@@ -32,9 +32,11 @@ namespace ModernKeePass
|
|||||||
AppCenter.Start("79d23520-a486-4f63-af81-8d90bf4e1bea", typeof(Analytics), typeof(Push));
|
AppCenter.Start("79d23520-a486-4f63-af81-8d90bf4e1bea", typeof(Analytics), typeof(Push));
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Suspending += OnSuspending;
|
Suspending += OnSuspending;
|
||||||
|
Resuming += OnResuming;
|
||||||
UnhandledException += OnUnhandledException;
|
UnhandledException += OnUnhandledException;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region Event Handlers
|
#region Event Handlers
|
||||||
|
|
||||||
private void OnUnhandledException(object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs)
|
private void OnUnhandledException(object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs)
|
||||||
@@ -98,7 +100,10 @@ namespace ModernKeePass
|
|||||||
|
|
||||||
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
|
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
|
||||||
{
|
{
|
||||||
//TODO: Load state from previously suspended application
|
//TODO: Load state from previously terminated application
|
||||||
|
#if DEBUG
|
||||||
|
MessageDialogHelper.ShowNotificationDialog("App terminated", "Windows or an error made the app terminate");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Place the frame in the current Window
|
// Place the frame in the current Window
|
||||||
@@ -133,6 +138,31 @@ namespace ModernKeePass
|
|||||||
Window.Current.Activate();
|
Window.Current.Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async void OnResuming(object sender, object e)
|
||||||
|
{
|
||||||
|
var currentFrame = Window.Current.Content as Frame;
|
||||||
|
var database = DatabaseService.Instance;
|
||||||
|
if (database.DatabaseFile == null)
|
||||||
|
{
|
||||||
|
#if DEBUG
|
||||||
|
ToastNotificationHelper.ShowGenericToast("App suspended", "Nothing to do, no previous database opened");
|
||||||
|
#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (database.CompositeKey != null) await database.ReOpen();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
currentFrame?.Navigate(typeof(MainPage));
|
||||||
|
#if DEBUG
|
||||||
|
MessageDialogHelper.ShowErrorDialog(ex);
|
||||||
|
#endif
|
||||||
|
ToastNotificationHelper.ShowGenericToast("App suspended", "Database was closed (changes were saved)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Invoked when Navigation to a certain page fails
|
/// Invoked when Navigation to a certain page fails
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -155,8 +185,8 @@ namespace ModernKeePass
|
|||||||
var deferral = e.SuspendingOperation.GetDeferral();
|
var deferral = e.SuspendingOperation.GetDeferral();
|
||||||
UnhandledException -= OnUnhandledException;
|
UnhandledException -= OnUnhandledException;
|
||||||
var database = DatabaseService.Instance;
|
var database = DatabaseService.Instance;
|
||||||
database.Save();
|
if (SettingsService.Instance.GetSetting("SaveSuspend", true)) database.Save();
|
||||||
await database.Close();
|
await database.Close(false);
|
||||||
deferral.Complete();
|
deferral.Complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -55,7 +55,7 @@ namespace ModernKeePass.Common
|
|||||||
{
|
{
|
||||||
if (exception == null) return;
|
if (exception == null) return;
|
||||||
// Create the message dialog and set its content
|
// Create the message dialog and set its content
|
||||||
var messageDialog = CreateBasicDialog("Error occured", exception.Message, "OK");
|
var messageDialog = CreateBasicDialog(exception.Message, exception.StackTrace, "OK");
|
||||||
|
|
||||||
// Show the message dialog
|
// Show the message dialog
|
||||||
await messageDialog.ShowAsync();
|
await messageDialog.ShowAsync();
|
||||||
|
@@ -45,5 +45,10 @@ namespace ModernKeePass.Common
|
|||||||
};
|
};
|
||||||
ToastNotificationManager.CreateToastNotifier().Show(toast);
|
ToastNotificationManager.CreateToastNotifier().Show(toast);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void ShowErrorToast(Exception exception)
|
||||||
|
{
|
||||||
|
ShowGenericToast(exception.Source, exception.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,6 +15,7 @@ namespace ModernKeePass.Interfaces
|
|||||||
GroupVm RootGroup { get; set; }
|
GroupVm RootGroup { get; set; }
|
||||||
GroupVm RecycleBin { get; set; }
|
GroupVm RecycleBin { get; set; }
|
||||||
StorageFile DatabaseFile { get; set; }
|
StorageFile DatabaseFile { get; set; }
|
||||||
|
CompositeKey CompositeKey { get; }
|
||||||
PwUuid DataCipher { get; set; }
|
PwUuid DataCipher { get; set; }
|
||||||
PwCompressionAlgorithm CompressionAlgorithm { get; set; }
|
PwCompressionAlgorithm CompressionAlgorithm { get; set; }
|
||||||
KdfParameters KeyDerivation { get; set; }
|
KdfParameters KeyDerivation { get; set; }
|
||||||
@@ -23,12 +24,13 @@ namespace ModernKeePass.Interfaces
|
|||||||
bool IsClosed { get; }
|
bool IsClosed { get; }
|
||||||
bool HasChanged { get; set; }
|
bool HasChanged { get; set; }
|
||||||
|
|
||||||
Task Open(CompositeKey key, bool createNew);
|
Task Open(CompositeKey key, bool createNew = false);
|
||||||
|
Task ReOpen();
|
||||||
void UpdateCompositeKey(CompositeKey key);
|
void UpdateCompositeKey(CompositeKey key);
|
||||||
void Save();
|
void Save();
|
||||||
void Save(StorageFile file);
|
void Save(StorageFile file);
|
||||||
void CreateRecycleBin();
|
void CreateRecycleBin();
|
||||||
void AddDeletedItem(PwUuid id);
|
void AddDeletedItem(PwUuid id);
|
||||||
Task Close();
|
Task Close(bool releaseFile = true);
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
public interface ISettingsService
|
public interface ISettingsService
|
||||||
{
|
{
|
||||||
T GetSetting<T>(string property);
|
T GetSetting<T>(string property, T defaultValue = default(T));
|
||||||
void PutSetting<T>(string property, T value);
|
void PutSetting<T>(string property, T value);
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -124,6 +124,7 @@
|
|||||||
<Compile Include="Interfaces\IResourceService.cs" />
|
<Compile Include="Interfaces\IResourceService.cs" />
|
||||||
<Compile Include="Services\SingletonServiceBase.cs" />
|
<Compile Include="Services\SingletonServiceBase.cs" />
|
||||||
<Compile Include="TemplateSelectors\SelectableDataTemplateSelector.cs" />
|
<Compile Include="TemplateSelectors\SelectableDataTemplateSelector.cs" />
|
||||||
|
<Compile Include="ViewModels\Items\SettingsSaveVm.cs" />
|
||||||
<Compile Include="Views\MainPageFrames\DonatePage.xaml.cs">
|
<Compile Include="Views\MainPageFrames\DonatePage.xaml.cs">
|
||||||
<DependentUpon>DonatePage.xaml</DependentUpon>
|
<DependentUpon>DonatePage.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -155,6 +156,9 @@
|
|||||||
<Compile Include="Views\SettingsPageFrames\SettingsNewDatabasePage.xaml.cs">
|
<Compile Include="Views\SettingsPageFrames\SettingsNewDatabasePage.xaml.cs">
|
||||||
<DependentUpon>SettingsNewDatabasePage.xaml</DependentUpon>
|
<DependentUpon>SettingsNewDatabasePage.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Views\SettingsPageFrames\SettingsSavePage.xaml.cs">
|
||||||
|
<DependentUpon>SettingsSavePage.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Views\SettingsPageFrames\SettingsSecurityPage.xaml.cs">
|
<Compile Include="Views\SettingsPageFrames\SettingsSecurityPage.xaml.cs">
|
||||||
<DependentUpon>SettingsSecurityPage.xaml</DependentUpon>
|
<DependentUpon>SettingsSecurityPage.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -245,6 +249,10 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</ApplicationDefinition>
|
</ApplicationDefinition>
|
||||||
|
<Page Include="Views\SettingsPageFrames\SettingsSavePage.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="Views\UserControls\CompositeKeyUserControl.xaml">
|
<Page Include="Views\UserControls\CompositeKeyUserControl.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -357,7 +365,7 @@
|
|||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ModernKeePassLib, Version=2.37.0.2000, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ModernKeePassLib, Version=2.37.0.2000, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\ModernKeePassLib.2.37.8000\lib\netstandard1.2\ModernKeePassLib.dll</HintPath>
|
<HintPath>..\packages\ModernKeePassLib.2.38.1\lib\netstandard1.2\ModernKeePassLib.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Splat, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Splat, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
@@ -22,6 +22,7 @@ namespace ModernKeePass.Services
|
|||||||
private StorageFile _realDatabaseFile;
|
private StorageFile _realDatabaseFile;
|
||||||
private StorageFile _databaseFile;
|
private StorageFile _databaseFile;
|
||||||
private GroupVm _recycleBin;
|
private GroupVm _recycleBin;
|
||||||
|
private CompositeKey _compositeKey;
|
||||||
|
|
||||||
public GroupVm RootGroup { get; set; }
|
public GroupVm RootGroup { get; set; }
|
||||||
|
|
||||||
@@ -56,6 +57,8 @@ namespace ModernKeePass.Services
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CompositeKey CompositeKey => _compositeKey;
|
||||||
|
|
||||||
public PwUuid DataCipher
|
public PwUuid DataCipher
|
||||||
{
|
{
|
||||||
get { return _pwDatabase.DataCipherUuid; }
|
get { return _pwDatabase.DataCipherUuid; }
|
||||||
@@ -104,6 +107,8 @@ namespace ModernKeePass.Services
|
|||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(key));
|
throw new ArgumentNullException(nameof(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_compositeKey = key;
|
||||||
var ioConnection = IOConnectionInfo.FromFile(DatabaseFile);
|
var ioConnection = IOConnectionInfo.FromFile(DatabaseFile);
|
||||||
if (createNew)
|
if (createNew)
|
||||||
{
|
{
|
||||||
@@ -142,12 +147,17 @@ namespace ModernKeePass.Services
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task ReOpen()
|
||||||
|
{
|
||||||
|
await Open(_compositeKey);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Commit the changes to the currently opened database to file
|
/// Commit the changes to the currently opened database to file
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Save()
|
public void Save()
|
||||||
{
|
{
|
||||||
if (!_pwDatabase.IsOpen) return;
|
if (!IsOpen) return;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_pwDatabase.Save(new NullStatusLogger());
|
_pwDatabase.Save(new NullStatusLogger());
|
||||||
@@ -186,18 +196,18 @@ namespace ModernKeePass.Services
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Close the currently opened database
|
/// Close the currently opened database
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task Close()
|
public async Task Close(bool releaseFile = true)
|
||||||
{
|
{
|
||||||
_pwDatabase?.Close();
|
_pwDatabase?.Close();
|
||||||
|
|
||||||
// Restore the backup DB to the original one
|
// Restore the backup DB to the original one
|
||||||
if (_settings.GetSetting<bool>("AntiCorruption"))
|
if (_settings.GetSetting<bool>("AntiCorruption"))
|
||||||
{
|
{
|
||||||
if (_pwDatabase.Modified)
|
if (_pwDatabase != null && _pwDatabase.Modified)
|
||||||
Save(_realDatabaseFile);
|
Save(_realDatabaseFile);
|
||||||
await DatabaseFile.DeleteAsync();
|
await DatabaseFile.DeleteAsync();
|
||||||
}
|
}
|
||||||
DatabaseFile = null;
|
if (releaseFile) DatabaseFile = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddDeletedItem(PwUuid id)
|
public void AddDeletedItem(PwUuid id)
|
||||||
|
@@ -9,7 +9,7 @@ namespace ModernKeePass.Services
|
|||||||
{
|
{
|
||||||
private readonly IPropertySet _values = ApplicationData.Current.LocalSettings.Values;
|
private readonly IPropertySet _values = ApplicationData.Current.LocalSettings.Values;
|
||||||
|
|
||||||
public T GetSetting<T>(string property)
|
public T GetSetting<T>(string property, T defaultValue = default(T))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -17,7 +17,7 @@ namespace ModernKeePass.Services
|
|||||||
}
|
}
|
||||||
catch (InvalidCastException)
|
catch (InvalidCastException)
|
||||||
{
|
{
|
||||||
return default(T);
|
return defaultValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -273,4 +273,7 @@
|
|||||||
<data name="CompositeKeyErrorUserAccount" xml:space="preserve">
|
<data name="CompositeKeyErrorUserAccount" xml:space="preserve">
|
||||||
<value>user account</value>
|
<value>user account</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsMenuItemSave" xml:space="preserve">
|
||||||
|
<value>Saving</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@@ -333,6 +333,18 @@
|
|||||||
<data name="SettingsNewDatabaseSample.OnContent" xml:space="preserve">
|
<data name="SettingsNewDatabaseSample.OnContent" xml:space="preserve">
|
||||||
<value>Yes</value>
|
<value>Yes</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsSaveDatabaseSuspend.OffContent" xml:space="preserve">
|
||||||
|
<value>Don't save</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsSaveDatabaseSuspend.OnContent" xml:space="preserve">
|
||||||
|
<value>Save</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsSaveDatabaseSuspendDesc.Text" xml:space="preserve">
|
||||||
|
<value>This settings is generally recommended. If you enable it, database will automatically be saved on application suspension and closing. However, if your database is huge, saving may be deemed too long by Windows, which will then forcibly kill the app.</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsSaveDatabaseSuspendTitle.Text" xml:space="preserve">
|
||||||
|
<value>Auto-save on suspend?</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsSecurityDesc1.Text" xml:space="preserve">
|
<data name="SettingsSecurityDesc1.Text" xml:space="preserve">
|
||||||
<value>Here, you may change your database password, key file, or both. Just click on on</value>
|
<value>Here, you may change your database password, key file, or both. Just click on on</value>
|
||||||
</data>
|
</data>
|
||||||
|
@@ -274,4 +274,7 @@
|
|||||||
<data name="CompositeKeyErrorUserAccount" xml:space="preserve">
|
<data name="CompositeKeyErrorUserAccount" xml:space="preserve">
|
||||||
<value>compte utilisateur</value>
|
<value>compte utilisateur</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsMenuItemSave" xml:space="preserve">
|
||||||
|
<value>Sauvegardes</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@@ -333,6 +333,18 @@
|
|||||||
<data name="SettingsNewDatabaseSample.OnContent" xml:space="preserve">
|
<data name="SettingsNewDatabaseSample.OnContent" xml:space="preserve">
|
||||||
<value>Oui</value>
|
<value>Oui</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsSaveDatabaseSuspend.OffContent" xml:space="preserve">
|
||||||
|
<value>Ne pas sauvegarder</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsSaveDatabaseSuspend.OnContent" xml:space="preserve">
|
||||||
|
<value>Sauvegarder</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsSaveDatabaseSuspendDesc.Text" xml:space="preserve">
|
||||||
|
<value>Ce paramètre est généralement recommandé. Si vous l'activez, la base de données sera sauvegardée automatiquement lors de la suspension et de la fermeture. Cependant, si votre base de données est très volumineuse, il se peut que Windows estime que cela prend trop de temps et tue l'application.</value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingsSaveDatabaseSuspendTitle.Text" xml:space="preserve">
|
||||||
|
<value>Sauvegarder automatiquement lors de la suspension ?</value>
|
||||||
|
</data>
|
||||||
<data name="SettingsSecurityDesc1.Text" xml:space="preserve">
|
<data name="SettingsSecurityDesc1.Text" xml:space="preserve">
|
||||||
<value>Ici, vous pouvez changer le mot de passe maître, le fichier de clé, ou les deux. Cliquez simplement sur</value>
|
<value>Ici, vous pouvez changer le mot de passe maître, le fichier de clé, ou les deux. Cliquez simplement sur</value>
|
||||||
</data>
|
</data>
|
||||||
|
@@ -137,7 +137,7 @@ namespace ModernKeePass.ViewModels
|
|||||||
if (HasPassword) errorMessage.Append(_resource.GetResourceValue("CompositeKeyErrorUserPassword"));
|
if (HasPassword) errorMessage.Append(_resource.GetResourceValue("CompositeKeyErrorUserPassword"));
|
||||||
if (HasPassword && HasKeyFile) errorMessage.Append(_resource.GetResourceValue("CompositeKeyErrorUserOr"));
|
if (HasPassword && HasKeyFile) errorMessage.Append(_resource.GetResourceValue("CompositeKeyErrorUserOr"));
|
||||||
if (HasKeyFile) errorMessage.Append(_resource.GetResourceValue("CompositeKeyErrorUserKeyFile"));
|
if (HasKeyFile) errorMessage.Append(_resource.GetResourceValue("CompositeKeyErrorUserKeyFile"));
|
||||||
if (HasKeyFile) errorMessage.Append(_resource.GetResourceValue("CompositeKeyErrorUserAccount"));
|
if (HasUserAccount) errorMessage.Append(_resource.GetResourceValue("CompositeKeyErrorUserAccount"));
|
||||||
UpdateStatus(errorMessage.ToString(), StatusTypes.Error);
|
UpdateStatus(errorMessage.ToString(), StatusTypes.Error);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@@ -6,7 +6,7 @@ namespace ModernKeePass.ViewModels
|
|||||||
{
|
{
|
||||||
public class SettingsNewVm
|
public class SettingsNewVm
|
||||||
{
|
{
|
||||||
private ISettingsService _settings;
|
private readonly ISettingsService _settings;
|
||||||
|
|
||||||
public SettingsNewVm() : this(SettingsService.Instance)
|
public SettingsNewVm() : this(SettingsService.Instance)
|
||||||
{ }
|
{ }
|
||||||
|
24
ModernKeePass/ViewModels/Items/SettingsSaveVm.cs
Normal file
24
ModernKeePass/ViewModels/Items/SettingsSaveVm.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
using ModernKeePass.Interfaces;
|
||||||
|
using ModernKeePass.Services;
|
||||||
|
|
||||||
|
namespace ModernKeePass.ViewModels
|
||||||
|
{
|
||||||
|
public class SettingsSaveVm
|
||||||
|
{
|
||||||
|
private readonly ISettingsService _settings;
|
||||||
|
|
||||||
|
public SettingsSaveVm() : this(SettingsService.Instance)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public SettingsSaveVm(ISettingsService settings)
|
||||||
|
{
|
||||||
|
_settings = settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsSaveSuspend
|
||||||
|
{
|
||||||
|
get { return _settings.GetSetting("SaveSuspend", true); }
|
||||||
|
set { _settings.PutSetting("SaveSuspend", value); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -55,6 +55,13 @@ namespace ModernKeePass.ViewModels
|
|||||||
IsSelected = true
|
IsSelected = true
|
||||||
},
|
},
|
||||||
new ListMenuItemVm
|
new ListMenuItemVm
|
||||||
|
{
|
||||||
|
Title = resource.GetResourceValue("SettingsMenuItemSave"),
|
||||||
|
Group = resource.GetResourceValue("SettingsMenuGroupApplication"),
|
||||||
|
SymbolIcon = Symbol.Save,
|
||||||
|
PageType = typeof(SettingsSavePage)
|
||||||
|
},
|
||||||
|
new ListMenuItemVm
|
||||||
{
|
{
|
||||||
Title = resource.GetResourceValue("SettingsMenuItemGeneral"),
|
Title = resource.GetResourceValue("SettingsMenuItemGeneral"),
|
||||||
Group = resource.GetResourceValue("SettingsMenuGroupDatabase"),
|
Group = resource.GetResourceValue("SettingsMenuGroupDatabase"),
|
||||||
|
18
ModernKeePass/Views/SettingsPageFrames/SettingsSavePage.xaml
Normal file
18
ModernKeePass/Views/SettingsPageFrames/SettingsSavePage.xaml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<Page
|
||||||
|
x:Class="ModernKeePass.Views.SettingsSavePage"
|
||||||
|
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:viewModels="using:ModernKeePass.ViewModels"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<Page.DataContext>
|
||||||
|
<viewModels:SettingsSaveVm />
|
||||||
|
</Page.DataContext>
|
||||||
|
|
||||||
|
<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}" />
|
||||||
|
</StackPanel>
|
||||||
|
</Page>
|
@@ -0,0 +1,15 @@
|
|||||||
|
// 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -2,7 +2,6 @@
|
|||||||
x:Class="ModernKeePass.Views.SettingsSecurityPage"
|
x:Class="ModernKeePass.Views.SettingsSecurityPage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="using:ModernKeePass.Controls"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:userControls="using:ModernKeePass.Views.UserControls"
|
xmlns:userControls="using:ModernKeePass.Views.UserControls"
|
||||||
|
@@ -1,2 +1,4 @@
|
|||||||
New inline menu on Entries to quickly copy login, password, and navigate to URL
|
Application now correctly resumes from suspend
|
||||||
Design changes
|
Code enhancements
|
||||||
|
Return of the Donate page, with Paypal
|
||||||
|
KeePassLib version bump to 2.38
|
@@ -1,6 +1,6 @@
|
|||||||
En avez-vous assez d'essayer de retenir des quantit&eacute;s de mots de passe ? Etes-vous soucieux que le fait d'utiliser le m&ecirc;me mot de passe partout vous rend vuln&eacute;rable ?
|
En avez-vous assez d'essayer de retenir des quantites de mots de passe ? Etes-vous soucieux que le fait d'utiliser le meme mot de passe partout vous rend vulnerable ?
|
||||||
ModernKeePass est un gestionnaire de mots de passe gratuit, libre, facile &agrave; utiliser mais n&eacute;anmoins s&ucirc;r, bas&eacute; sur la technologie certifi&eacute;e et r&eacute;pandue KeePass 2.x et compatible avec celui-ci.
|
ModernKeePass est un gestionnaire de mots de passe gratuit, libre, facile a utiliser mais neanmoins sur, base sur la technologie certifiee et repandue KeePass 2.x et compatible avec celui-ci.
|
||||||
Vous pouvez stocker ou g&eacute;n&eacute;rer vos mots de passe dans une base de donn&eacute;es chiffr&eacute;e, qui peut &ecirc;tre plac&eacute;e n'importe o&ugrave; (ordinateur personnel/tablette, cloud, cl&eacute; USB...)
|
Vous pouvez stocker ou generer vos mots de passe dans une base de donnees chiffree, qui peut etre placee n'importe ou (ordinateur personnel/tablette, cloud, cle USB...)
|
||||||
|
|
||||||
Bien que la s&eacute;curit&eacute; informatique soit tr&egrave;s importante, cette application essaie de rester simple &agrave; utiliser et &agrave; comprendre. Vos suggestions sont les bienvenues !
|
Bien que la securite informatique soit tres importante, cette application essaie de rester simple a utiliser et a comprendre. Vos suggestions sont les bienvenues !
|
||||||
Fonctionne sur Windows 10, 8.1 et RT.
|
Fonctionne sur Windows 10, 8.1 et RT.
|
@@ -1 +1 @@
|
|||||||
Page d'entr&eacute;e avec g&eacute;n&eacute;rateur de mot de passe
|
Page d'entree avec generateur de mot de passe
|
@@ -1 +1 @@
|
|||||||
Filtrez vos entr&eacute;es pour rapidement trouver celle qui vous int&eacute;resse
|
Filtrez vos entrees pour rapidement trouver celle qui vous interesse
|
@@ -1 +1 @@
|
|||||||
Vue d'un groupe, avec ses sous-groupes et ses entr&eacute;es
|
Vue d'un groupe, avec ses sous-groupes et ses entrees
|
@@ -1 +1 @@
|
|||||||
Cr&eacute;ez de nouvelles bases de donn&eacute;es, en d&eacute;finissant un mot de passe et/ou un fichier de cl&eacute; existant ou nouveau
|
Creez de nouvelles bases de donnees, en definissant un mot de passe et/ou un fichier de cle existant ou nouveau
|
@@ -1 +1 @@
|
|||||||
Ouvrez une base de donn&eacute;es avec mot de passe et/ou fichier de cl&eacute;
|
Ouvrez une base de donnees avec mot de passe et/ou fichier de cle
|
@@ -1 +1 @@
|
|||||||
Ouvrez les fichiers r&eacute;cents
|
Ouvrez les fichiers recents
|
@@ -1 +1 @@
|
|||||||
Vue d'ensemble avec le zoom s&eacute;mantique
|
Vue d'ensemble avec le zoom semantique
|
@@ -1 +1 @@
|
|||||||
Param&egrave;tres de l'application
|
Parametres de l'application
|
@@ -1,2 +1,4 @@
|
|||||||
Ajout d'un menu int&eacute;gr&eacute; &agrave; la liste d'entr&eacute;es afin de copier rapidement le login, mot de passe et de naviguer vers l'URL
|
L'application recupere correctement d'une suspension
|
||||||
Quelques changements de design
|
Ameliorations de code
|
||||||
|
Retour de la page de donation, avec Paypal
|
||||||
|
Version de la KeePassLib montee a 2.38
|
@@ -7,7 +7,7 @@
|
|||||||
<package id="Microsoft.NETCore.Platforms" version="2.0.1" targetFramework="win81" />
|
<package id="Microsoft.NETCore.Platforms" version="2.0.1" targetFramework="win81" />
|
||||||
<package id="Microsoft.NETCore.Portable.Compatibility" version="1.0.2" targetFramework="win81" />
|
<package id="Microsoft.NETCore.Portable.Compatibility" version="1.0.2" targetFramework="win81" />
|
||||||
<package id="Microsoft.Toolkit.Uwp.Notifications" version="2.0.0" targetFramework="win81" />
|
<package id="Microsoft.Toolkit.Uwp.Notifications" version="2.0.0" targetFramework="win81" />
|
||||||
<package id="ModernKeePassLib" version="2.37.8000" targetFramework="win81" />
|
<package id="ModernKeePassLib" version="2.38.1" targetFramework="win81" />
|
||||||
<package id="NETStandard.Library" version="2.0.1" targetFramework="win81" />
|
<package id="NETStandard.Library" version="2.0.1" targetFramework="win81" />
|
||||||
<package id="Portable.BouncyCastle" version="1.8.1.3" targetFramework="win81" />
|
<package id="Portable.BouncyCastle" version="1.8.1.3" targetFramework="win81" />
|
||||||
<package id="Splat" version="2.0.0" targetFramework="win81" />
|
<package id="Splat" version="2.0.0" targetFramework="win81" />
|
||||||
|
@@ -13,11 +13,14 @@ namespace ModernKeePassApp.Test.Mock
|
|||||||
{
|
{
|
||||||
private bool _isOpen;
|
private bool _isOpen;
|
||||||
private bool _isClosed;
|
private bool _isClosed;
|
||||||
|
private CompositeKey _compositeKey;
|
||||||
|
|
||||||
public PwCompressionAlgorithm CompressionAlgorithm { get; set; }
|
public PwCompressionAlgorithm CompressionAlgorithm { get; set; }
|
||||||
|
|
||||||
public StorageFile DatabaseFile { get; set; }
|
public StorageFile DatabaseFile { get; set; }
|
||||||
|
|
||||||
|
public CompositeKey CompositeKey => _compositeKey;
|
||||||
|
|
||||||
public PwUuid DataCipher { get; set; }
|
public PwUuid DataCipher { get; set; }
|
||||||
|
|
||||||
public KdfParameters KeyDerivation { get; set; }
|
public KdfParameters KeyDerivation { get; set; }
|
||||||
@@ -43,7 +46,7 @@ namespace ModernKeePassApp.Test.Mock
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task Close()
|
public Task Close(bool releaseFile = true)
|
||||||
{
|
{
|
||||||
return Task.Run(() =>
|
return Task.Run(() =>
|
||||||
{
|
{
|
||||||
@@ -57,8 +60,9 @@ namespace ModernKeePassApp.Test.Mock
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task Open(CompositeKey key, bool createNew)
|
public Task Open(CompositeKey key, bool createNew = false)
|
||||||
{
|
{
|
||||||
|
_compositeKey = key;
|
||||||
return Task.Run(() =>
|
return Task.Run(() =>
|
||||||
{
|
{
|
||||||
_isOpen = true;
|
_isOpen = true;
|
||||||
@@ -66,6 +70,11 @@ namespace ModernKeePassApp.Test.Mock
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task ReOpen()
|
||||||
|
{
|
||||||
|
await Open(_compositeKey);
|
||||||
|
}
|
||||||
|
|
||||||
public void Save()
|
public void Save()
|
||||||
{
|
{
|
||||||
// Do Nothing
|
// Do Nothing
|
||||||
|
@@ -5,9 +5,9 @@ namespace ModernKeePassApp.Test.Mock
|
|||||||
{
|
{
|
||||||
public class SettingsServiceMock : ISettingsService
|
public class SettingsServiceMock : ISettingsService
|
||||||
{
|
{
|
||||||
public T GetSetting<T>(string property)
|
public T GetSetting<T>(string property, T defaultValue = default(T))
|
||||||
{
|
{
|
||||||
return default(T);
|
return defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PutSetting<T>(string property, T value)
|
public void PutSetting<T>(string property, T value)
|
||||||
|
@@ -13,8 +13,8 @@ namespace ModernKeePassApp.Test
|
|||||||
[TestClass]
|
[TestClass]
|
||||||
public class ViewModelsTests
|
public class ViewModelsTests
|
||||||
{
|
{
|
||||||
private RecentServiceMock _recent = new RecentServiceMock();
|
private readonly RecentServiceMock _recent = new RecentServiceMock();
|
||||||
private ResourceServiceMock _resource = new ResourceServiceMock();
|
private readonly ResourceServiceMock _resource = new ResourceServiceMock();
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void TestAboutVm()
|
public void TestAboutVm()
|
||||||
@@ -108,7 +108,7 @@ namespace ModernKeePassApp.Test
|
|||||||
Assert.AreEqual(1, settingsVm.MenuItems.Count());
|
Assert.AreEqual(1, settingsVm.MenuItems.Count());
|
||||||
var firstGroup = settingsVm.MenuItems.FirstOrDefault();
|
var firstGroup = settingsVm.MenuItems.FirstOrDefault();
|
||||||
// All groups have an empty title, so all settings are put inside the empty group
|
// All groups have an empty title, so all settings are put inside the empty group
|
||||||
Assert.AreEqual(3, firstGroup.Count());
|
Assert.AreEqual(4, firstGroup.Count());
|
||||||
Assert.IsNotNull(settingsVm.SelectedItem);
|
Assert.IsNotNull(settingsVm.SelectedItem);
|
||||||
var selectedItem = (ListMenuItemVm) settingsVm.SelectedItem;
|
var selectedItem = (ListMenuItemVm) settingsVm.SelectedItem;
|
||||||
Assert.AreEqual(typeof(SettingsNewDatabasePage), selectedItem.PageType);
|
Assert.AreEqual(typeof(SettingsNewDatabasePage), selectedItem.PageType);
|
||||||
|
Reference in New Issue
Block a user