From ea448728409fe0c34e37aad8933f0d42b3e11f66 Mon Sep 17 00:00:00 2001 From: Loporrit <141286461+loporrit@users.noreply.github.com> Date: Sat, 9 Dec 2023 13:17:47 +0000 Subject: [PATCH] Require holding CTRL to clear syncshell members again --- MareSynchronos/UI/SyncshellAdminUI.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MareSynchronos/UI/SyncshellAdminUI.cs b/MareSynchronos/UI/SyncshellAdminUI.cs index 3c53997..df826e3 100644 --- a/MareSynchronos/UI/SyncshellAdminUI.cs +++ b/MareSynchronos/UI/SyncshellAdminUI.cs @@ -111,11 +111,13 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase var mgmtTab = ImRaii.TabItem("User Management"); if (mgmtTab) { - if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Broom, "Clear Syncshell")) + using (ImRaii.Disabled(!UiSharedService.CtrlPressed())) + if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Broom, "Clear Syncshell") && UiSharedService.CtrlPressed()) { _ = _apiController.GroupClear(new(GroupFullInfo.Group)); } - UiSharedService.AttachToolTip("This will remove all non-pinned, non-moderator users from the Syncshell"); + UiSharedService.AttachToolTip("Hold CTRL and click to clear this Syncshell." + Environment.NewLine + "WARNING: this action is irreversible." + Environment.NewLine + + "This will remove all non-pinned, non-moderator users from the Syncshell"); ImGuiHelpers.ScaledDummy(2f);