]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Remove two obsolete buttons from the Admin UI (#40904)
authorErrant <35878406+Errant-4@users.noreply.github.com>
Fri, 17 Oct 2025 15:27:21 +0000 (17:27 +0200)
committerGitHub <noreply@github.com>
Fri, 17 Oct 2025 15:27:21 +0000 (15:27 +0000)
remove unused UIs

Content.Client/Administration/UI/Tabs/AdminTab/AdminTab.xaml
Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml [deleted file]
Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml.cs [deleted file]
Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml [deleted file]
Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml.cs [deleted file]
Resources/Locale/en-US/administration/ui/tabs/admin-tab/player-actions-window.ftl

index 0d4668d5bfd7d86a0dced59e57e230897e862cd7..783d4c61061e538246bcb47d0e5f19280986fe22 100644 (file)
@@ -7,10 +7,8 @@
     MinSize="50 50">
     <BoxContainer Orientation="Vertical">
         <GridContainer Columns="3">
-            <cc:UICommandButton Command="kick" Text="{Loc admin-player-actions-window-title}" WindowType="{x:Type at:PlayerActionsWindow}" />
             <cc:CommandButton Command="banpanel" Text="{Loc admin-player-actions-window-ban}" />
             <cc:CommandButton Command="aghost" Text="{Loc admin-player-actions-window-admin-ghost}" />
-            <cc:UICommandButton Command="tpto" Text="{Loc admin-player-actions-window-teleport}" WindowType="{x:Type at:TeleportWindow}" />
             <cc:CommandButton Command="permissions" Text="{Loc admin-player-actions-window-permissions}" />
             <cc:CommandButton Command="announceui" Text="{Loc admin-player-actions-window-announce}"/>
             <cc:UICommandButton Command="callshuttle" Text="{Loc admin-player-actions-window-shuttle}" WindowType="{x:Type at:AdminShuttleWindow}"/>
diff --git a/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml b/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml
deleted file mode 100644 (file)
index 10718c2..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<DefaultWindow
-    xmlns="https://spacestation14.io"
-    xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
-    xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
-    Title="{Loc admin-player-actions-window-title}" MinSize="425 272">
-    <BoxContainer Orientation="Vertical">
-        <BoxContainer Orientation="Horizontal">
-            <Label Text="{Loc admin-player-actions-reason}" MinWidth="100" />
-            <Control MinWidth="50" />
-            <LineEdit Name="ReasonLine" MinWidth="100" HorizontalExpand="True" />
-        </BoxContainer>
-        <cc:PlayerListControl Name="PlayerList" VerticalExpand="True" />
-        <BoxContainer Orientation="Horizontal">
-            <controls:ConfirmButton Name="SubmitKickButton" Text="{Loc admin-player-actions-kick}" ConfirmationText="{Loc 'admin-player-actions-confirm'}" Disabled="True"/>
-            <Button Name="SubmitAHelpButton" Text="{Loc admin-player-actions-ahelp}" Disabled="True"/>
-            <controls:ConfirmButton Name="SubmitRespawnButton" Text="{Loc admin-player-actions-respawn}" ConfirmationText="{Loc 'admin-player-actions-confirm'}" Disabled="True"/>
-        </BoxContainer>
-    </BoxContainer>
-</DefaultWindow>
diff --git a/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml.cs b/Content.Client/Administration/UI/Tabs/AdminTab/PlayerActionsWindow.xaml.cs
deleted file mode 100644 (file)
index 2216b6d..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-using Content.Shared.Administration;
-using JetBrains.Annotations;
-using Robust.Client.AutoGenerated;
-using Robust.Client.Console;
-using Robust.Client.UserInterface.Controls;
-using Robust.Client.UserInterface.CustomControls;
-using Robust.Client.UserInterface.XAML;
-using Robust.Shared.Utility;
-
-namespace Content.Client.Administration.UI.Tabs.AdminTab
-{
-    [GenerateTypedNameReferences]
-    [UsedImplicitly]
-    public sealed partial class PlayerActionsWindow : DefaultWindow
-    {
-        private PlayerInfo? _selectedPlayer;
-
-        public PlayerActionsWindow()
-        {
-            RobustXamlLoader.Load(this);
-
-            SubmitKickButton.OnPressed += SubmitKickButtonOnPressed;
-            SubmitAHelpButton.OnPressed += SubmitAhelpButtonOnPressed;
-            SubmitRespawnButton.OnPressed += SubmitRespawnButtonOnPressed;
-            PlayerList.OnSelectionChanged += OnListOnOnSelectionChanged;
-        }
-
-        private void OnListOnOnSelectionChanged(PlayerInfo? obj)
-        {
-            _selectedPlayer = obj;
-            var disableButtons = _selectedPlayer == null;
-            SubmitKickButton.Disabled = disableButtons;
-            SubmitAHelpButton.Disabled = disableButtons;
-            SubmitRespawnButton.Disabled = disableButtons;
-        }
-
-        private void SubmitKickButtonOnPressed(BaseButton.ButtonEventArgs obj)
-        {
-            if (_selectedPlayer == null)
-                return;
-
-            IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand(
-                $"kick \"{_selectedPlayer.Username}\" \"{CommandParsing.Escape(ReasonLine.Text)}\"");
-        }
-
-        private void SubmitAhelpButtonOnPressed(BaseButton.ButtonEventArgs obj)
-        {
-            if (_selectedPlayer == null)
-                return;
-
-            IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand(
-                $"openahelp \"{_selectedPlayer.SessionId}\"");
-        }
-
-        private void SubmitRespawnButtonOnPressed(BaseButton.ButtonEventArgs obj)
-        {
-            if (_selectedPlayer == null)
-                return;
-
-            IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand(
-                $"respawn \"{_selectedPlayer.Username}\"");
-        }
-    }
-}
diff --git a/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml b/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml
deleted file mode 100644 (file)
index cceb21f..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<DefaultWindow
-    xmlns="https://spacestation14.io"
-    xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"
-    Title="{Loc admin-ui-teleport}" MinSize="425 230">
-    <BoxContainer Orientation="Vertical">
-        <cc:PlayerListControl Name="PlayerList" />
-        <Button Name="SubmitButton" Text="{Loc admin-ui-teleport}" />
-    </BoxContainer>
-</DefaultWindow>
diff --git a/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml.cs b/Content.Client/Administration/UI/Tabs/AdminTab/TeleportWindow.xaml.cs
deleted file mode 100644 (file)
index 1978b5c..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-using Content.Shared.Administration;
-using JetBrains.Annotations;
-using Robust.Client.AutoGenerated;
-using Robust.Client.Console;
-using Robust.Client.UserInterface.Controls;
-using Robust.Client.UserInterface.CustomControls;
-using Robust.Shared.IoC;
-
-namespace Content.Client.Administration.UI.Tabs.AdminTab
-{
-    [GenerateTypedNameReferences]
-    [UsedImplicitly]
-    public sealed partial class TeleportWindow : DefaultWindow
-    {
-        private PlayerInfo? _selectedPlayer;
-
-        protected override void EnteredTree()
-        {
-            SubmitButton.OnPressed += SubmitButtonOnOnPressed;
-            PlayerList.OnSelectionChanged += OnListOnOnSelectionChanged;
-        }
-
-        private void OnListOnOnSelectionChanged(PlayerInfo? obj)
-        {
-            _selectedPlayer = obj;
-            SubmitButton.Disabled = _selectedPlayer == null;
-        }
-
-        private void SubmitButtonOnOnPressed(BaseButton.ButtonEventArgs obj)
-        {
-            if (_selectedPlayer == null)
-                return;
-            // Execute command
-            IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand(
-                $"tpto \"{_selectedPlayer.Username}\"");
-        }
-    }
-}
index 62b253e3f5744471bca95df8fe63d3993bec2255..171e25d29fed60068472eda36b375de0b7b4d334 100644 (file)
@@ -1,11 +1,8 @@
-admin-player-actions-window-title = Player Actions Panel
 admin-player-actions-window-ban = Banning panel
 admin-player-actions-window-admin-ghost = Admin Ghost
-admin-player-actions-window-teleport = Teleport
 admin-player-actions-window-permissions = Permissions Panel
 admin-player-actions-window-announce = Announce
 admin-player-actions-window-shuttle = (Re)call Shuttle
 admin-player-actions-window-admin-logs = Admin Logs
-admin-player-actions-window-admin-notes = Admin Notes
 admin-player-actions-window-admin-fax = Admin Fax
 admin-player-actions-window-admin-chat = Admin Chat