commit changes
This commit is contained in:
14
Pages/SendEmail.xaml
Normal file
14
Pages/SendEmail.xaml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Page
|
||||
x:Class="APIToolkit.SendEmail"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:APIToolkit"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid>
|
||||
<Button Content="SendEmail"/>
|
||||
</Grid>
|
||||
</Page>
|
||||
31
Pages/SendEmail.xaml.cs
Normal file
31
Pages/SendEmail.xaml.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||
using Microsoft.UI.Xaml.Data;
|
||||
using Microsoft.UI.Xaml.Input;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
|
||||
namespace APIToolkit
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class SendEmail : Page
|
||||
{
|
||||
public SendEmail()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
96
Pages/Settings.xaml
Normal file
96
Pages/Settings.xaml
Normal file
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Page
|
||||
x:Class="APIToolkit.Settings"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:APIToolkit"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid Margin="36,36,36,36" x:Name="Settings_MainGrid">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Margin: Left Top Right Bottom-->
|
||||
|
||||
<Expander Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" IsExpanded="True">
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<FontIcon Glyph="" Margin="0,0,12,0"/>
|
||||
<TextBlock Text="Authentication"/>
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
<Expander.Content>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0">
|
||||
<TextBlock Text="Token" Margin="0,0,12,0" VerticalAlignment="Center"/>
|
||||
<PasswordBox MinWidth="300" Margin="0,0,12,0"/>
|
||||
<Button Content="Save"/>
|
||||
</StackPanel>
|
||||
</Expander.Content>
|
||||
</Expander>
|
||||
|
||||
|
||||
<Expander Grid.Column="0" Grid.Row="1" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left">
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<FontIcon Glyph="" Margin="0,0,12,0"/>
|
||||
<TextBlock Text="Diagnostics (HTTP Headers)"/>
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
<Expander.Content>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition MinHeight="30"/>
|
||||
<RowDefinition MinHeight="30"/>
|
||||
<RowDefinition MinHeight="30"/>
|
||||
<RowDefinition MinHeight="30"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Content="Refresh" Grid.Column="0" Grid.Row="4" VerticalAlignment="Center" Margin="0,12,0,0" Click="SettingsHeadersRefresh"/>
|
||||
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" Text="User Agent" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="Cloudflare Connecting IP" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="Cloudflare IP Country" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="Cloudflare Ray ID" VerticalAlignment="Center"/>
|
||||
|
||||
<TextBlock Grid.Column="1" Grid.Row="0" Text="" Name="SettingsHeadersUserAgent" VerticalAlignment="Center" FontFamily="Consolas" IsTextSelectionEnabled="True" TextWrapping="Wrap"/>
|
||||
<TextBlock Grid.Column="1" Grid.Row="1" Text="" Name="SettingsHeadersConnectingIp" VerticalAlignment="Center" FontFamily="Consolas" IsTextSelectionEnabled="True"/>
|
||||
<TextBlock Grid.Column="1" Grid.Row="2" Text="" Name="SettingsHeadersIpCountry" VerticalAlignment="Center" FontFamily="Consolas" IsTextSelectionEnabled="True"/>
|
||||
<TextBlock Grid.Column="1" Grid.Row="3" Text="" Name="SettingsHeadersRayId" VerticalAlignment="Center" FontFamily="Consolas" IsTextSelectionEnabled="True"/>
|
||||
|
||||
</Grid>
|
||||
</Expander.Content>
|
||||
</Expander>
|
||||
|
||||
<Expander Grid.Column="0" Grid.Row="2" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left">
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<FontIcon Glyph="" Margin="0,0,12,0"/>
|
||||
<TextBlock Text="Information"/>
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
<Expander.Content>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0">
|
||||
<Image Source="/Assets/Subject.png" MaxWidth="300"/>
|
||||
<StackPanel VerticalAlignment="Center" Margin="36,0,0,0">
|
||||
<TextBlock Text="Enstrayed API Toolkit" FontSize="32" Margin="0,0,0,8"/>
|
||||
<TextBlock Name="SettingsVersionLabel" FontSize="16" Margin="0,0,0,12"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Expander.Content>
|
||||
</Expander>
|
||||
</Grid>
|
||||
</Page>
|
||||
64
Pages/Settings.xaml.cs
Normal file
64
Pages/Settings.xaml.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using ABI.System;
|
||||
using APIToolkit.Classes;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||
using Microsoft.UI.Xaml.Data;
|
||||
using Microsoft.UI.Xaml.Input;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Json;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using System.Text.Json;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
|
||||
namespace APIToolkit
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class Settings : Page
|
||||
{
|
||||
public Settings()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
SettingsVersionLabel.Text = $"Version {GlobalMethods.Version}";
|
||||
}
|
||||
|
||||
private async void SettingsHeadersRefresh(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
string SettingsHeadersResponseJSON = await GlobalMethods.WebRequest.GetStringAsync("headers");
|
||||
var SettingsHeadersResponse = JsonSerializer.Deserialize<APIHeaders>(SettingsHeadersResponseJSON);
|
||||
if (SettingsHeadersResponse is not null)
|
||||
{
|
||||
SettingsHeadersUserAgent.Text = SettingsHeadersResponse.UserAgent;
|
||||
SettingsHeadersConnectingIp.Text = SettingsHeadersResponse.CfConnectingIp;
|
||||
SettingsHeadersIpCountry.Text = SettingsHeadersResponse.CfIpCountry;
|
||||
SettingsHeadersRayId.Text = SettingsHeadersResponse.CfRay;
|
||||
}
|
||||
else
|
||||
{
|
||||
UIFunctions.ShowError(Settings_MainGrid.XamlRoot, "SettingsHeadersResponse was null");
|
||||
}
|
||||
|
||||
}
|
||||
catch (System.Exception Error)
|
||||
{
|
||||
UIFunctions.ShowError(Settings_MainGrid.XamlRoot, Error.Message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
14
Pages/TokenManagement.xaml
Normal file
14
Pages/TokenManagement.xaml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Page
|
||||
x:Class="APIToolkit.TokenManagement"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:APIToolkit"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
31
Pages/TokenManagement.xaml.cs
Normal file
31
Pages/TokenManagement.xaml.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||
using Microsoft.UI.Xaml.Data;
|
||||
using Microsoft.UI.Xaml.Input;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
|
||||
namespace APIToolkit
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class TokenManagement : Page
|
||||
{
|
||||
public TokenManagement()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
53
Pages/URLShortener.xaml
Normal file
53
Pages/URLShortener.xaml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Page
|
||||
x:Class="APIToolkit.URLShortener"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:APIToolkit"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid Margin="36,36,36,36" x:Name="URLShortener_MainGrid">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Expander Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" IsExpanded="True">
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<FontIcon Glyph="" Margin="0,0,12,0"/>
|
||||
<TextBlock Text="Authentication"/>
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
<Expander.Content>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0">
|
||||
<TextBlock Text="Token" Margin="0,0,12,0" VerticalAlignment="Center"/>
|
||||
<PasswordBox MinWidth="300" Margin="0,0,12,0"/>
|
||||
<Button Content="Save"/>
|
||||
</StackPanel>
|
||||
</Expander.Content>
|
||||
</Expander>
|
||||
|
||||
<Expander Grid.Column="0" Grid.Row="1" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" IsExpanded="True">
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<FontIcon Glyph="" Margin="0,0,12,0"/>
|
||||
<TextBlock Text="Authentication"/>
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
<Expander.Content>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0">
|
||||
<TextBlock Text="Token" Margin="0,0,12,0" VerticalAlignment="Center"/>
|
||||
<PasswordBox MinWidth="300" Margin="0,0,12,0"/>
|
||||
<Button Content="Save"/>
|
||||
</StackPanel>
|
||||
</Expander.Content>
|
||||
</Expander>
|
||||
</Grid>
|
||||
</Page>
|
||||
31
Pages/URLShortener.xaml.cs
Normal file
31
Pages/URLShortener.xaml.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||
using Microsoft.UI.Xaml.Data;
|
||||
using Microsoft.UI.Xaml.Input;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
|
||||
namespace APIToolkit
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class URLShortener : Page
|
||||
{
|
||||
public URLShortener()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user