WIP History

Restore from history works
This commit is contained in:
Geoffroy BONNEVILLE
2020-04-15 19:06:13 +02:00
parent 0063ef1977
commit 98ac418f62
10 changed files with 144 additions and 37 deletions

View File

@@ -47,7 +47,7 @@ namespace ModernKeePass.Views
if (args != null)
{
DataContext = new EntryDetailVm(args.Id) { IsEditMode = args.IsNew };
await Model.GeneratePassword();
if (args.IsNew) await Model.GeneratePassword();
}
}
@@ -80,10 +80,5 @@ namespace ModernKeePass.Views
break;
}
}
private async void Username_OnLostFocus(object sender, RoutedEventArgs e)
{
await Model.SetFieldValue(nameof(Model.UserName), ((TextBox) sender).Text);
}
}
}