mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 16:57:22 +01:00
do not show remove user or ban user if user is owner or moderator
This commit is contained in:
parent
0599416f4c
commit
a042be9119
1 changed files with 7 additions and 7 deletions
|
|
@ -608,6 +608,11 @@ namespace MareSynchronos.UI
|
|||
_ = _apiController.SendChangeUserPinned(entry.GroupGID, entry.UserUID, !entry.IsPinned ?? false);
|
||||
}
|
||||
UiShared.AttachToolTip("Pin this user to the Syncshell. Pinned users will not be deleted in case of a manually initiated Syncshell clean");
|
||||
|
||||
var userIsMod = string.Equals(entry.UserUID, ownerUid, StringComparison.Ordinal);
|
||||
var userIsOwner = string.Equals(entry.UserAlias, ownerUid, StringComparison.Ordinal);
|
||||
if ((!entry.IsModerator ?? false) && !(userIsMod || userIsOwner))
|
||||
{
|
||||
if (UiShared.IconTextButton(FontAwesomeIcon.Trash, "Remove user"))
|
||||
{
|
||||
if (UiShared.CtrlPressed())
|
||||
|
|
@ -616,11 +621,6 @@ namespace MareSynchronos.UI
|
|||
}
|
||||
}
|
||||
|
||||
var userIsMod = string.Equals(entry.UserUID, ownerUid, StringComparison.Ordinal);
|
||||
var userIsOwner = string.Equals(entry.UserAlias, ownerUid, StringComparison.Ordinal);
|
||||
if ((!entry.IsModerator ?? false) && !(userIsMod || userIsOwner))
|
||||
{
|
||||
|
||||
UiShared.AttachToolTip("Hold CTRL and click to remove user " + (entry.UserAlias ?? entry.UserUID) + " from Syncshell");
|
||||
if (UiShared.IconTextButton(FontAwesomeIcon.UserSlash, "Ban User"))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue