From d2add64897484f1688657ca032f7b0923164d79d Mon Sep 17 00:00:00 2001 From: Perry Fraser Date: Tue, 27 May 2025 19:44:15 -0400 Subject: [PATCH] tweak: add confirm to server restart button (#37849) --- Content.Client/Administration/UI/Tabs/ServerTab.xaml | 3 ++- Content.Client/Administration/UI/Tabs/ServerTab.xaml.cs | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Content.Client/Administration/UI/Tabs/ServerTab.xaml b/Content.Client/Administration/UI/Tabs/ServerTab.xaml index b998405835..80c186f7fd 100644 --- a/Content.Client/Administration/UI/Tabs/ServerTab.xaml +++ b/Content.Client/Administration/UI/Tabs/ServerTab.xaml @@ -1,11 +1,12 @@  - + diff --git a/Content.Client/Administration/UI/Tabs/ServerTab.xaml.cs b/Content.Client/Administration/UI/Tabs/ServerTab.xaml.cs index 24b92e42ce..7a70e42d06 100644 --- a/Content.Client/Administration/UI/Tabs/ServerTab.xaml.cs +++ b/Content.Client/Administration/UI/Tabs/ServerTab.xaml.cs @@ -1,5 +1,6 @@ using Content.Shared.CCVar; using Robust.Client.AutoGenerated; +using Robust.Client.Console; using Robust.Client.UserInterface; using Robust.Client.UserInterface.XAML; using Robust.Shared.Configuration; @@ -10,6 +11,7 @@ namespace Content.Client.Administration.UI.Tabs public sealed partial class ServerTab : Control { [Dependency] private readonly IConfigurationManager _config = default!; + [Dependency] private readonly IClientConsoleHost _console = default!; public ServerTab() { @@ -18,6 +20,8 @@ namespace Content.Client.Administration.UI.Tabs _config.OnValueChanged(CCVars.OocEnabled, OocEnabledChanged, true); _config.OnValueChanged(CCVars.LoocEnabled, LoocEnabledChanged, true); + + ServerShutdownButton.OnPressed += _ => _console.ExecuteCommand("shutdown"); } private void OocEnabledChanged(bool value) -- 2.51.2