2.0.0 (#92)
All checks were successful
Tag and Release Lightless / tag-and-release (push) Successful in 2m27s
All checks were successful
Tag and Release Lightless / tag-and-release (push) Successful in 2m27s
2.0.0 Changes: - Reworked shell finder UI with compact or list view with profile tags showing with the listing, allowing moderators to broadcast the syncshell as well to have it be used more. - Reworked user list in syncshell admin screen to have filter visible and moved away from table to its own thing, allowing to copy uid/note/alias when clicking on the name. - Reworked download bars and download box to make it look more modern, removed the jitter around, so it shouldn't vibrate around much. - Chat has been added to the top menu, working in Zone or in Syncshells to be used there. - Paired system has been revamped to make pausing and unpausing faster, and loading people should be faster as well. - Moved to the internal object table to have faster load times for users; people should load in faster - Compactor is running on a multi-threaded level instead of single-threaded; this should increase the speed of compacting files - Nameplate Service has been reworked so it wouldn't use the nameplate handler anymore. - Files can be resized when downloading to reduce load on users if they aren't compressed. (can be toggled to resize all). - Penumbra Collections are now only made when people are visible, reducing the load on boot-up when having many syncshells in your list. - Lightfinder plates have been moved away from using Nameplates, but will use an overlay. - Main UI has been changed a bit with a gradient, and on hover will glow up now. - Reworked Profile UI for Syncshell and Users to be more user-facing with more customizable items. - Reworked Settings UI to look more modern. - Performance should be better due to new systems that would dispose of the collections and better caching of items. Co-authored-by: defnotken <itsdefnotken@gmail.com> Co-authored-by: azyges <aaaaaa@aaa.aaa> Co-authored-by: choco <choco@patat.nl> Co-authored-by: cake <admin@cakeandbanana.nl> Co-authored-by: Minmoose <KennethBohr@outlook.com> Reviewed-on: #92
This commit was merged in pull request #92.
This commit is contained in:
@@ -12,9 +12,10 @@ using LightlessSync.Services;
|
||||
using LightlessSync.Services.Mediator;
|
||||
using LightlessSync.Services.ServerConfiguration;
|
||||
using LightlessSync.UI.Handlers;
|
||||
using LightlessSync.UI.Models;
|
||||
using LightlessSync.UI.Style;
|
||||
using LightlessSync.Utils;
|
||||
using LightlessSync.WebAPI;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Text;
|
||||
|
||||
@@ -27,29 +28,43 @@ public class DrawUserPair
|
||||
protected readonly LightlessMediator _mediator;
|
||||
protected readonly List<GroupFullInfoDto> _syncedGroups;
|
||||
private readonly GroupFullInfoDto? _currentGroup;
|
||||
protected Pair _pair;
|
||||
protected Pair? _pair;
|
||||
private PairUiEntry _uiEntry;
|
||||
protected PairDisplayEntry _displayEntry;
|
||||
private readonly string _id;
|
||||
private readonly SelectTagForPairUi _selectTagForPairUi;
|
||||
private readonly ServerConfigurationManager _serverConfigurationManager;
|
||||
private readonly UiSharedService _uiSharedService;
|
||||
private readonly PlayerPerformanceConfigService _performanceConfigService;
|
||||
private readonly LightlessConfigService _configService;
|
||||
private readonly CharaDataManager _charaDataManager;
|
||||
private readonly PairLedger _pairLedger;
|
||||
private float _menuWidth = -1;
|
||||
private bool _wasHovered = false;
|
||||
private TooltipSnapshot _tooltipSnapshot = TooltipSnapshot.Empty;
|
||||
private string _cachedTooltip = string.Empty;
|
||||
|
||||
public DrawUserPair(string id, Pair entry, List<GroupFullInfoDto> syncedGroups,
|
||||
public DrawUserPair(
|
||||
string id,
|
||||
PairUiEntry uiEntry,
|
||||
Pair? legacyPair,
|
||||
GroupFullInfoDto? currentGroup,
|
||||
ApiController apiController, IdDisplayHandler uIDDisplayHandler,
|
||||
LightlessMediator lightlessMediator, SelectTagForPairUi selectTagForPairUi,
|
||||
ApiController apiController,
|
||||
IdDisplayHandler uIDDisplayHandler,
|
||||
LightlessMediator lightlessMediator,
|
||||
SelectTagForPairUi selectTagForPairUi,
|
||||
ServerConfigurationManager serverConfigurationManager,
|
||||
UiSharedService uiSharedService, PlayerPerformanceConfigService performanceConfigService,
|
||||
CharaDataManager charaDataManager)
|
||||
UiSharedService uiSharedService,
|
||||
PlayerPerformanceConfigService performanceConfigService,
|
||||
LightlessConfigService configService,
|
||||
CharaDataManager charaDataManager,
|
||||
PairLedger pairLedger)
|
||||
{
|
||||
_id = id;
|
||||
_pair = entry;
|
||||
_syncedGroups = syncedGroups;
|
||||
_uiEntry = uiEntry;
|
||||
_displayEntry = uiEntry.DisplayEntry;
|
||||
_pair = legacyPair ?? throw new ArgumentNullException(nameof(legacyPair));
|
||||
_syncedGroups = uiEntry.DisplayEntry.Groups.ToList();
|
||||
_currentGroup = currentGroup;
|
||||
_apiController = apiController;
|
||||
_displayHandler = uIDDisplayHandler;
|
||||
@@ -58,7 +73,20 @@ public class DrawUserPair
|
||||
_serverConfigurationManager = serverConfigurationManager;
|
||||
_uiSharedService = uiSharedService;
|
||||
_performanceConfigService = performanceConfigService;
|
||||
_configService = configService;
|
||||
_charaDataManager = charaDataManager;
|
||||
_pairLedger = pairLedger;
|
||||
}
|
||||
|
||||
public PairDisplayEntry DisplayEntry => _displayEntry;
|
||||
public PairUiEntry UiEntry => _uiEntry;
|
||||
|
||||
public void UpdateDisplayEntry(PairUiEntry entry)
|
||||
{
|
||||
_uiEntry = entry;
|
||||
_displayEntry = entry.DisplayEntry;
|
||||
_syncedGroups.Clear();
|
||||
_syncedGroups.AddRange(entry.DisplayEntry.Groups);
|
||||
}
|
||||
|
||||
public Pair Pair => _pair;
|
||||
@@ -77,6 +105,10 @@ public class DrawUserPair
|
||||
DrawName(posX, rightSide);
|
||||
}
|
||||
_wasHovered = ImGui.IsItemHovered();
|
||||
if (_wasHovered)
|
||||
{
|
||||
Selune.RegisterHighlight(ImGui.GetItemRectMin(), ImGui.GetItemRectMax(), spanFullWidth: true);
|
||||
}
|
||||
color.Dispose();
|
||||
}
|
||||
|
||||
@@ -103,7 +135,7 @@ public class DrawUserPair
|
||||
|
||||
if (_uiSharedService.IconTextButton(FontAwesomeIcon.PlayCircle, "Cycle pause state", _menuWidth, true))
|
||||
{
|
||||
_ = _apiController.CyclePauseAsync(_pair.UserData);
|
||||
_ = _apiController.CyclePauseAsync(_pair);
|
||||
ImGui.CloseCurrentPopup();
|
||||
}
|
||||
ImGui.Separator();
|
||||
@@ -197,6 +229,11 @@ public class DrawUserPair
|
||||
private void DrawLeftSide()
|
||||
{
|
||||
ImGui.AlignTextToFramePadding();
|
||||
|
||||
if (_pair == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_pair.IsPaused)
|
||||
{
|
||||
@@ -213,7 +250,19 @@ public class DrawUserPair
|
||||
}
|
||||
else if (_pair.IsVisible)
|
||||
{
|
||||
_uiSharedService.IconText(FontAwesomeIcon.Eye, UIColors.Get("LightlessBlue"));
|
||||
if (_configService.Current.ShowVisiblePairsGreenEye)
|
||||
{
|
||||
_uiSharedService.IconText(FontAwesomeIcon.Eye, UIColors.Get("LightlessGreen"));
|
||||
}
|
||||
else
|
||||
{
|
||||
_uiSharedService.IconText(FontAwesomeIcon.Eye, UIColors.Get("LightlessBlue"));
|
||||
}
|
||||
|
||||
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenBlockedByActiveItem | ImGuiHoveredFlags.AllowWhenOverlapped | ImGuiHoveredFlags.AllowWhenDisabled))
|
||||
{
|
||||
_mediator.Publish(new PairFocusCharacterMessage(_pair));
|
||||
}
|
||||
if (ImGui.IsItemClicked())
|
||||
{
|
||||
_mediator.Publish(new TargetPairMessage(_pair));
|
||||
@@ -313,6 +362,7 @@ public class DrawUserPair
|
||||
_pair.PlayerName ?? string.Empty,
|
||||
_pair.LastAppliedDataBytes,
|
||||
_pair.LastAppliedApproximateVRAMBytes,
|
||||
_pair.LastAppliedApproximateEffectiveVRAMBytes,
|
||||
_pair.LastAppliedDataTris,
|
||||
_pair.IsPaired,
|
||||
groupDisplays is null ? ImmutableArray<string>.Empty : ImmutableArray.CreateRange(groupDisplays));
|
||||
@@ -381,7 +431,14 @@ public class DrawUserPair
|
||||
{
|
||||
builder.Append(Environment.NewLine);
|
||||
builder.Append("Approx. VRAM Usage: ");
|
||||
builder.Append(UiSharedService.ByteToString(snapshot.LastAppliedApproximateVRAMBytes, true));
|
||||
var originalText = UiSharedService.ByteToString(snapshot.LastAppliedApproximateVRAMBytes, true);
|
||||
builder.Append(originalText);
|
||||
if (snapshot.LastAppliedApproximateEffectiveVRAMBytes >= 0)
|
||||
{
|
||||
builder.Append(" (Effective: ");
|
||||
builder.Append(UiSharedService.ByteToString(snapshot.LastAppliedApproximateEffectiveVRAMBytes, true));
|
||||
builder.Append(')');
|
||||
}
|
||||
}
|
||||
|
||||
if (snapshot.LastAppliedDataTris >= 0)
|
||||
@@ -420,12 +477,13 @@ public class DrawUserPair
|
||||
string PlayerName,
|
||||
long LastAppliedDataBytes,
|
||||
long LastAppliedApproximateVRAMBytes,
|
||||
long LastAppliedApproximateEffectiveVRAMBytes,
|
||||
long LastAppliedDataTris,
|
||||
bool IsPaired,
|
||||
ImmutableArray<string> GroupDisplays)
|
||||
{
|
||||
public static TooltipSnapshot Empty { get; } =
|
||||
new(false, false, false, IndividualPairStatus.None, string.Empty, string.Empty, -1, -1, -1, false, ImmutableArray<string>.Empty);
|
||||
new(false, false, false, IndividualPairStatus.None, string.Empty, string.Empty, -1, -1, -1, -1, false, ImmutableArray<string>.Empty);
|
||||
}
|
||||
|
||||
private void DrawPairedClientMenu()
|
||||
@@ -647,7 +705,13 @@ public class DrawUserPair
|
||||
|
||||
private void DrawSyncshellMenu(GroupFullInfoDto group, bool selfIsOwner, bool selfIsModerator, bool userIsPinned, bool userIsModerator)
|
||||
{
|
||||
if (selfIsOwner || ((selfIsModerator) && (!userIsModerator)))
|
||||
var showModeratorActions = selfIsOwner || (selfIsModerator && !userIsModerator);
|
||||
var showOwnerActions = selfIsOwner;
|
||||
|
||||
if (showModeratorActions || showOwnerActions)
|
||||
ImGui.Separator();
|
||||
|
||||
if (showModeratorActions)
|
||||
{
|
||||
ImGui.TextUnformatted("Syncshell Moderator Functions");
|
||||
var pinText = userIsPinned ? "Unpin user" : "Pin user";
|
||||
@@ -683,7 +747,7 @@ public class DrawUserPair
|
||||
ImGui.Separator();
|
||||
}
|
||||
|
||||
if (selfIsOwner)
|
||||
if (showOwnerActions)
|
||||
{
|
||||
ImGui.TextUnformatted("Syncshell Owner Functions");
|
||||
string modText = userIsModerator ? "Demod user" : "Mod user";
|
||||
|
||||
Reference in New Issue
Block a user