Merge pull request 'add stuff' (#63) from syncshell-profiles-2 into syncshell-profiles

Reviewed-on: #63
This commit was merged in pull request #63.
This commit is contained in:
2025-10-13 06:12:24 +02:00
3 changed files with 15 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@@ -91,6 +91,7 @@ public class EditProfileUi : WindowMediatorSubscriberBase
protected override void DrawInternal()
{
_uiSharedService.UnderlinedBigText("Notes and Rules for Profiles", UIColors.Get("LightlessYellow"));
ImGui.Dummy(new Vector2(5));
@@ -109,6 +110,7 @@ public class EditProfileUi : WindowMediatorSubscriberBase
ImGui.Dummy(new Vector2(3));
var profile = _lightlessProfileManager.GetLightlessUserProfile(new UserData(_apiController.UID));
_logger.LogInformation("Profile fetched for drawing: {profile}", profile);
if (ImGui.BeginTabBar("##EditProfileTabs"))
{

View File

@@ -32,8 +32,9 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
private readonly LightlessProfileManager _lightlessProfileManager;
private readonly FileDialogManager _fileDialogManager;
private readonly UiSharedService _uiSharedService;
private LightlessGroupProfileData _profileData = null;
private List<BannedGroupUserDto> _bannedUsers = [];
private LightlessGroupProfileData? _profileData = null;
private GroupData? _lastProfileGroup = null;
private bool _adjustedForScollBarsLocalProfile = false;
private bool _adjustedForScollBarsOnlineProfile = false;
private string _descriptionText = string.Empty;
@@ -86,9 +87,15 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
protected override void DrawInternal()
{
if (!_isModerator && !_isOwner) return;
//_logger.LogInformation("Drawing Syncshell Admin UI for {group}", GroupFullInfo.GroupAliasOrGID);
GroupFullInfo = _pairManager.Groups[GroupFullInfo.Group];
if (_lastProfileGroup == null || !_lastProfileGroup.Equals(GroupFullInfo.Group) || _profileData == null || ReferenceEquals(_profileData, _lightlessProfileManager.LoadingProfileGroupData))
{
_profileData = _lightlessProfileManager.GetLightlessGroupProfile(GroupFullInfo.Group);
_lastProfileGroup = GroupFullInfo.Group;
}
using var id = ImRaii.PushId("syncshell_admin_" + GroupFullInfo.GID);
using (_uiSharedService.UidFont.Push())