mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Can log into the nexus via the UI
This commit is contained in:
parent
a0b705e375
commit
5736102809
10
Wabbajack.App/Messages/NavigateBack.cs
Normal file
10
Wabbajack.App/Messages/NavigateBack.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace Wabbajack.App.Messages
|
||||
{
|
||||
public class NavigateBack
|
||||
{
|
||||
public NavigateBack()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
@ -87,6 +88,8 @@ namespace Wabbajack.App.ViewModels
|
||||
|
||||
token.ThrowIfCancellationRequested();
|
||||
await Task.Delay(500, token);
|
||||
|
||||
MessageBus.Instance.Send(new NavigateBack());
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user