mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
History *works*
WIP on save on entry page doesn't show last change
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using MediatR;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
using ModernKeePass.Domain.Exceptions;
|
||||
|
||||
namespace ModernKeePass.Application.Entry.Commands.AddHistory
|
||||
{
|
||||
public class AddHistoryCommand : IRequest
|
||||
{
|
||||
public string EntryId { get; set; }
|
||||
|
||||
public class AddHistoryCommandHandler : IRequestHandler<AddHistoryCommand>
|
||||
{
|
||||
private readonly IDatabaseProxy _database;
|
||||
|
||||
public AddHistoryCommandHandler(IDatabaseProxy database)
|
||||
{
|
||||
_database = database;
|
||||
}
|
||||
|
||||
public void Handle(AddHistoryCommand message)
|
||||
{
|
||||
if (!_database.IsOpen) throw new DatabaseClosedException();
|
||||
|
||||
_database.AddHistory(message.EntryId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -28,6 +28,7 @@ namespace ModernKeePass.Application.Entry.Models
|
||||
public bool HasExpirationDate { get; set; }
|
||||
public DateTimeOffset ExpirationDate { get; set; }
|
||||
public DateTimeOffset ModificationDate { get; set; }
|
||||
public bool IsDirty { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
|
Reference in New Issue
Block a user