Require holding CTRL to clear syncshell members again

This commit is contained in:
Loporrit
2023-12-09 13:17:47 +00:00
parent ea3ae92bbb
commit ea44872840

View File

@@ -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);