Implemented better ux for the oauth2 workflow
Still wip
This commit is contained in:
19
Moonlight.Client/Services/WindowService.cs
Normal file
19
Moonlight.Client/Services/WindowService.cs
Normal 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");
|
||||
}
|
||||
Reference in New Issue
Block a user