mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
Hamburger button menu is now a User Control
WIP History in Entry page
This commit is contained in:
@@ -31,6 +31,8 @@ namespace ModernKeePass.ViewModels
|
||||
public string CustomChars { get; set; } = string.Empty;
|
||||
public PwUuid IdUuid => _pwEntry?.Uuid;
|
||||
public string Id => _pwEntry?.Uuid.ToHexString();
|
||||
public bool IsRecycleOnDelete => _database.RecycleBinEnabled && !ParentGroup.IsSelected;
|
||||
public IEnumerable<IPwEntity> BreadCrumb => new List<IPwEntity>(ParentGroup.BreadCrumb) {ParentGroup};
|
||||
|
||||
public double PasswordLength
|
||||
{
|
||||
@@ -117,9 +119,7 @@ namespace ModernKeePass.ViewModels
|
||||
NotifyPropertyChanged("IsVisible");
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsRecycleOnDelete => _database.RecycleBinEnabled && !ParentGroup.IsSelected;
|
||||
|
||||
|
||||
public bool IsRevealPassword
|
||||
{
|
||||
get { return _isRevealPassword; }
|
||||
@@ -139,7 +139,16 @@ namespace ModernKeePass.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<IPwEntity> BreadCrumb => new List<IPwEntity>(ParentGroup.BreadCrumb) {ParentGroup};
|
||||
public IEnumerable<IPwEntity> History
|
||||
{
|
||||
get
|
||||
{
|
||||
foreach (var historyEntry in _pwEntry.History)
|
||||
{
|
||||
yield return new EntryVm(historyEntry, ParentGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
|
19
ModernKeePass/ViewModels/HistoryVm.cs
Normal file
19
ModernKeePass/ViewModels/HistoryVm.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using ModernKeePass.Interfaces;
|
||||
|
||||
namespace ModernKeePass.ViewModels
|
||||
{
|
||||
public class HistoryVm: IHasSelectableObject
|
||||
{
|
||||
public IEnumerable<IPwEntity> History { get; }
|
||||
|
||||
public HistoryVm() { }
|
||||
|
||||
public HistoryVm(IEnumerable<IPwEntity> history)
|
||||
{
|
||||
History = history;
|
||||
}
|
||||
|
||||
public ISelectableModel SelectedItem { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user