From d1a60fafe78c4b3b8cf521601506b92840c2afe3 Mon Sep 17 00:00:00 2001 From: nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com> Date: Fri, 9 Aug 2024 08:33:25 +0300 Subject: [PATCH] Implement a playerpanel (#30238) * Basic structure for the player panel ui * Ensure basic functionality Player panel now receives and displays basic info * Make whitelistcommands accept user ids * Make PlayerPanel use GUIDs where possible * Add functionality to most playerpanel buttons * Implement remaining playerpanel features * Localize everything * Finish up * Put command arguments in quotes I am not sure if it's even possible to have something like a space in them considering they are guids and usernames but sure why not * Make playerpanel a verb * Add Logs button to player panel * Change Notesbutton text and make whitelistbutton a confirmtion button * Add freeze button that does not mute the player * Add sharedconnections counter to playerpanel * Make the playetime format clearer * Allow for copying of the a player's username * Do minor cleanup * Rearrange buttons * Fix unfreeze button not updating * Fix wrong localisation text * "Fix" the same role ban counting multiple times The way rolebans are stored is horrible. As such if you ban someone from a departmenrt or something role bans are individually placed for every role. The only way I found to distinguish them is the bantime. This is horrible but I do not want to rewrite how all the bans are stored right now. * Add Delete and Rejuvenate buttons to player panel By popular demand * Marginally improve ui * Add logs * review update * Fix verb * Fix double notes --------- Co-authored-by: metalgearsloth --- .../UI/PlayerPanel/PlayerPanel.xaml | 36 +++ .../UI/PlayerPanel/PlayerPanel.xaml.cs | 132 +++++++++++ .../UI/PlayerPanel/PlayerPanelEui.cs | 72 ++++++ .../Commands/PlayerPanelCommand.cs | 56 +++++ .../Administration/PlayerPanelEui.cs | 210 ++++++++++++++++++ .../Administration/Systems/AdminVerbSystem.cs | 9 + Content.Server/Whitelist/WhitelistCommands.cs | 4 +- .../Administration/PlayerPanelEuiState.cs | 54 +++++ .../en-US/administration/ui/actions.ftl | 1 + .../en-US/administration/ui/player-panel.ftl | 22 ++ .../Locale/en-US/connection-messages.ftl | 4 +- Resources/Locale/en-US/info/playerpanel.ftl | 7 + 12 files changed, 603 insertions(+), 4 deletions(-) create mode 100644 Content.Client/Administration/UI/PlayerPanel/PlayerPanel.xaml create mode 100644 Content.Client/Administration/UI/PlayerPanel/PlayerPanel.xaml.cs create mode 100644 Content.Client/Administration/UI/PlayerPanel/PlayerPanelEui.cs create mode 100644 Content.Server/Administration/Commands/PlayerPanelCommand.cs create mode 100644 Content.Server/Administration/PlayerPanelEui.cs create mode 100644 Content.Shared/Administration/PlayerPanelEuiState.cs create mode 100644 Resources/Locale/en-US/administration/ui/player-panel.ftl create mode 100644 Resources/Locale/en-US/info/playerpanel.ftl diff --git a/Content.Client/Administration/UI/PlayerPanel/PlayerPanel.xaml b/Content.Client/Administration/UI/PlayerPanel/PlayerPanel.xaml new file mode 100644 index 0000000000..8feec273b4 --- /dev/null +++ b/Content.Client/Administration/UI/PlayerPanel/PlayerPanel.xaml @@ -0,0 +1,36 @@ + + + +