diff --git a/ModernKeePass.Application/Group/Commands/AddEntry/AddEntryCommand.cs b/ModernKeePass.Application/Group/Commands/AddEntry/AddEntryCommand.cs index 69d036b..b1c089b 100644 --- a/ModernKeePass.Application/Group/Commands/AddEntry/AddEntryCommand.cs +++ b/ModernKeePass.Application/Group/Commands/AddEntry/AddEntryCommand.cs @@ -24,7 +24,6 @@ namespace ModernKeePass.Application.Group.Commands.AddEntry if (!_database.IsOpen) throw new DatabaseClosedException(); await _database.AddEntry(message.ParentGroupId, message.EntryId); - //message.ParentGroup.Entries.Add(message.Entry); } } } diff --git a/ModernKeePass.Application/Group/Commands/AddGroup/AddGroupCommand.cs b/ModernKeePass.Application/Group/Commands/AddGroup/AddGroupCommand.cs index 1bef137..69bfab3 100644 --- a/ModernKeePass.Application/Group/Commands/AddGroup/AddGroupCommand.cs +++ b/ModernKeePass.Application/Group/Commands/AddGroup/AddGroupCommand.cs @@ -24,7 +24,6 @@ namespace ModernKeePass.Application.Group.Commands.AddGroup if (!_database.IsOpen) throw new DatabaseClosedException(); await _database.AddGroup(message.ParentGroupId, message.GroupId); - //message.ParentGroup.SubGroups.Add(message.Group); } } } diff --git a/ModernKeePass.Application/Group/Commands/RemoveEntry/RemoveEntryCommand.cs b/ModernKeePass.Application/Group/Commands/RemoveEntry/RemoveEntryCommand.cs index 09805c8..358c08c 100644 --- a/ModernKeePass.Application/Group/Commands/RemoveEntry/RemoveEntryCommand.cs +++ b/ModernKeePass.Application/Group/Commands/RemoveEntry/RemoveEntryCommand.cs @@ -24,7 +24,6 @@ namespace ModernKeePass.Application.Group.Commands.RemoveEntry if (!_database.IsOpen) throw new DatabaseClosedException(); await _database.RemoveEntry(message.ParentGroupId, message.EntryId); - //message.ParentGroup.Entries.Remove(message.Entry); } } } diff --git a/ModernKeePass.Application/Group/Commands/RemoveGroup/RemoveGroupCommand.cs b/ModernKeePass.Application/Group/Commands/RemoveGroup/RemoveGroupCommand.cs index 3ab54c3..8d4149a 100644 --- a/ModernKeePass.Application/Group/Commands/RemoveGroup/RemoveGroupCommand.cs +++ b/ModernKeePass.Application/Group/Commands/RemoveGroup/RemoveGroupCommand.cs @@ -24,7 +24,6 @@ namespace ModernKeePass.Application.Group.Commands.RemoveGroup if (!_database.IsOpen) throw new DatabaseClosedException(); await _database.RemoveGroup(message.ParentGroupId, message.GroupId); - //message.ParentGroup.SubGroups.Remove(message.Group); } } } diff --git a/ModernKeePass.Domain/Common/Constants.cs b/ModernKeePass.Domain/Common/Constants.cs index d06e1b3..ca34b80 100644 --- a/ModernKeePass.Domain/Common/Constants.cs +++ b/ModernKeePass.Domain/Common/Constants.cs @@ -8,6 +8,7 @@ { public static string Any => "*"; public static string Kdbx => ".kdbx"; + public static string Key => ".key"; } } } \ No newline at end of file diff --git a/ModernKeePass/App.xaml.cs b/ModernKeePass/App.xaml.cs index a71c663..80d9758 100644 --- a/ModernKeePass/App.xaml.cs +++ b/ModernKeePass/App.xaml.cs @@ -38,7 +38,6 @@ namespace ModernKeePass private readonly ISettingsProxy _settings; private readonly INavigationService _navigation; private readonly IHockeyClient _hockey; - private readonly IDialogService _dialog; private readonly INotificationService _notification; private readonly IFileProxy _file; private readonly IMessenger _messenger; @@ -64,7 +63,6 @@ namespace ModernKeePass _resource = Services.GetService(); _settings = Services.GetService(); _navigation = Services.GetService(); - _dialog = Services.GetService(); _notification = Services.GetService(); _hockey = Services.GetService(); _file = Services.GetService(); @@ -134,9 +132,6 @@ namespace ModernKeePass { // Load state from previously terminated application await SuspensionManager.RestoreAsync(); -#if DEBUG - await _dialog.ShowMessage("Windows or an error made the app terminate", "App terminated"); -#endif } // Place the frame in the current Window diff --git a/ModernKeePass/Strings/en-US/CodeBehind.resw b/ModernKeePass/Strings/en-US/CodeBehind.resw index e5544f0..a533d92 100644 --- a/ModernKeePass/Strings/en-US/CodeBehind.resw +++ b/ModernKeePass/Strings/en-US/CodeBehind.resw @@ -267,4 +267,13 @@ File not found + + KeePass + + + Key file + + + Key + \ No newline at end of file diff --git a/ModernKeePass/Strings/fr-FR/CodeBehind.resw b/ModernKeePass/Strings/fr-FR/CodeBehind.resw index 923a690..022f0ba 100644 --- a/ModernKeePass/Strings/fr-FR/CodeBehind.resw +++ b/ModernKeePass/Strings/fr-FR/CodeBehind.resw @@ -267,4 +267,13 @@ Fichier manquant + + KeePass + + + Fichier de clé + + + Clé + \ No newline at end of file diff --git a/ModernKeePass/appMetadata/en-us/baselisting/releaseNotes.txt b/ModernKeePass/appMetadata/en-us/baselisting/releaseNotes.txt index e69de29..a45a8a6 100644 --- a/ModernKeePass/appMetadata/en-us/baselisting/releaseNotes.txt +++ b/ModernKeePass/appMetadata/en-us/baselisting/releaseNotes.txt @@ -0,0 +1,5 @@ +Redesign of the UI (top menu and hamburger menu) +Resuming the app re-opens previously opened database +Notify user and show the Save As dialog when an error is encountered during saving +Save As actually works now +Creating a new group is now done inline \ No newline at end of file diff --git a/ModernKeePass/appMetadata/fr-fr/baselisting/releaseNotes.txt b/ModernKeePass/appMetadata/fr-fr/baselisting/releaseNotes.txt index e69de29..c0a0a74 100644 --- a/ModernKeePass/appMetadata/fr-fr/baselisting/releaseNotes.txt +++ b/ModernKeePass/appMetadata/fr-fr/baselisting/releaseNotes.txt @@ -0,0 +1,5 @@ +Redesign de l'interface utilisateur (menu superieur et menu hamburger) +Le re-chargement de l'app re-ouvre la base de donnees ouverte precedemment +L'utlisateur est prevenu et un popup de sauvegarde est affiche quand il y a une erreur de sauvegarde +La fonctionnalite Sauvegarder Sous fonctionne correctement +La creation d'un nouveau groupe se fait directement dans le menu \ No newline at end of file diff --git a/WinAppCommon/ViewModels/NewVm.cs b/WinAppCommon/ViewModels/NewVm.cs index 88203a5..86c03be 100644 --- a/WinAppCommon/ViewModels/NewVm.cs +++ b/WinAppCommon/ViewModels/NewVm.cs @@ -17,15 +17,17 @@ namespace ModernKeePass.ViewModels private readonly ISettingsProxy _settings; private readonly INavigationService _navigation; private readonly IFileProxy _file; + private readonly IResourceProxy _resource; public RelayCommand CreateDatabaseFileCommand { get; } - public NewVm(IMediator mediator, ISettingsProxy settings, INavigationService navigation, IFileProxy file): base(file) + public NewVm(IMediator mediator, ISettingsProxy settings, INavigationService navigation, IFileProxy file, IResourceProxy resource): base(file) { _mediator = mediator; _settings = settings; _navigation = navigation; _file = file; + _resource = resource; CreateDatabaseFileCommand = new RelayCommand(async () => await CreateDatabaseFile()); @@ -34,8 +36,11 @@ namespace ModernKeePass.ViewModels private async Task CreateDatabaseFile() { - // TODO: get these from resource - var file = await _file.CreateFile("New Database", Domain.Common.Constants.Extensions.Kdbx, "KeePass 2.x database", true); + var file = await _file.CreateFile(_resource.GetResourceValue("MessageDialogSaveNameSuggestion"), + Domain.Common.Constants.Extensions.Kdbx, + _resource.GetResourceValue("MessageDialogSaveErrorFileTypeDesc"), + true); + if (file == null) return; Token = file.Id; Path = file.Path; Name = file.Name; diff --git a/WinAppCommon/ViewModels/SaveVm.cs b/WinAppCommon/ViewModels/SaveVm.cs index dae39c0..6bf4a91 100644 --- a/WinAppCommon/ViewModels/SaveVm.cs +++ b/WinAppCommon/ViewModels/SaveVm.cs @@ -24,12 +24,14 @@ namespace ModernKeePass.ViewModels private readonly IMediator _mediator; private readonly INavigationService _navigation; private readonly IFileProxy _file; + private readonly IResourceProxy _resource; - public SaveVm(IMediator mediator, INavigationService navigation, IFileProxy file) + public SaveVm(IMediator mediator, INavigationService navigation, IFileProxy file, IResourceProxy resource) { _mediator = mediator; _navigation = navigation; _file = file; + _resource = resource; SaveAsCommand = new RelayCommand(async () => await SaveAs()); SaveCommand = new RelayCommand(async () => await Save(), () => IsSaveEnabled); @@ -40,9 +42,11 @@ namespace ModernKeePass.ViewModels private async Task SaveAs() { - // TODO: get these from resource - var file = await _file.CreateFile("New Database", Domain.Common.Constants.Extensions.Kdbx, "KeePass 2.x database", true); - + var file = await _file.CreateFile(_resource.GetResourceValue("MessageDialogSaveNameSuggestion"), + Domain.Common.Constants.Extensions.Kdbx, + _resource.GetResourceValue("MessageDialogSaveErrorFileTypeDesc"), + true); + if (file == null) return; await _mediator.Send(new SaveDatabaseCommand { FilePath = file.Id }); _navigation.NavigateTo(Constants.Navigation.MainPage); } diff --git a/WinAppCommon/ViewModels/UserControls/SetCredentialsVm.cs b/WinAppCommon/ViewModels/UserControls/SetCredentialsVm.cs index 950732e..ac60b45 100644 --- a/WinAppCommon/ViewModels/UserControls/SetCredentialsVm.cs +++ b/WinAppCommon/ViewModels/UserControls/SetCredentialsVm.cs @@ -14,6 +14,7 @@ namespace ModernKeePass.ViewModels { private readonly IMediator _mediator; private readonly ICredentialsProxy _credentials; + private readonly IResourceProxy _resource; private readonly IFileProxy _file; public bool HasPassword @@ -105,6 +106,7 @@ namespace ModernKeePass.ViewModels { _mediator = mediator; _credentials = credentials; + _resource = resource; _file = file; OpenKeyFileCommand = new RelayCommand(async () => await OpenKeyFile(), () => HasKeyFile); @@ -117,12 +119,16 @@ namespace ModernKeePass.ViewModels private async Task OpenKeyFile() { var file = await _file.OpenFile(string.Empty, Constants.Extensions.Any, false); + if (file == null) return; SetKeyFileInfo(file); } private async Task CreateKeyFile() { - var file = await _file.CreateFile("Key", Constants.Extensions.Any, "Key file", false); + var file = await _file.CreateFile(_resource.GetResourceValue("CompositeKeyFileNameSuggestion"), + Constants.Extensions.Key, _resource.GetResourceValue("CompositeKeyFileTypeDesc"), + false); + if (file == null) return; SetKeyFileInfo(file); await _mediator.Send(new GenerateKeyFileCommand { KeyFilePath = KeyFilePath }); @@ -130,7 +136,6 @@ namespace ModernKeePass.ViewModels private void SetKeyFileInfo(FileInfo file) { - if (file == null) return; KeyFilePath = file.Id; KeyFileText = file.Name; HasKeyFile = true;