New group text is now visible again in Group and Settings pages

This commit is contained in:
BONNEVILLE Geoffroy
2017-12-06 18:29:19 +01:00
parent 3b66824c58
commit 026bfcba78
6 changed files with 65 additions and 25 deletions

View File

@@ -3,7 +3,6 @@ using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using Windows.UI.Text;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using ModernKeePass.Common;
@@ -25,15 +24,12 @@ namespace ModernKeePass.ViewModels
}
public ObservableCollection<GroupVm> Groups { get; set; } = new ObservableCollection<GroupVm>();
public int EntryCount => Entries.Count;
// TODO: put in a converter
public FontWeight FontWeight => _pwGroup == null ? FontWeights.Bold : FontWeights.Normal;
public int GroupCount => Groups.Count - 1;
public PwUuid IdUuid => _pwGroup?.Uuid;
public string Id => IdUuid?.ToHexString();
public bool IsNotRoot => ParentGroup != null;
public bool ShowRestore => IsNotRoot && ParentGroup.IsSelected;
public bool IsRecycleOnDelete => _database.RecycleBinEnabled && !IsSelected && !ParentGroup.IsSelected;
@@ -78,6 +74,12 @@ namespace ModernKeePass.ViewModels
set { SetProperty(ref _isEditMode, value); }
}
public bool IsMenuClosed
{
get { return _isMenuClosed; }
set { SetProperty(ref _isMenuClosed, value); }
}
public string Filter
{
get { return _filter; }
@@ -108,6 +110,7 @@ namespace ModernKeePass.ViewModels
private PwEntry _reorderedEntry;
private ObservableCollection<EntryVm> _entries = new ObservableCollection<EntryVm>();
private string _filter = string.Empty;
private bool _isMenuClosed = true;
public GroupVm() {}

View File

@@ -93,7 +93,7 @@ namespace ModernKeePass.ViewModels
public SettingsDatabaseVm(IDatabase database)
{
_database = database;
Groups = _database.RootGroup.Groups;
Groups = _database?.RootGroup.Groups;
}
}
}