Implemented better ux for the oauth2 workflow

Still wip
This commit is contained in:
Masu Baumgartner
2024-10-20 01:05:46 +02:00
parent f166de1a43
commit c4c3d1bd60
7 changed files with 178 additions and 13 deletions

View File

@@ -0,0 +1,19 @@
using Microsoft.JSInterop;
namespace Moonlight.Client.Services;
public class WindowService
{
private readonly IJSRuntime JsRuntime;
public WindowService(IJSRuntime jsRuntime)
{
JsRuntime = jsRuntime;
}
public async Task Open(string url, string title, int height, int width)
=> await JsRuntime.InvokeVoidAsync("moonlight.window.open", url, title, height, width);
public async Task Close()
=> await JsRuntime.InvokeVoidAsync("moonlight.window.closeCurrent");
}