Can log into the nexus via the UI

This commit is contained in:
Timothy Baldridge 2021-09-29 16:30:19 -06:00
parent a0b705e375
commit 5736102809
3 changed files with 21 additions and 3 deletions

View File

@ -0,0 +1,10 @@
namespace Wabbajack.App.Messages
{
public class NavigateBack
{
public NavigateBack()
{
}
}
}

View File

@ -21,7 +21,7 @@ using Wabbajack.RateLimiter;
namespace Wabbajack.App.ViewModels
{
public class MainWindowViewModel : ReactiveValidationObject, IActivatableViewModel, IReceiver<NavigateTo>
public class MainWindowViewModel : ReactiveValidationObject, IActivatableViewModel, IReceiver<NavigateTo>, IReceiver<NavigateBack>
{
private readonly IEnumerable<IScreenView> _screens;
private readonly IServiceProvider _provider;
@ -60,8 +60,7 @@ namespace Wabbajack.App.ViewModels
{
BackButton = ReactiveCommand.Create(() =>
{
CurrentScreen = BreadCrumbs.Peek();
BreadCrumbs = BreadCrumbs.Pop();
Receive(new NavigateBack());
},
this.ObservableForProperty(vm => vm.BreadCrumbs)
.Select(bc => bc.Value.Count() > 1))
@ -121,5 +120,11 @@ namespace Wabbajack.App.ViewModels
CurrentScreen = (Control)_screens.First(s => s.ViewModelType == val.ViewModel);
}
}
public void Receive(NavigateBack val)
{
CurrentScreen = BreadCrumbs.Peek();
BreadCrumbs = BreadCrumbs.Pop();
}
}
}

View File

@ -5,6 +5,7 @@ using System.Threading.Tasks;
using Fizzler.Systems.HtmlAgilityPack;
using Microsoft.Extensions.Logging;
using Wabbajack.App.Extensions;
using Wabbajack.App.Messages;
using Wabbajack.DTOs.Logins;
using Wabbajack.Services.OSIntegrated.TokenProviders;
@ -88,6 +89,8 @@ namespace Wabbajack.App.ViewModels
token.ThrowIfCancellationRequested();
await Task.Delay(500, token);
MessageBus.Instance.Send(new NavigateBack());
}
Instructions = "Success, saving information...";