add more options for the compactui
This commit is contained in:
@@ -27,8 +27,10 @@ public class MareConfig : IMareConfiguration
|
|||||||
public bool ProfilePopoutRight { get; set; } = false;
|
public bool ProfilePopoutRight { get; set; } = false;
|
||||||
public bool ProfilesAllowNsfw { get; set; } = false;
|
public bool ProfilesAllowNsfw { get; set; } = false;
|
||||||
public bool ProfilesShow { get; set; } = true;
|
public bool ProfilesShow { get; set; } = true;
|
||||||
|
public bool ShowSyncshellUsersInVisible { get; set; } = true;
|
||||||
public bool ShowCharacterNameInsteadOfNotesForVisible { get; set; } = false;
|
public bool ShowCharacterNameInsteadOfNotesForVisible { get; set; } = false;
|
||||||
public bool ShowOfflineUsersSeparately { get; set; } = true;
|
public bool ShowOfflineUsersSeparately { get; set; } = true;
|
||||||
|
public bool ShowSyncshellOfflineUsersSeparately { get; set; } = true;
|
||||||
public bool GroupUpSyncshells { get; set; } = true;
|
public bool GroupUpSyncshells { get; set; } = true;
|
||||||
public bool ShowOnlineNotifications { get; set; } = false;
|
public bool ShowOnlineNotifications { get; set; } = false;
|
||||||
public bool ShowOnlineNotificationsOnlyForIndividualPairs { get; set; } = true;
|
public bool ShowOnlineNotificationsOnlyForIndividualPairs { get; set; } = true;
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ public sealed class PairManager : DisposableMediatorSubscriberBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sendNotif && _configurationService.Current.ShowOnlineNotifications
|
if (sendNotif && _configurationService.Current.ShowOnlineNotifications
|
||||||
&& (_configurationService.Current.ShowOnlineNotificationsOnlyForIndividualPairs && pair.UserPair != null
|
&& (_configurationService.Current.ShowOnlineNotificationsOnlyForIndividualPairs && pair.IsDirectlyPaired && !pair.IsOneSidedPair
|
||||||
|| !_configurationService.Current.ShowOnlineNotificationsOnlyForIndividualPairs)
|
|| !_configurationService.Current.ShowOnlineNotificationsOnlyForIndividualPairs)
|
||||||
&& (_configurationService.Current.ShowOnlineNotificationsOnlyForNamedPairs && !string.IsNullOrEmpty(pair.GetNote())
|
&& (_configurationService.Current.ShowOnlineNotificationsOnlyForNamedPairs && !string.IsNullOrEmpty(pair.GetNote())
|
||||||
|| !_configurationService.Current.ShowOnlineNotificationsOnlyForNamedPairs))
|
|| !_configurationService.Current.ShowOnlineNotificationsOnlyForNamedPairs))
|
||||||
|
|||||||
@@ -484,7 +484,8 @@ public class CompactUi : WindowMediatorSubscriberBase
|
|||||||
|
|
||||||
if (_configService.Current.ShowVisibleUsersSeparately)
|
if (_configService.Current.ShowVisibleUsersSeparately)
|
||||||
{
|
{
|
||||||
var visibleUsers = users.Where(u => u.Key.IsVisible)
|
var visibleUsers = users.Where(u => u.Key.IsVisible &&
|
||||||
|
(_configService.Current.ShowSyncshellUsersInVisible || !(!_configService.Current.ShowSyncshellUsersInVisible && !u.Key.IsDirectlyPaired)))
|
||||||
.OrderBy(
|
.OrderBy(
|
||||||
u => _configService.Current.ShowCharacterNameInsteadOfNotesForVisible && !string.IsNullOrEmpty(u.Key.PlayerName)
|
u => _configService.Current.ShowCharacterNameInsteadOfNotesForVisible && !string.IsNullOrEmpty(u.Key.PlayerName)
|
||||||
? (_configService.Current.PreferNotesOverNamesForVisible ? u.Key.GetNote() : u.Key.PlayerName)
|
? (_configService.Current.PreferNotesOverNamesForVisible ? u.Key.GetNote() : u.Key.PlayerName)
|
||||||
@@ -563,13 +564,23 @@ public class CompactUi : WindowMediatorSubscriberBase
|
|||||||
|
|
||||||
if (_configService.Current.ShowOfflineUsersSeparately)
|
if (_configService.Current.ShowOfflineUsersSeparately)
|
||||||
{
|
{
|
||||||
var offlineUsersEntries = users.Where(u => (!u.Key.IsOneSidedPair || u.Value.Any()) && !u.Key.IsOnline && !u.Key.UserPair.OwnPermissions.IsPaused()).OrderBy(
|
var offlineUsersEntries = users.Where(u =>
|
||||||
|
((u.Key.IsDirectlyPaired && _configService.Current.ShowSyncshellOfflineUsersSeparately) || !_configService.Current.ShowSyncshellOfflineUsersSeparately)
|
||||||
|
&& (!u.Key.IsOneSidedPair || u.Value.Any()) && !u.Key.IsOnline && !u.Key.UserPair.OwnPermissions.IsPaused()).OrderBy(
|
||||||
u => _configService.Current.ShowCharacterNameInsteadOfNotesForVisible && !string.IsNullOrEmpty(u.Key.PlayerName)
|
u => _configService.Current.ShowCharacterNameInsteadOfNotesForVisible && !string.IsNullOrEmpty(u.Key.PlayerName)
|
||||||
? (_configService.Current.PreferNotesOverNamesForVisible ? u.Key.GetNote() : u.Key.PlayerName)
|
? (_configService.Current.PreferNotesOverNamesForVisible ? u.Key.GetNote() : u.Key.PlayerName)
|
||||||
: (u.Key.GetNote() ?? u.Key.UserData.AliasOrUID), StringComparer.OrdinalIgnoreCase)
|
: (u.Key.GetNote() ?? u.Key.UserData.AliasOrUID), StringComparer.OrdinalIgnoreCase)
|
||||||
.ToDictionary(u => u.Key, u => u.Value);
|
.ToDictionary(u => u.Key, u => u.Value);
|
||||||
|
|
||||||
drawFolders.Add(_drawEntityFactory.CreateDrawTagFolder(TagHandler.CustomOfflineTag, offlineUsersEntries));
|
drawFolders.Add(_drawEntityFactory.CreateDrawTagFolder(TagHandler.CustomOfflineTag, offlineUsersEntries));
|
||||||
|
if (_configService.Current.ShowSyncshellOfflineUsersSeparately)
|
||||||
|
{
|
||||||
|
var offlineSyncshellUsers = users.Where(u => !u.Key.IsDirectlyPaired && !u.Key.IsOnline && !u.Key.UserPair.OwnPermissions.IsPaused()).OrderBy(
|
||||||
|
u => _configService.Current.ShowCharacterNameInsteadOfNotesForVisible && !string.IsNullOrEmpty(u.Key.PlayerName)
|
||||||
|
? (_configService.Current.PreferNotesOverNamesForVisible ? u.Key.GetNote() : u.Key.PlayerName)
|
||||||
|
: (u.Key.GetNote() ?? u.Key.UserData.AliasOrUID), StringComparer.OrdinalIgnoreCase);
|
||||||
|
drawFolders.Add(_drawEntityFactory.CreateDrawTagFolder(TagHandler.CustomOfflineSyncshellTag, offlineSyncshellUsers.ToDictionary(k => k.Key, k => k.Value)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
drawFolders.Add(_drawEntityFactory.CreateDrawTagFolder(TagHandler.CustomUnpairedTag, users.Where(u => u.Key.IsOneSidedPair).ToDictionary(u => u.Key, u => u.Value)));
|
drawFolders.Add(_drawEntityFactory.CreateDrawTagFolder(TagHandler.CustomUnpairedTag, users.Where(u => u.Key.IsOneSidedPair).ToDictionary(u => u.Key, u => u.Value)));
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ public class DrawFolderTag : DrawFolderBase
|
|||||||
TagHandler.CustomOfflineTag => false,
|
TagHandler.CustomOfflineTag => false,
|
||||||
TagHandler.CustomVisibleTag => false,
|
TagHandler.CustomVisibleTag => false,
|
||||||
TagHandler.CustomAllTag => true,
|
TagHandler.CustomAllTag => true,
|
||||||
|
TagHandler.CustomOfflineSyncshellTag => false,
|
||||||
_ => true,
|
_ => true,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -37,6 +38,7 @@ public class DrawFolderTag : DrawFolderBase
|
|||||||
TagHandler.CustomOfflineTag => false,
|
TagHandler.CustomOfflineTag => false,
|
||||||
TagHandler.CustomVisibleTag => false,
|
TagHandler.CustomVisibleTag => false,
|
||||||
TagHandler.CustomAllTag => false,
|
TagHandler.CustomAllTag => false,
|
||||||
|
TagHandler.CustomOfflineSyncshellTag => false,
|
||||||
_ => true,
|
_ => true,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -47,6 +49,7 @@ public class DrawFolderTag : DrawFolderBase
|
|||||||
TagHandler.CustomOfflineTag => false,
|
TagHandler.CustomOfflineTag => false,
|
||||||
TagHandler.CustomVisibleTag => false,
|
TagHandler.CustomVisibleTag => false,
|
||||||
TagHandler.CustomAllTag => false,
|
TagHandler.CustomAllTag => false,
|
||||||
|
TagHandler.CustomOfflineSyncshellTag => false,
|
||||||
_ => true,
|
_ => true,
|
||||||
} && _drawPairs.Any();
|
} && _drawPairs.Any();
|
||||||
|
|
||||||
@@ -58,6 +61,7 @@ public class DrawFolderTag : DrawFolderBase
|
|||||||
TagHandler.CustomUnpairedTag => FontAwesomeIcon.ArrowsLeftRight.ToIconString(),
|
TagHandler.CustomUnpairedTag => FontAwesomeIcon.ArrowsLeftRight.ToIconString(),
|
||||||
TagHandler.CustomOnlineTag => FontAwesomeIcon.Link.ToIconString(),
|
TagHandler.CustomOnlineTag => FontAwesomeIcon.Link.ToIconString(),
|
||||||
TagHandler.CustomOfflineTag => FontAwesomeIcon.Unlink.ToIconString(),
|
TagHandler.CustomOfflineTag => FontAwesomeIcon.Unlink.ToIconString(),
|
||||||
|
TagHandler.CustomOfflineSyncshellTag => FontAwesomeIcon.Unlink.ToIconString(),
|
||||||
TagHandler.CustomVisibleTag => FontAwesomeIcon.Eye.ToIconString(),
|
TagHandler.CustomVisibleTag => FontAwesomeIcon.Eye.ToIconString(),
|
||||||
TagHandler.CustomAllTag => FontAwesomeIcon.User.ToIconString(),
|
TagHandler.CustomAllTag => FontAwesomeIcon.User.ToIconString(),
|
||||||
_ => FontAwesomeIcon.Folder.ToIconString()
|
_ => FontAwesomeIcon.Folder.ToIconString()
|
||||||
@@ -93,6 +97,7 @@ public class DrawFolderTag : DrawFolderBase
|
|||||||
TagHandler.CustomUnpairedTag => "One-sided Individual Pairs",
|
TagHandler.CustomUnpairedTag => "One-sided Individual Pairs",
|
||||||
TagHandler.CustomOnlineTag => "Online / Paused by you",
|
TagHandler.CustomOnlineTag => "Online / Paused by you",
|
||||||
TagHandler.CustomOfflineTag => "Offline / Paused by other",
|
TagHandler.CustomOfflineTag => "Offline / Paused by other",
|
||||||
|
TagHandler.CustomOfflineSyncshellTag => "Offline Syncshell Users",
|
||||||
TagHandler.CustomVisibleTag => "Visible",
|
TagHandler.CustomVisibleTag => "Visible",
|
||||||
TagHandler.CustomAllTag => "Users",
|
TagHandler.CustomAllTag => "Users",
|
||||||
_ => _id
|
_ => _id
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ public class TagHandler
|
|||||||
{
|
{
|
||||||
public const string CustomAllTag = "Mare_All";
|
public const string CustomAllTag = "Mare_All";
|
||||||
public const string CustomOfflineTag = "Mare_Offline";
|
public const string CustomOfflineTag = "Mare_Offline";
|
||||||
|
public const string CustomOfflineSyncshellTag = "Mare_OfflineSyncshell";
|
||||||
public const string CustomOnlineTag = "Mare_Online";
|
public const string CustomOnlineTag = "Mare_Online";
|
||||||
public const string CustomUnpairedTag = "Mare_Unpaired";
|
public const string CustomUnpairedTag = "Mare_Unpaired";
|
||||||
public const string CustomVisibleTag = "Mare_Visible";
|
public const string CustomVisibleTag = "Mare_Visible";
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
using Dalamud.Interface.Colors;
|
using Dalamud.Interface.Colors;
|
||||||
|
using Dalamud.Interface.Utility.Raii;
|
||||||
using Dalamud.Utility;
|
using Dalamud.Utility;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
using MareSynchronos.API.Data;
|
using MareSynchronos.API.Data;
|
||||||
@@ -560,6 +561,8 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
|||||||
var enableDtrEntry = _configService.Current.EnableDtrEntry;
|
var enableDtrEntry = _configService.Current.EnableDtrEntry;
|
||||||
var preferNotesInsteadOfName = _configService.Current.PreferNotesOverNamesForVisible;
|
var preferNotesInsteadOfName = _configService.Current.PreferNotesOverNamesForVisible;
|
||||||
var groupUpSyncshells = _configService.Current.GroupUpSyncshells;
|
var groupUpSyncshells = _configService.Current.GroupUpSyncshells;
|
||||||
|
var groupInVisible = _configService.Current.ShowSyncshellUsersInVisible;
|
||||||
|
var syncshellOfflineSeparate = _configService.Current.ShowSyncshellOfflineUsersSeparately;
|
||||||
|
|
||||||
if (ImGui.Checkbox("Enable Game Right Click Menu Entries", ref enableRightClickMenu))
|
if (ImGui.Checkbox("Enable Game Right Click Menu Entries", ref enableRightClickMenu))
|
||||||
{
|
{
|
||||||
@@ -583,6 +586,17 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
|||||||
}
|
}
|
||||||
UiSharedService.DrawHelpText("This will show all currently visible users in a special 'Visible' group in the main UI.");
|
UiSharedService.DrawHelpText("This will show all currently visible users in a special 'Visible' group in the main UI.");
|
||||||
|
|
||||||
|
using (ImRaii.Disabled(!showVisibleSeparate))
|
||||||
|
{
|
||||||
|
using var indent = ImRaii.PushIndent();
|
||||||
|
if (ImGui.Checkbox("Show Syncshell Users in Visible Group", ref groupInVisible))
|
||||||
|
{
|
||||||
|
_configService.Current.ShowSyncshellUsersInVisible = groupInVisible;
|
||||||
|
_configService.Save();
|
||||||
|
Mediator.Publish(new RefreshUiMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui.Checkbox("Show separate Offline group", ref showOfflineSeparate))
|
if (ImGui.Checkbox("Show separate Offline group", ref showOfflineSeparate))
|
||||||
{
|
{
|
||||||
_configService.Current.ShowOfflineUsersSeparately = showOfflineSeparate;
|
_configService.Current.ShowOfflineUsersSeparately = showOfflineSeparate;
|
||||||
@@ -591,6 +605,17 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
|||||||
}
|
}
|
||||||
UiSharedService.DrawHelpText("This will show all currently offline users in a special 'Offline' group in the main UI.");
|
UiSharedService.DrawHelpText("This will show all currently offline users in a special 'Offline' group in the main UI.");
|
||||||
|
|
||||||
|
using (ImRaii.Disabled(!showOfflineSeparate))
|
||||||
|
{
|
||||||
|
using var indent = ImRaii.PushIndent();
|
||||||
|
if (ImGui.Checkbox("Show separate Offline group for Syncshell users", ref syncshellOfflineSeparate))
|
||||||
|
{
|
||||||
|
_configService.Current.ShowSyncshellOfflineUsersSeparately = syncshellOfflineSeparate;
|
||||||
|
_configService.Save();
|
||||||
|
Mediator.Publish(new RefreshUiMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui.Checkbox("Group up all syncshells in one folder", ref groupUpSyncshells))
|
if (ImGui.Checkbox("Group up all syncshells in one folder", ref groupUpSyncshells))
|
||||||
{
|
{
|
||||||
_configService.Current.GroupUpSyncshells = groupUpSyncshells;
|
_configService.Current.GroupUpSyncshells = groupUpSyncshells;
|
||||||
|
|||||||
Reference in New Issue
Block a user