diff --git a/ModernKeePass/Strings/en-US/CodeBehind.resw b/ModernKeePass/Strings/en-US/CodeBehind.resw
index c965b0e..184c438 100644
--- a/ModernKeePass/Strings/en-US/CodeBehind.resw
+++ b/ModernKeePass/Strings/en-US/CodeBehind.resw
@@ -147,35 +147,17 @@
Restored
-
- Entry permanently removed
-
- Are you sure you want to delete this entry?
+ Are you sure you want to delete {0} ?
- Entry moved to the Recycle bin
-
-
- Are you sure you want to send this entry to the recycle bin?
+ {0} moved to the Recycle bin
Entry returned to its original group
-
- Group permanently removed
-
-
- Are you sure you want to delete the whole group and all its entries?
-
- Group moved to the Recycle bin
-
-
- Are you sure you want to send the whole group and all its entries to the recycle bin?
-
-
- Group returned to its original group
+ {0} moved to the Recycle bin
About
@@ -288,4 +270,7 @@
Recycle Bin
+
+ Are you sure you want to delete the {0} and all its entries?
+
\ No newline at end of file
diff --git a/ModernKeePass/Strings/en-US/Resources.resw b/ModernKeePass/Strings/en-US/Resources.resw
index 72ed5a2..bc2bd7d 100644
--- a/ModernKeePass/Strings/en-US/Resources.resw
+++ b/ModernKeePass/Strings/en-US/Resources.resw
@@ -121,7 +121,7 @@
Dominik Reichl for the KeePass application and file format
- David Lechner for his PCL adapatation of the KeePass Library and his correlated tests
+ David Lechner for his PCL adapatation of the KeePass Library and his related tests
Credits
diff --git a/ModernKeePass/Strings/fr-FR/CodeBehind.resw b/ModernKeePass/Strings/fr-FR/CodeBehind.resw
index 64728c5..4a74f5f 100644
--- a/ModernKeePass/Strings/fr-FR/CodeBehind.resw
+++ b/ModernKeePass/Strings/fr-FR/CodeBehind.resw
@@ -147,35 +147,17 @@
Restauré
-
- Entrée supprimée définitivement
-
- Êtes-vous sûr de vouloir supprimer cette entrée ?
+ Êtes-vous sûr de vouloir supprimer {0} ?
- Entrée placée dans la Corbeille
-
-
- Êtes-vous sûr de vouloir placer cette entrée dans la Corbeille ?
-
-
- Entrée replacée dans son groupe d'origine
-
-
- Groupe supprimé définitivement
+ {0} placé dans la Corbeille
- Êtes-vous sûr de vouloir supprimer ce groupe et toutes ses entrées ?
+ Êtes-vous sûr de vouloir supprimer {0} et toutes ses entrées ?
- Groupe placé dans la Corbeille
-
-
- Êtes-vous sûr de vouloir envoyer ce groupe et toutes ses entrées vers la Corbeille ?
-
-
- Groupe replacé à sa place originelle
+ {0} placé dans la Corbeille
A propos
diff --git a/ModernKeePass/ViewModels/EntryDetailVm.cs b/ModernKeePass/ViewModels/EntryDetailVm.cs
index aa9c56d..500df58 100644
--- a/ModernKeePass/ViewModels/EntryDetailVm.cs
+++ b/ModernKeePass/ViewModels/EntryDetailVm.cs
@@ -41,9 +41,17 @@ namespace ModernKeePass.ViewModels
{
public class EntryDetailVm : ViewModelBase
{
- public bool IsRevealPasswordEnabled => !string.IsNullOrEmpty(Password);
public bool HasExpired => HasExpirationDate && ExpiryDate < DateTime.Now;
public double PasswordComplexityIndicator => _mediator.Send(new EstimatePasswordComplexityQuery {Password = Password}).GetAwaiter().GetResult();
+ public double PasswordLength
+ {
+ get { return _settings.GetSetting(Constants.Settings.PasswordGenerationOptions.PasswordLength, 25); }
+ set
+ {
+ _settings.PutSetting(Constants.Settings.PasswordGenerationOptions.PasswordLength, value);
+ RaisePropertyChanged(nameof(PasswordLength));
+ }
+ }
public bool UpperCasePatternSelected
{
get { return _settings.GetSetting(Constants.Settings.PasswordGenerationOptions.UpperCasePattern, true); }
@@ -126,7 +134,7 @@ namespace ModernKeePass.ViewModels
}));
Attachments.CollectionChanged += (sender, args) =>
{
- SaveCommand.RaiseCanExecuteChanged();
+ UpdateDirtyStatus(true);
};
RaisePropertyChanged(string.Empty);
}
@@ -154,11 +162,6 @@ namespace ModernKeePass.ViewModels
}
}
- public double PasswordLength
- {
- get { return _passwordLength; }
- set { Set(() => PasswordLength, ref _passwordLength, value); }
- }
public string Title
{
@@ -278,8 +281,7 @@ namespace ModernKeePass.ViewModels
SetFieldValue(nameof(ForegroundColor), SelectedItem.ForegroundColor, false).Wait();
}
}
-
-
+
public bool IsEditMode
{
get { return IsCurrentEntry && _isEditMode; }
@@ -320,7 +322,7 @@ namespace ModernKeePass.ViewModels
private int _additionalFieldSelectedIndex = -1;
private bool _isEditMode;
private bool _isRevealPassword;
- private double _passwordLength = 25;
+ private bool _isDirty;
public EntryDetailVm(IMediator mediator, INavigationService navigation, IResourceProxy resource, IDialogService dialog, INotificationService notification, IFileProxy file, ISettingsProxy settings)
{
@@ -360,7 +362,11 @@ namespace ModernKeePass.ViewModels
{
History.Add(entry);
}
- History.CollectionChanged += (sender, args) => SaveCommand.RaiseCanExecuteChanged();
+ History.CollectionChanged += (sender, args) =>
+ {
+ SelectedIndex = 0;
+ SaveCommand.RaiseCanExecuteChanged();
+ };
}
public async Task GeneratePassword()
@@ -378,12 +384,11 @@ namespace ModernKeePass.ViewModels
UnderscorePatternSelected = UnderscorePatternSelected,
UpperCasePatternSelected = UpperCasePatternSelected
});
- RaisePropertyChanged(nameof(IsRevealPasswordEnabled));
}
public async Task AddHistory()
{
- if (Database.IsDirty) await _mediator.Send(new AddHistoryCommand { Entry = History[0] });
+ if (_isDirty) await _mediator.Send(new AddHistoryCommand { Entry = History[0] });
}
public void GoToGroup(string groupId)
@@ -401,7 +406,7 @@ namespace ModernKeePass.ViewModels
private async Task SetFieldValue(string fieldName, object value, bool isProtected)
{
await _mediator.Send(new UpsertFieldCommand { EntryId = Id, FieldName = fieldName, FieldValue = value, IsProtected = isProtected});
- SaveCommand.RaiseCanExecuteChanged();
+ UpdateDirtyStatus(true);
}
private async Task UpdateFieldName(string oldName, string newName, string value, bool isProtected)
@@ -422,7 +427,7 @@ namespace ModernKeePass.ViewModels
if (!string.IsNullOrEmpty(field.Name))
{
await _mediator.Send(new DeleteFieldCommand {EntryId = Id, FieldName = field.Name});
- SaveCommand.RaiseCanExecuteChanged();
+ UpdateDirtyStatus(true);
}
}
@@ -433,12 +438,13 @@ namespace ModernKeePass.ViewModels
if (IsRecycleOnDelete)
{
await Delete();
- _notification.Show(_resource.GetResourceValue("EntryRecyclingConfirmation"), _resource.GetResourceValue("EntryRecycled"));
+ _notification.Show(_resource.GetResourceValue("EntityDeleting"), string.Format(_resource.GetResourceValue("EntryRecycled"), Title));
}
else
{
- await _dialog.ShowMessage(_resource.GetResourceValue("EntryDeletingConfirmation"),
- _resource.GetResourceValue("EntityDeleteTitle"),
+ await _dialog.ShowMessage(
+ string.Format(_resource.GetResourceValue("EntryDeletingConfirmation"), Title),
+ _resource.GetResourceValue("EntityDeleting"),
_resource.GetResourceValue("EntityDeleteActionButton"),
_resource.GetResourceValue("EntityDeleteCancelButton"),
async isOk =>
@@ -449,14 +455,14 @@ namespace ModernKeePass.ViewModels
}
else
{
- await _dialog.ShowMessage(_resource.GetResourceValue("HistoryDeleteDescription"), _resource.GetResourceValue("HistoryDeleteTitle"),
+ await _dialog.ShowMessage(_resource.GetResourceValue("HistoryDeleteDescription"),
+ _resource.GetResourceValue("HistoryDeleteTitle"),
_resource.GetResourceValue("EntityDeleteActionButton"),
_resource.GetResourceValue("EntityDeleteCancelButton"), async isOk =>
{
if (!isOk) return;
await _mediator.Send(new DeleteHistoryCommand { Entry = History[0], HistoryIndex = History.Count - SelectedIndex - 1 });
History.RemoveAt(SelectedIndex);
- SelectedIndex = 0;
});
}
}
@@ -465,7 +471,6 @@ namespace ModernKeePass.ViewModels
{
await _mediator.Send(new RestoreHistoryCommand { Entry = History[0], HistoryIndex = History.Count - SelectedIndex - 1 });
History.Insert(0, SelectedItem);
- SelectedIndex = 0;
}
private async Task SaveChanges()
@@ -479,7 +484,7 @@ namespace ModernKeePass.ViewModels
{
MessengerInstance.Send(new SaveErrorMessage { Message = e.Message });
}
- SaveCommand.RaiseCanExecuteChanged();
+ UpdateDirtyStatus(false);
}
private async Task Delete()
@@ -490,6 +495,7 @@ namespace ModernKeePass.ViewModels
ParentGroupId = SelectedItem.ParentGroupId,
RecycleBinName = _resource.GetResourceValue("RecycleBinTitle")
});
+ _isDirty = false;
_navigation.GoBack();
}
@@ -511,15 +517,18 @@ namespace ModernKeePass.ViewModels
var contents = await _file.ReadBinaryFile(fileInfo.Id);
await _mediator.Send(new AddAttachmentCommand { Entry = SelectedItem, AttachmentName = fileInfo.Name, AttachmentContent = contents });
Attachments.Add(new Attachment { Name = fileInfo.Name, Content = contents });
- SaveCommand.RaiseCanExecuteChanged();
}
private async Task DeleteAttachment(Attachment attachment)
{
await _mediator.Send(new DeleteAttachmentCommand { Entry = SelectedItem, AttachmentName = attachment.Name });
Attachments.Remove(attachment);
- SaveCommand.RaiseCanExecuteChanged();
}
+ private void UpdateDirtyStatus(bool isDirty)
+ {
+ SaveCommand.RaiseCanExecuteChanged();
+ _isDirty = isDirty;
+ }
}
}
diff --git a/ModernKeePass/ViewModels/GroupDetailVm.cs b/ModernKeePass/ViewModels/GroupDetailVm.cs
index 105493d..dbf7e92 100644
--- a/ModernKeePass/ViewModels/GroupDetailVm.cs
+++ b/ModernKeePass/ViewModels/GroupDetailVm.cs
@@ -261,11 +261,13 @@ namespace ModernKeePass.ViewModels
if (IsRecycleOnDelete)
{
await Delete();
- _notification.Show(_resource.GetResourceValue("GroupRecyclingConfirmation"), _resource.GetResourceValue("GroupRecycled"));
+ _notification.Show(_resource.GetResourceValue("EntityDeleting"), string.Format(_resource.GetResourceValue("GroupRecycled"), Title));
}
else
{
- await _dialog.ShowMessage(_resource.GetResourceValue("GroupDeletingConfirmation"), _resource.GetResourceValue("EntityDeleteTitle"),
+ await _dialog.ShowMessage(
+ string.Format(_resource.GetResourceValue("GroupDeletingConfirmation"), Title),
+ _resource.GetResourceValue("EntityDeleting"),
_resource.GetResourceValue("EntityDeleteActionButton"),
_resource.GetResourceValue("EntityDeleteCancelButton"),
async isOk =>
diff --git a/ModernKeePass/Views/EntryDetailPage.xaml b/ModernKeePass/Views/EntryDetailPage.xaml
index 29ef1d4..11b41fd 100644
--- a/ModernKeePass/Views/EntryDetailPage.xaml
+++ b/ModernKeePass/Views/EntryDetailPage.xaml
@@ -418,7 +418,7 @@
-
+
diff --git a/ModernKeePass/appMetadata/en-us/baselisting/releaseNotes.txt b/ModernKeePass/appMetadata/en-us/baselisting/releaseNotes.txt
index 9e891f6..9e3d180 100644
--- a/ModernKeePass/appMetadata/en-us/baselisting/releaseNotes.txt
+++ b/ModernKeePass/appMetadata/en-us/baselisting/releaseNotes.txt
@@ -4,4 +4,5 @@ Add an expiration timer for clipboard data
Ability to manually reorder groups
Ability to set max history count and size
Design changes
-Update to KeePassLib version 2.45
\ No newline at end of file
+Update to KeePassLib version 2.45
+Bug corrections
\ 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 5a6d3b8..346b4e6 100644
--- a/ModernKeePass/appMetadata/fr-fr/baselisting/releaseNotes.txt
+++ b/ModernKeePass/appMetadata/fr-fr/baselisting/releaseNotes.txt
@@ -4,4 +4,5 @@ Ajout d'une expiration du presse papier
Possibilite de reorganiser les groupes manuellement
Possibilite de parametrer le nombre max et la taille de l'historique
Quelques changements de design
-Mise a jour de la KeePassLib version 2.45
\ No newline at end of file
+Mise a jour de la KeePassLib version 2.45
+Correction de bugs
\ No newline at end of file
diff --git a/WinAppCommon/Common/Constants.cs b/WinAppCommon/Common/Constants.cs
index 680729a..a0285db 100644
--- a/WinAppCommon/Common/Constants.cs
+++ b/WinAppCommon/Common/Constants.cs
@@ -32,6 +32,7 @@
public static string SpacePattern => nameof(SpacePattern);
public static string SpecialPattern => nameof(SpecialPattern);
public static string BracketsPattern => nameof(BracketsPattern);
+ public static string PasswordLength => nameof(PasswordLength);
}
}
}