add owner and moderator icons to syncshell display
This commit is contained in:
@@ -215,6 +215,15 @@ namespace MareSynchronos.UI
|
||||
ImGui.SameLine();
|
||||
}
|
||||
|
||||
if (group.IsModerator ?? false)
|
||||
{
|
||||
ImGui.PushFont(UiBuilder.IconFont);
|
||||
ImGui.Text(FontAwesomeIcon.UserShield.ToIconString());
|
||||
ImGui.PopFont();
|
||||
UiShared.AttachToolTip("You are a moderator of Syncshell " + groupName);
|
||||
ImGui.SameLine();
|
||||
}
|
||||
|
||||
_showGidForEntry.TryGetValue(group.GID, out var showGidInsteadOfName);
|
||||
if (!showGidInsteadOfName && _configuration.GetCurrentServerGidComments().TryGetValue(group.GID, out var groupComment))
|
||||
{
|
||||
@@ -473,8 +482,8 @@ namespace MareSynchronos.UI
|
||||
var textSize = ImGui.CalcTextSize(entryUID);
|
||||
var originalY = ImGui.GetCursorPosY();
|
||||
var buttonSizes = plusButtonSize.Y;
|
||||
var userIsMod = string.Equals(entry.UserUID, ownerUid, StringComparison.Ordinal);
|
||||
var userIsOwner = string.Equals(entry.UserAlias, ownerUid, StringComparison.Ordinal);
|
||||
var userIsMod = entry.IsModerator ?? false;
|
||||
var userIsOwner = string.Equals(entryUID, ownerUid, StringComparison.Ordinal);
|
||||
|
||||
var textPos = originalY + plusButtonSize.Y / 2 - textSize.Y / 2;
|
||||
ImGui.SetCursorPosY(textPos);
|
||||
@@ -495,7 +504,16 @@ namespace MareSynchronos.UI
|
||||
UiShared.AttachToolTip("You are paired with " + entryUID);
|
||||
}
|
||||
|
||||
if (entry.IsModerator ?? false)
|
||||
if (userIsOwner)
|
||||
{
|
||||
ImGui.SameLine();
|
||||
ImGui.SetCursorPosY(textPos);
|
||||
ImGui.PushFont(UiBuilder.IconFont);
|
||||
ImGui.TextUnformatted(FontAwesomeIcon.Crown.ToIconString());
|
||||
ImGui.PopFont();
|
||||
UiShared.AttachToolTip("User is owner of this Syncshell");
|
||||
}
|
||||
else if (userIsMod)
|
||||
{
|
||||
ImGui.SameLine();
|
||||
ImGui.SetCursorPosY(textPos);
|
||||
@@ -504,9 +522,7 @@ namespace MareSynchronos.UI
|
||||
ImGui.PopFont();
|
||||
UiShared.AttachToolTip("User is moderator of this Syncshell");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (entry.IsPinned ?? false)
|
||||
else if (entry.IsPinned ?? false)
|
||||
{
|
||||
ImGui.SameLine();
|
||||
ImGui.SetCursorPosY(textPos);
|
||||
@@ -515,7 +531,6 @@ namespace MareSynchronos.UI
|
||||
ImGui.PopFont();
|
||||
UiShared.AttachToolTip("User is pinned in this Syncshell");
|
||||
}
|
||||
}
|
||||
|
||||
var textIsUid = true;
|
||||
_mainUi.ShowUidForEntry.TryGetValue(entry.UserUID, out var showUidInsteadOfName);
|
||||
|
||||
Reference in New Issue
Block a user