mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Removed half-baked import feature for now
No views depend on services anymore Dirty status fully handled by behavior
This commit is contained in:
@@ -137,25 +137,34 @@ namespace ModernKeePass.ViewModels
|
||||
Entries.CollectionChanged += Entries_CollectionChanged;
|
||||
Groups = new ObservableCollection<GroupVm>(_group.SubGroups);
|
||||
}
|
||||
|
||||
public void GoToEntry(string entryId, bool isNew = false)
|
||||
{
|
||||
_navigation.NavigateTo(Constants.Navigation.EntryPage, new NavigationItem
|
||||
{
|
||||
Id = entryId,
|
||||
IsNew = isNew
|
||||
});
|
||||
}
|
||||
public void GoToGroup(string entryId, bool isNew = false)
|
||||
{
|
||||
_navigation.NavigateTo(Constants.Navigation.GroupPage, new NavigationItem
|
||||
{
|
||||
Id = entryId,
|
||||
IsNew = isNew
|
||||
});
|
||||
}
|
||||
|
||||
public async Task AddNewGroup(string name = "")
|
||||
{
|
||||
var group = await _mediator.Send(new CreateGroupCommand {Name = name, ParentGroup = _group});
|
||||
_navigation.NavigateTo(Constants.Navigation.GroupPage, new NavigationItem
|
||||
{
|
||||
Id = group.Id,
|
||||
IsNew = true
|
||||
});
|
||||
GoToGroup(group.Id, true);
|
||||
}
|
||||
|
||||
public async Task AddNewEntry()
|
||||
{
|
||||
var entry = await _mediator.Send(new CreateEntryCommand { ParentGroup = _group });
|
||||
_navigation.NavigateTo(Constants.Navigation.EntryPage, new NavigationItem
|
||||
{
|
||||
Id = entry.Id,
|
||||
IsNew = true
|
||||
});
|
||||
GoToEntry(entry.Id, true);
|
||||
}
|
||||
|
||||
public async Task Move(GroupVm destination)
|
||||
|
Reference in New Issue
Block a user