From 21843bba823aa5850ab9febf1c1daa60e2ad230f Mon Sep 17 00:00:00 2001
From: Patchzy <64382339+patchzyy@users.noreply.github.com>
Date: Fri, 5 Jun 2026 09:27:35 +0200
Subject: [PATCH] Add sidebar settings button and testing UI polish
---
WheelWizard/Views/Layout.axaml | 30 +-
WheelWizard/Views/Layout.axaml.cs | 13 +
WheelWizard/Views/Pages/TestingPage.axaml | 289 ++++++++++++------
WheelWizard/Views/Pages/TestingPage.axaml.cs | 20 ++
.../Views/Styles/Resources/Icons.axaml | 4 +-
5 files changed, 263 insertions(+), 93 deletions(-)
diff --git a/WheelWizard/Views/Layout.axaml b/WheelWizard/Views/Layout.axaml
index 3ee845c5..7f880645 100644
--- a/WheelWizard/Views/Layout.axaml
+++ b/WheelWizard/Views/Layout.axaml
@@ -129,11 +129,9 @@
PageType="{x:Type pages:FriendsPage}"
BoxText="0/0" />
-
+
-
@@ -142,7 +140,7 @@
Text="Kitchen Sink" x:Name="KitchenSinkButton" />
-
+
+
+
+
+
+
diff --git a/WheelWizard/Views/Layout.axaml.cs b/WheelWizard/Views/Layout.axaml.cs
index 679ed5b2..1e4c283b 100644
--- a/WheelWizard/Views/Layout.axaml.cs
+++ b/WheelWizard/Views/Layout.axaml.cs
@@ -104,6 +104,7 @@ public Layout()
#if DEBUG
KitchenSinkButton.IsVisible = true;
#endif
+ UpdateOtherSectionVisibility();
}
protected override void OnLoaded(RoutedEventArgs e)
@@ -365,6 +366,12 @@ private async void TitleLabel_OnPointerPressed(object? sender, PointerPressedEve
private void UpdateTestingButtonVisibility()
{
TestingButton.IsVisible = SettingsService.Get(SettingsService.TESTING_MODE_ENABLED);
+ UpdateOtherSectionVisibility();
+ }
+
+ private void UpdateOtherSectionVisibility()
+ {
+ OtherSectionText.IsVisible = TestingButton.IsVisible || KitchenSinkButton.IsVisible;
}
private void SidebarInfoButton_OnPointerPressed(object? sender, PointerPressedEventArgs e)
@@ -373,6 +380,12 @@ private void SidebarInfoButton_OnPointerPressed(object? sender, PointerPressedEv
e.Handled = true;
}
+ private void SidebarSettingsButton_OnPointerPressed(object? sender, PointerPressedEventArgs e)
+ {
+ NavigationManager.NavigateTo();
+ e.Handled = true;
+ }
+
private void SidebarProfileBlock_OnPointerEntered(object? sender, PointerEventArgs e)
{
SidebarProfileBlock.Background = GetResourceBrush("Neutral800");
diff --git a/WheelWizard/Views/Pages/TestingPage.axaml b/WheelWizard/Views/Pages/TestingPage.axaml
index 928f0ec3..432087c1 100644
--- a/WheelWizard/Views/Pages/TestingPage.axaml
+++ b/WheelWizard/Views/Pages/TestingPage.axaml
@@ -3,108 +3,223 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:components="clr-namespace:WheelWizard.Views.Components"
- xmlns:loc="clr-namespace:WheelWizard.Localization"
mc:Ignorable="d" d:DesignWidth="370" d:DesignHeight="520"
x:Class="WheelWizard.Views.Pages.TestingPage">
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
diff --git a/WheelWizard/Views/Pages/TestingPage.axaml.cs b/WheelWizard/Views/Pages/TestingPage.axaml.cs
index 63282aa8..65fb4b86 100644
--- a/WheelWizard/Views/Pages/TestingPage.axaml.cs
+++ b/WheelWizard/Views/Pages/TestingPage.axaml.cs
@@ -61,6 +61,26 @@ private void UpdateUi()
WheelWizardStatus.OutOfDate => "Update available",
_ => "Checking status...",
};
+
+ StatusPill.Classes.Remove("ready");
+ StatusPill.Classes.Remove("warning");
+ StatusPill.Classes.Remove("danger");
+
+ switch (_status)
+ {
+ case WheelWizardStatus.Ready:
+ StatusPill.Classes.Add("ready");
+ break;
+ case WheelWizardStatus.ConfigNotFinished:
+ case WheelWizardStatus.OutOfDate:
+ case WheelWizardStatus.Loading:
+ StatusPill.Classes.Add("warning");
+ break;
+ case WheelWizardStatus.NoServer:
+ case WheelWizardStatus.NoServerButInstalled:
+ StatusPill.Classes.Add("danger");
+ break;
+ }
}
private async void InstallButton_OnClick(object? sender, RoutedEventArgs e)
diff --git a/WheelWizard/Views/Styles/Resources/Icons.axaml b/WheelWizard/Views/Styles/Resources/Icons.axaml
index cfc2e9bc..cab692d4 100644
--- a/WheelWizard/Views/Styles/Resources/Icons.axaml
+++ b/WheelWizard/Views/Styles/Resources/Icons.axaml
@@ -36,6 +36,7 @@
+
@@ -144,6 +145,7 @@
M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z
M128 136c0-22.1-17.9-40-40-40L40 96C17.9 96 0 113.9 0 136l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zm0 192c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zm32-192l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40zM288 328c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zm32-192l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40zM448 328c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48z
M352 320c88.4 0 160-71.6 160-160c0-15.3-2.2-30.1-6.2-44.2c-3.1-10.8-16.4-13.2-24.3-5.3l-76.8 76.8c-3 3-7.1 4.7-11.3 4.7L336 192c-8.8 0-16-7.2-16-16l0-57.4c0-4.2 1.7-8.3 4.7-11.3l76.8-76.8c7.9-7.9 5.4-21.2-5.3-24.3C382.1 2.2 367.3 0 352 0C263.6 0 192 71.6 192 160c0 19.1 3.4 37.5 9.5 54.5L19.9 396.1C7.2 408.8 0 426.1 0 444.1C0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L297.5 310.5c17 6.2 35.4 9.5 54.5 9.5zM80 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48z
+ M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-27.8 3.5-42.2 3.5s-28.4-1.2-42.2-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4l-55.7 17.7c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4c-1.1-8.3-1.7-16.8-1.7-25.4s.6-17.1 1.7-25.4l-43.3-39.4c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.8 1.2 241.8 0 256.2 0s28.4 1.2 42.2 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160a80 80 0 1 0 0 160z
M256 32l-74.8 0c-27.1 0-51.3 17.1-60.3 42.6L3.1 407.2C1.1 413 0 419.2 0 425.4C0 455.5 24.5 480 54.6 480L256 480l0-64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 64 201.4 0c30.2 0 54.6-24.5 54.6-54.6c0-6.2-1.1-12.4-3.1-18.2L455.1 74.6C446 49.1 421.9 32 394.8 32L320 32l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64zm64 192l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32s32 14.3 32 32z
M288 32l-74.8 0c-27.1 0-51.3 17.1-60.3 42.6L35.1 407.2c-2.1 5.9-3.1 12-3.1 18.2C32 455.5 56.5 480 86.6 480L288 480l0-64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 64 32 0 0-128c0-23.7 12.9-44.4 32-55.4l0-24.6c0-58.3 44.6-106.2 101.5-111.5L487.1 74.6C478 49.1 453.9 32 426.8 32L352 32l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64zm64 192l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32s32 14.3 32 32zm176 16c17.7 0 32 14.3 32 32l0 48-64 0 0-48c0-17.7 14.3-32 32-32zm-80 32l0 48c-17.7 0-32 14.3-32 32l0 128c0 17.7 14.3 32 32 32l160 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32l0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80z
@@ -189,4 +191,4 @@
M160 0a48 48 0 1 1 0 96 48 48 0 1 1 0-96zM88 384l-17.8 0c-10.9 0-18.6-10.7-15.2-21.1L93.3 248.1 59.4 304.5c-9.1 15.1-28.8 20-43.9 10.9s-20-28.8-10.9-43.9l53.6-89.2c20.3-33.7 56.7-54.3 96-54.3l11.6 0c39.3 0 75.7 20.6 96 54.3l53.6 89.2c9.1 15.1 4.2 34.8-10.9 43.9s-34.8 4.2-43.9-10.9l-33.9-56.3L265 362.9c3.5 10.4-4.3 21.1-15.2 21.1L232 384l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96-16 0 0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96z
M23 23v466h466v-18H41v-82.184l85.854-57.234 70.023 70.022 65.133-260.536L387.28 203.7l67.79-107.97 19.317 11.858 6.102-71.1-60.644 37.616 19.884 12.207-59.01 93.99-130.732-65.366-62.865 251.462-57.98-57.978L41 367.184V23H23z
M352 160C352 142.3 366.3 128 384 128C401.7 128 416 142.3 416 160C416 177.7 430.3 192 448 192C465.7 192 480 177.7 480 160C480 107 437 64 384 64C331 64 288 107 288 160L288 352L224 352L224 312C224 281.1 198.9 256 168 256L120 256C106.7 256 96 266.7 96 280C96 293.3 106.7 304 120 304L168 304C172.4 304 176 307.6 176 312L176 352L96 352C78.3 352 64 366.3 64 384C64 401.7 78.3 416 96 416L96 480C96 533 139 576 192 576L448 576C501 576 544 533 544 480L544 416C561.7 416 576 401.7 576 384C576 366.3 561.7 352 544 352L464 352L464 312C464 307.6 467.6 304 472 304L528 304C541.3 304 552 293.3 552 280C552 266.7 541.3 256 528 256L472 256C441.1 256 416 281.1 416 312L416 352L352 352L352 160z
-
\ No newline at end of file
+