improvements to settings page
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
@@ -28,6 +31,9 @@ namespace APIToolkit
|
||||
this.SetTitleBar(AppTitleBar);
|
||||
|
||||
ContentArea.Navigate(typeof(URLShortener)); // Set default page
|
||||
|
||||
GlobalMethods.WebRequest.BaseAddress = new Uri("https://enstrayed.com/api/"); // Set base address for web requests being made
|
||||
GlobalMethods.WebRequest.DefaultRequestHeaders.UserAgent.ParseAdd($"DotNet/{Environment.Version} APIToolkit/{GlobalMethods.Version}"); // Set user agent of client
|
||||
}
|
||||
|
||||
private void NavigationView_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args)
|
||||
@@ -51,4 +57,10 @@ namespace APIToolkit
|
||||
}
|
||||
}
|
||||
|
||||
public static class GlobalMethods
|
||||
{
|
||||
public static HttpClient WebRequest = new();
|
||||
public static string Version = "1.0";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user