Neighbourhood.omg.lol/MainPage.xaml.cs

26 lines
754 B
C#
Raw Normal View History

using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.WebView;
using Microsoft.AspNetCore.Components.WebView.Maui;
using System.Diagnostics;
namespace Neighbourhood.omg.lol {
2024-05-30 01:06:08 +00:00
public partial class MainPage : ContentPage {
2024-05-30 01:06:08 +00:00
public MainPage() {
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));
}
}
protected override void OnAppearing() {
base.OnAppearing();
Debug.WriteLine("And now you're back. From outer space.");
}
2024-05-30 01:06:08 +00:00
}
}