Neighbourhood.omg.lol/WindowsMainPage.xaml.cs

25 lines
728 B
C#
Raw Normal View History

using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.WebView;
using Microsoft.AspNetCore.Components.WebView.Maui;
using Neighbourhood.omg.lol.Models;
using System.ComponentModel;
using System.Diagnostics;
namespace Neighbourhood.omg.lol {
public partial class WindowsMainPage : ContentPage {
private State State { get; set; }
public WindowsMainPage() {
InitializeComponent();
}
private void BlazorUrlLoading(object? sender, UrlLoadingEventArgs e) {
if (e.Url.Host == "home.omg.lol" && e.Url.AbsolutePath == "/oauth/authorize") {
e.UrlLoadingStrategy = UrlLoadingStrategy.CancelLoad;
Shell.Current.GoToAsync(nameof(LoginWebViewPage));
}
}
}
}