mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 08:00:16 -04:00
Added icons to main menu
Added icons to entries and groups with a mapping Created a Converter to handle pluralization Several UI enhancements
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System.ComponentModel;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using ModernKeePass.Mappings;
|
||||
using ModernKeePassLib;
|
||||
using ModernKeePassLib.Security;
|
||||
|
||||
@@ -32,6 +34,15 @@ namespace ModernKeePass.ViewModels
|
||||
set { SetEntryValue(PwDefs.NotesField, value); }
|
||||
}
|
||||
|
||||
public Symbol IconSymbol
|
||||
{
|
||||
get
|
||||
{
|
||||
var result = PwIconToSegoeMapping.GetSymbolFromIcon(_pwEntry.IconId);
|
||||
return result == Symbol.More ? Symbol.Permissions : result;
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private readonly PwEntry _pwEntry;
|
||||
|
@@ -1,6 +1,8 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using ModernKeePass.Mappings;
|
||||
using ModernKeePassLib;
|
||||
|
||||
namespace ModernKeePass.ViewModels
|
||||
@@ -13,17 +15,16 @@ namespace ModernKeePass.ViewModels
|
||||
public ObservableCollection<GroupVm> Groups { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public string EntryCount {
|
||||
get
|
||||
{
|
||||
return $"{Entries?.Count} entries.";
|
||||
}
|
||||
}
|
||||
public string GroupCount
|
||||
public int EntryCount => Entries.Count;
|
||||
|
||||
public int GroupCount => Groups.Count;
|
||||
|
||||
public Symbol IconSymbol
|
||||
{
|
||||
get
|
||||
{
|
||||
return $"{Groups?.Count} groups.";
|
||||
var result = PwIconToSegoeMapping.GetSymbolFromIcon(_pwGroup.IconId);
|
||||
return result == Symbol.More ? Symbol.Folder : result;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user