ui icon boogaloo
This commit is contained in:
@@ -71,7 +71,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
{
|
||||
bool isInvitesDisabled = perm.IsDisableInvites();
|
||||
|
||||
if (UiSharedService.IconTextButton(isInvitesDisabled ? FontAwesomeIcon.Unlock : FontAwesomeIcon.Lock,
|
||||
if (UiSharedService.NormalizedIconTextButton(isInvitesDisabled ? FontAwesomeIcon.Unlock : FontAwesomeIcon.Lock,
|
||||
isInvitesDisabled ? "Unlock Syncshell" : "Lock Syncshell"))
|
||||
{
|
||||
perm.SetDisableInvites(!isInvitesDisabled);
|
||||
@@ -81,7 +81,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
ImGuiHelpers.ScaledDummy(2f);
|
||||
|
||||
UiSharedService.TextWrapped("One-time invites work as single-use passwords. Use those if you do not want to distribute your Syncshell password.");
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.Envelope, "Single one-time invite"))
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Envelope, "Single one-time invite"))
|
||||
{
|
||||
ImGui.SetClipboardText(_apiController.GroupCreateTempInvite(new(GroupFullInfo.Group), 1).Result.FirstOrDefault() ?? string.Empty);
|
||||
}
|
||||
@@ -90,7 +90,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
ImGui.SameLine();
|
||||
using (ImRaii.Disabled(_multiInvites <= 1 || _multiInvites > 100))
|
||||
{
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.Envelope, "Generate " + _multiInvites + " one-time invites"))
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Envelope, "Generate " + _multiInvites + " one-time invites"))
|
||||
{
|
||||
_oneTimeInvites.AddRange(_apiController.GroupCreateTempInvite(new(GroupFullInfo.Group), _multiInvites).Result);
|
||||
}
|
||||
@@ -100,7 +100,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
{
|
||||
var invites = string.Join(Environment.NewLine, _oneTimeInvites);
|
||||
ImGui.InputTextMultiline("Generated Multi Invites", ref invites, 5000, new(0, 0), ImGuiInputTextFlags.ReadOnly);
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.Copy, "Copy Invites to clipboard"))
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Copy, "Copy Invites to clipboard"))
|
||||
{
|
||||
ImGui.SetClipboardText(invites);
|
||||
}
|
||||
@@ -111,7 +111,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
var mgmtTab = ImRaii.TabItem("User Management");
|
||||
if (mgmtTab)
|
||||
{
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.Broom, "Clear Syncshell"))
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Broom, "Clear Syncshell"))
|
||||
{
|
||||
_ = _apiController.GroupClear(new(GroupFullInfo.Group));
|
||||
}
|
||||
@@ -119,7 +119,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
|
||||
ImGuiHelpers.ScaledDummy(2f);
|
||||
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.Retweet, "Refresh Banlist from Server"))
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Retweet, "Refresh Banlist from Server"))
|
||||
{
|
||||
_bannedUsers = _apiController.GroupGetBannedUsers(new GroupDto(GroupFullInfo.Group)).Result;
|
||||
}
|
||||
@@ -148,7 +148,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
ImGui.TableNextColumn();
|
||||
UiSharedService.TextWrapped(bannedUser.Reason);
|
||||
ImGui.TableNextColumn();
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.Check, "Unban#" + bannedUser.UID))
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Check, "Unban#" + bannedUser.UID))
|
||||
{
|
||||
_ = _apiController.GroupUnbanUser(bannedUser);
|
||||
_bannedUsers.RemoveAll(b => string.Equals(b.UID, bannedUser.UID, StringComparison.Ordinal));
|
||||
@@ -171,7 +171,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
ImGui.Text("Suggest Sound Sync");
|
||||
UiSharedService.BooleanToColoredIcon(!isDisableSounds);
|
||||
ImGui.SameLine(230);
|
||||
if (UiSharedService.IconTextButton(isDisableSounds ? FontAwesomeIcon.VolumeUp : FontAwesomeIcon.VolumeMute,
|
||||
if (UiSharedService.NormalizedIconTextButton(isDisableSounds ? FontAwesomeIcon.VolumeUp : FontAwesomeIcon.VolumeMute,
|
||||
isDisableSounds ? "Suggest to enable sound sync" : "Suggest to disable sound sync"))
|
||||
{
|
||||
perm.SetPreferDisableSounds(!perm.IsPreferDisableSounds());
|
||||
@@ -182,7 +182,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
ImGui.Text("Suggest Animation Sync");
|
||||
UiSharedService.BooleanToColoredIcon(!isDisableAnimations);
|
||||
ImGui.SameLine(230);
|
||||
if (UiSharedService.IconTextButton(isDisableAnimations ? FontAwesomeIcon.Running : FontAwesomeIcon.Stop,
|
||||
if (UiSharedService.NormalizedIconTextButton(isDisableAnimations ? FontAwesomeIcon.Running : FontAwesomeIcon.Stop,
|
||||
isDisableAnimations ? "Suggest to enable animation sync" : "Suggest to disable animation sync"))
|
||||
{
|
||||
perm.SetPreferDisableAnimations(!perm.IsPreferDisableAnimations());
|
||||
@@ -193,7 +193,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
ImGui.Text("Suggest VFX Sync");
|
||||
UiSharedService.BooleanToColoredIcon(!isDisableVfx);
|
||||
ImGui.SameLine(230);
|
||||
if (UiSharedService.IconTextButton(isDisableVfx ? FontAwesomeIcon.Sun : FontAwesomeIcon.Circle,
|
||||
if (UiSharedService.NormalizedIconTextButton(isDisableVfx ? FontAwesomeIcon.Sun : FontAwesomeIcon.Circle,
|
||||
isDisableVfx ? "Suggest to enable vfx sync" : "Suggest to disable vfx sync"))
|
||||
{
|
||||
perm.SetPreferDisableVFX(!perm.IsPreferDisableVFX());
|
||||
@@ -212,7 +212,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextUnformatted("New Password");
|
||||
var availableWidth = ImGui.GetWindowContentRegionMax().X - ImGui.GetWindowContentRegionMin().X;
|
||||
var buttonSize = UiSharedService.GetIconTextButtonSize(FontAwesomeIcon.Passport, "Change Password").X;
|
||||
var buttonSize = UiSharedService.GetNormalizedIconTextButtonSize(FontAwesomeIcon.Passport, "Change Password").X;
|
||||
var textSize = ImGui.CalcTextSize("New Password").X;
|
||||
var spacing = ImGui.GetStyle().ItemSpacing.X;
|
||||
|
||||
@@ -222,7 +222,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
ImGui.SameLine();
|
||||
using (ImRaii.Disabled(_newPassword.Length < 10))
|
||||
{
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.Passport, "Change Password"))
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Passport, "Change Password"))
|
||||
{
|
||||
_pwChangeSuccess = _apiController.GroupChangePassword(new GroupPasswordDto(GroupFullInfo.Group, _newPassword)).Result;
|
||||
_newPassword = string.Empty;
|
||||
@@ -235,7 +235,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
UiSharedService.ColorTextWrapped("Failed to change the password. Password requires to be at least 10 characters long.", ImGuiColors.DalamudYellow);
|
||||
}
|
||||
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.Trash, "Delete Syncshell") && UiSharedService.CtrlPressed() && UiSharedService.ShiftPressed())
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Trash, "Delete Syncshell") && UiSharedService.CtrlPressed() && UiSharedService.ShiftPressed())
|
||||
{
|
||||
IsOpen = false;
|
||||
_ = _apiController.GroupDelete(new(GroupFullInfo.Group));
|
||||
|
||||
Reference in New Issue
Block a user