From 5c267c73957ed693d7e67d9230a032e94959c000 Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Thu, 20 Jul 2023 23:58:50 +0100 Subject: [PATCH] Add UDMUX proxy status as server info, fix stuff --- Bloxstrap/App.xaml.cs | 4 +++- .../UI/Elements/ContextMenu/ServerInformation.xaml | 12 ++++++++---- .../UI/Elements/Menu/Pages/IntegrationsPage.xaml | 4 ++-- Bloxstrap/UI/NotifyIconWrapper.cs | 2 ++ .../ContextMenu/ServerInformationViewModel.cs | 1 + 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Bloxstrap/App.xaml.cs b/Bloxstrap/App.xaml.cs index 41cdb98..cad5f42 100644 --- a/Bloxstrap/App.xaml.cs +++ b/Bloxstrap/App.xaml.cs @@ -316,7 +316,9 @@ namespace Bloxstrap // this ordering is very important as all wpf windows are shown as modal dialogs, mess it up and you'll end up blocking input to one of them dialog?.ShowBootstrapper(); - NotifyIcon?.InitializeContextMenu(); + + if (Settings.Prop.EnableActivityTracking) + NotifyIcon?.InitializeContextMenu(); bootstrapperTask.Wait(); diff --git a/Bloxstrap/UI/Elements/ContextMenu/ServerInformation.xaml b/Bloxstrap/UI/Elements/ContextMenu/ServerInformation.xaml index 3b5c804..95aa478 100644 --- a/Bloxstrap/UI/Elements/ContextMenu/ServerInformation.xaml +++ b/Bloxstrap/UI/Elements/ContextMenu/ServerInformation.xaml @@ -11,7 +11,7 @@ Title="Server information" MinWidth="0" MinHeight="0" - Width="400" + Width="420" SizeToContent="Height" ResizeMode="NoResize" Background="{ui:ThemeResource ApplicationBackgroundBrush}" @@ -31,20 +31,24 @@ + - + - + - + + + + diff --git a/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml index 4e89f64..293ea57 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml @@ -25,8 +25,8 @@ - - + + diff --git a/Bloxstrap/UI/NotifyIconWrapper.cs b/Bloxstrap/UI/NotifyIconWrapper.cs index 4520e6e..3e3c381 100644 --- a/Bloxstrap/UI/NotifyIconWrapper.cs +++ b/Bloxstrap/UI/NotifyIconWrapper.cs @@ -60,6 +60,8 @@ namespace Bloxstrap.UI if (_menuContainer is not null) return; + App.Logger.WriteLine("[NotifyIconWrapper::InitializeContextMenu] Initializing context menu"); + _menuContainer = new(_activityWatcher, _richPresenceHandler); _menuContainer.ShowDialog(); } diff --git a/Bloxstrap/UI/ViewModels/ContextMenu/ServerInformationViewModel.cs b/Bloxstrap/UI/ViewModels/ContextMenu/ServerInformationViewModel.cs index 609d2dc..7be5a92 100644 --- a/Bloxstrap/UI/ViewModels/ContextMenu/ServerInformationViewModel.cs +++ b/Bloxstrap/UI/ViewModels/ContextMenu/ServerInformationViewModel.cs @@ -13,6 +13,7 @@ namespace Bloxstrap.UI.ViewModels.ContextMenu public string InstanceId => _activityWatcher.ActivityJobId; public string ServerType => $"{_activityWatcher.ActivityServerType} server"; public string ServerLocation { get; private set; } = "Loading, please wait..."; + public string UdmuxProxied => _activityWatcher.ActivityMachineUDMUX ? "Yes" : "No"; public ICommand CopyInstanceIdCommand => new RelayCommand(CopyInstanceId); public ICommand CloseWindowCommand => new RelayCommand(_window.Close);