wabbajack/Wabbajack.App.Blazor/Pages/Settings.razor
2022-02-10 16:57:44 -07:00

41 lines
1.3 KiB
Plaintext

@page "/settings"
@using ReactiveUI
@using Wabbajack.App.Blazor.Browser.ViewModels
@using Wabbajack.App.Blazor.Messages
@using Microsoft.Extensions.DependencyInjection
@namespace Wabbajack.App.Blazor.Pages
@inject IServiceProvider _serviceProvider;
<div id="content">
<div class="resources">
<button onclick="@LoginToNexus">Login To Nexus</button>
<button onclick="@LoginToVectorPlexus">Login To Vector Plexus</button>
<button onclick="@LoginToLoversLab">Login To Lovers Lab</button>
<button onclick="@LoginToBethesdaNet">Login To Bethesda Net</button>
</div>
</div>
@code {
public const string Route = "/settings";
public void LoginToNexus()
{
MessageBus.Current.SendMessage(new OpenBrowserTab(_serviceProvider.GetRequiredService<NexusLogin>()));
}
public void LoginToLoversLab()
{
MessageBus.Current.SendMessage(new OpenBrowserTab(_serviceProvider.GetRequiredService<LoversLab>()));
}
public void LoginToVectorPlexus()
{
MessageBus.Current.SendMessage(new OpenBrowserTab(_serviceProvider.GetRequiredService<VectorPlexus>()));
}
public void LoginToBethesdaNet()
{
MessageBus.Current.SendMessage(new OpenBrowserTab(_serviceProvider.GetRequiredService<BethesdaNetLogin>()));
}
}