diff --git a/ModernKeePass/Pages/GroupDetailPage.xaml b/ModernKeePass/Pages/GroupDetailPage.xaml index c2c6892..6315b92 100644 --- a/ModernKeePass/Pages/GroupDetailPage.xaml +++ b/ModernKeePass/Pages/GroupDetailPage.xaml @@ -9,6 +9,7 @@ xmlns:core="using:Microsoft.Xaml.Interactions.Core" xmlns:actions="using:ModernKeePass.Actions" xmlns:controls="using:ModernKeePass.Controls" + xmlns:templateSelectors="using:ModernKeePass.TemplateSelectors" x:Name="PageRoot" x:Class="ModernKeePass.Pages.GroupDetailPage" mc:Ignorable="d" > @@ -111,7 +112,7 @@ - + - - - - - - - - + - - + + + + + + + + + + + + + + + + @@ -155,19 +163,21 @@ - - - - + - + + + + diff --git a/ModernKeePass/Pages/SettingsPageFrames/SettingsDatabasePage.xaml b/ModernKeePass/Pages/SettingsPageFrames/SettingsDatabasePage.xaml index aaa46bd..127119a 100644 --- a/ModernKeePass/Pages/SettingsPageFrames/SettingsDatabasePage.xaml +++ b/ModernKeePass/Pages/SettingsPageFrames/SettingsDatabasePage.xaml @@ -4,7 +4,8 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:viewModels="using:ModernKeePass.ViewModels" + xmlns:viewModels="using:ModernKeePass.ViewModels" + xmlns:templateSelectors="using:ModernKeePass.TemplateSelectors" mc:Ignorable="d"> @@ -18,7 +19,21 @@ - + + + + + + + + + + + + + diff --git a/ModernKeePass/Strings/en-US/Resources.resw b/ModernKeePass/Strings/en-US/Resources.resw index 081d059..862ef53 100644 --- a/ModernKeePass/Strings/en-US/Resources.resw +++ b/ModernKeePass/Strings/en-US/Resources.resw @@ -192,6 +192,12 @@ Create new entry + + < New group > + + + < New group > + Search... diff --git a/ModernKeePass/Strings/fr-FR/Resources.resw b/ModernKeePass/Strings/fr-FR/Resources.resw index 12e1e6e..09fd9ff 100644 --- a/ModernKeePass/Strings/fr-FR/Resources.resw +++ b/ModernKeePass/Strings/fr-FR/Resources.resw @@ -192,6 +192,12 @@ Créer une nouvelle entrée + + < Nouveau groupe > + + + < Nouveau groupe > + Rechercher... diff --git a/ModernKeePass/ViewModels/GroupVm.cs b/ModernKeePass/ViewModels/GroupVm.cs index af70b9e..89183df 100644 --- a/ModernKeePass/ViewModels/GroupVm.cs +++ b/ModernKeePass/ViewModels/GroupVm.cs @@ -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 Groups { get; set; } = new ObservableCollection(); - - 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 _entries = new ObservableCollection(); private string _filter = string.Empty; + private bool _isMenuClosed = true; public GroupVm() {} diff --git a/ModernKeePass/ViewModels/Items/SettingsDatabaseVm.cs b/ModernKeePass/ViewModels/Items/SettingsDatabaseVm.cs index 1d306a5..70d6e5c 100644 --- a/ModernKeePass/ViewModels/Items/SettingsDatabaseVm.cs +++ b/ModernKeePass/ViewModels/Items/SettingsDatabaseVm.cs @@ -93,7 +93,7 @@ namespace ModernKeePass.ViewModels public SettingsDatabaseVm(IDatabase database) { _database = database; - Groups = _database.RootGroup.Groups; + Groups = _database?.RootGroup.Groups; } } }