From b540154bc736da15448282ccc74afb146d96b8d2 Mon Sep 17 00:00:00 2001 From: kawaiizenbo <48113593+kawaiizenbo@users.noreply.github.com> Date: Fri, 12 Jul 2024 17:48:39 -0700 Subject: [PATCH] name change surgery 2 !!! --- README.md | 4 ++-- UniversalFedi/MainPage.xaml | 8 ++++---- UniversalFedi/MainPage.xaml.cs | 15 +++++++++++++++ UniversalFedi/SelectInstancePage.xaml.cs | 5 +++-- UniversalFedi/StatusPage.xaml | 2 +- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e7a816a..612e079 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# WMstodon -Mastodon client for Windows 10 Mobile made without API Libraries +# UniversalFedi +Fedi client (Mastodon API) for Windows 10 Mobile made without API Libraries ## Requirements - Windows 10 Creators Update (version 1703) or later (or Windows 11) diff --git a/UniversalFedi/MainPage.xaml b/UniversalFedi/MainPage.xaml index e41dffe..82d1193 100644 --- a/UniversalFedi/MainPage.xaml +++ b/UniversalFedi/MainPage.xaml @@ -2,7 +2,7 @@ x:Class="UniversalFedi.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:WMstodon" + xmlns:local="using:UniversalFedi" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" @@ -11,11 +11,11 @@ - + - - + + diff --git a/UniversalFedi/MainPage.xaml.cs b/UniversalFedi/MainPage.xaml.cs index 694578b..644d037 100644 --- a/UniversalFedi/MainPage.xaml.cs +++ b/UniversalFedi/MainPage.xaml.cs @@ -26,6 +26,21 @@ namespace UniversalFedi protected async override void OnNavigatedTo(NavigationEventArgs e) { + string topString = "Loading"; + switch (localSettings.Values["timelineMode"]) + { + case "home": + topString = "Home Timeline"; + break; + case "public": + topString = "Federated Timeline"; + break; + case "public?local=true": + topString = "Local Timeline"; + break; + } + TimelineText.Text = topString; + string accountJSON; try diff --git a/UniversalFedi/SelectInstancePage.xaml.cs b/UniversalFedi/SelectInstancePage.xaml.cs index abc771f..e1cef38 100644 --- a/UniversalFedi/SelectInstancePage.xaml.cs +++ b/UniversalFedi/SelectInstancePage.xaml.cs @@ -25,10 +25,10 @@ namespace UniversalFedi private async void NextButton_Click(object sender, RoutedEventArgs e) { Dictionary postopts = new Dictionary(); - postopts["client_name"] = "WMStodon"; + postopts["client_name"] = "UniversalFedi"; postopts["redirect_uris"] = "urn:ietf:wg:oauth:2.0:oob"; postopts["scopes"] = "read write push"; - postopts["website"] = "https://github.com/kawaiizenbo/WMStodon"; + postopts["website"] = "https://github.com/kawaiizenbo/UniversalFedi"; HttpResponseMessage response = await HTTPUtils.POSTGenericAsync(InstanceURLTextBox.Text + "/api/v1/apps", new FormUrlEncodedContent(postopts)); if (response.StatusCode == HttpStatusCode.OK) @@ -42,6 +42,7 @@ namespace UniversalFedi private void Page_Loaded(object sender, RoutedEventArgs e) { + if (localSettings.Values["timelineMode"] == null) localSettings.Values["timelineMode"] = "home"; if (localSettings.Values["instanceURL"] != null && localSettings.Values["accessToken"] != null) Frame.Navigate(typeof(MainPage), null); } } diff --git a/UniversalFedi/StatusPage.xaml b/UniversalFedi/StatusPage.xaml index ee7c897..08f04ae 100644 --- a/UniversalFedi/StatusPage.xaml +++ b/UniversalFedi/StatusPage.xaml @@ -2,7 +2,7 @@ x:Class="UniversalFedi.StatusPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:WMstodon" + xmlns:local="using:UniversalFedi" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"