Compare commits
14 Commits
778d30ae26
...
main
Author | SHA1 | Date | |
---|---|---|---|
e1baca7940 | |||
c2e0cf65a8 | |||
a3d0408d6f | |||
9ca6931bb8 | |||
f22eff1f72 | |||
11e097d696 | |||
f7ecb45774 | |||
00a7328e3a | |||
c39229a28b | |||
00c56b0888
|
|||
15898d54c2
|
|||
6d5ed42e60 | |||
92a8e224ef | |||
669ceed2a9
|
@@ -7,6 +7,7 @@ namespace MareSynchronos.MareConfiguration.Configurations;
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public class MareConfig : IMareConfiguration
|
public class MareConfig : IMareConfiguration
|
||||||
{
|
{
|
||||||
|
public bool SortSyncshellsByVRAM { get; set; } = false;
|
||||||
public int ExpectedTOSVersion = 2;
|
public int ExpectedTOSVersion = 2;
|
||||||
public int AcceptedTOSVersion { get; set; } = 0;
|
public int AcceptedTOSVersion { get; set; } = 0;
|
||||||
public bool AcceptedAgreement { get; set; } = false;
|
public bool AcceptedAgreement { get; set; } = false;
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
<Project Sdk="Dalamud.NET.Sdk/13.0.0">
|
<Project Sdk="Dalamud.NET.Sdk/13.0.0">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AssemblyName>Snowcloak</AssemblyName>
|
<AssemblyName>Snowcloak</AssemblyName>
|
||||||
<Version>0.2.0.3</Version>
|
<Version>0.2.2</Version>
|
||||||
<PackageProjectUrl>https://github.com/Eauldane/SnowcloakClient/</PackageProjectUrl>
|
<PackageProjectUrl>https://git.snowcloak-sync.com/Eauldane/SnowcloakClient/</PackageProjectUrl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -14,10 +14,12 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Chaos.NaCl.Standard" Version="1.0.0" />
|
<PackageReference Include="Chaos.NaCl.Standard" Version="1.0.0" />
|
||||||
<PackageReference Include="Downloader" Version="3.3.4" />
|
<PackageReference Include="Downloader" Version="4.0.3" />
|
||||||
<PackageReference Include="K4os.Compression.LZ4.Legacy" Version="1.3.8" />
|
<PackageReference Include="K4os.Compression.LZ4.Legacy" Version="1.3.8" />
|
||||||
<PackageReference Include="K4os.Compression.LZ4.Streams" Version="1.3.8" />
|
<PackageReference Include="K4os.Compression.LZ4.Streams" Version="1.3.8" />
|
||||||
<PackageReference Include="Meziantou.Analyzer" Version="2.0.212">
|
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||||
|
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||||
|
<PackageReference Include="Meziantou.Analyzer" Version="2.0.213">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
@@ -29,6 +31,8 @@
|
|||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.14.0" />
|
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.14.0" />
|
||||||
|
<PackageReference Update="DalamudPackager" Version="13.1.0" />
|
||||||
|
<PackageReference Include="System.IO.Pipelines" Version="9.0.8" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="Exists('.\Penumbra.Api\Penumbra.Api.csproj')">
|
<ItemGroup Condition="Exists('.\Penumbra.Api\Penumbra.Api.csproj')">
|
||||||
|
@@ -235,11 +235,17 @@ public class Pair : DisposableMediatorSubscriberBase
|
|||||||
{
|
{
|
||||||
string? noteOrName = GetNoteOrName();
|
string? noteOrName = GetNoteOrName();
|
||||||
|
|
||||||
if (noteOrName != null)
|
if (_mareConfig.Current.SortSyncshellsByVRAM)
|
||||||
|
{
|
||||||
|
return($"0{LastAppliedApproximateVRAMBytes}");
|
||||||
|
}
|
||||||
|
else if (noteOrName != null) {
|
||||||
return $"0{noteOrName}";
|
return $"0{noteOrName}";
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
return $"9{UserData.AliasOrUID}";
|
return $"9{UserData.AliasOrUID}";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string GetPlayerNameHash()
|
public string GetPlayerNameHash()
|
||||||
{
|
{
|
||||||
|
@@ -9,6 +9,6 @@
|
|||||||
"customization"
|
"customization"
|
||||||
],
|
],
|
||||||
"IconUrl": "https://raw.githubusercontent.com/Eauldane/SnowcloakClient/refs/heads/main/MareSynchronos/images/logo.png",
|
"IconUrl": "https://raw.githubusercontent.com/Eauldane/SnowcloakClient/refs/heads/main/MareSynchronos/images/logo.png",
|
||||||
"RepoUrl": "https://github.com/Eauldane/SnowcloakClient",
|
"RepoUrl": "https://git.snowcloak-sync.com/Eauldane/SnowcloakClient",
|
||||||
"CanUnloadAsync": true
|
"CanUnloadAsync": true
|
||||||
}
|
}
|
||||||
|
@@ -387,7 +387,7 @@ public class CompactUi : WindowMediatorSubscriberBase
|
|||||||
{
|
{
|
||||||
ImGui.SetCursorPosX((ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth()) / 2 - (userSize.X + textSize.X) / 2 - ImGui.GetStyle().ItemSpacing.X / 2);
|
ImGui.SetCursorPosX((ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth()) / 2 - (userSize.X + textSize.X) / 2 - ImGui.GetStyle().ItemSpacing.X / 2);
|
||||||
if (!printShard) ImGui.AlignTextToFramePadding();
|
if (!printShard) ImGui.AlignTextToFramePadding();
|
||||||
ImGui.TextColored(ImGuiColors.ParsedGreen, userCount);
|
ImGui.TextColored(new Vector4(0.675f, 0.985f, 1f, 1f), userCount);
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
if (!printShard) ImGui.AlignTextToFramePadding();
|
if (!printShard) ImGui.AlignTextToFramePadding();
|
||||||
ImGui.TextUnformatted("Users Online");
|
ImGui.TextUnformatted("Users Online");
|
||||||
|
@@ -20,6 +20,7 @@ public class DrawGroupPair : DrawPairBase
|
|||||||
private readonly GroupPairFullInfoDto _fullInfoDto;
|
private readonly GroupPairFullInfoDto _fullInfoDto;
|
||||||
private readonly GroupFullInfoDto _group;
|
private readonly GroupFullInfoDto _group;
|
||||||
private readonly CharaDataManager _charaDataManager;
|
private readonly CharaDataManager _charaDataManager;
|
||||||
|
public long VRAMUsage { get; set; }
|
||||||
|
|
||||||
public DrawGroupPair(string id, Pair entry, ApiController apiController,
|
public DrawGroupPair(string id, Pair entry, ApiController apiController,
|
||||||
MareMediator mareMediator, GroupFullInfoDto group, GroupPairFullInfoDto fullInfoDto,
|
MareMediator mareMediator, GroupFullInfoDto group, GroupPairFullInfoDto fullInfoDto,
|
||||||
@@ -80,6 +81,7 @@ public class DrawGroupPair : DrawPairBase
|
|||||||
}
|
}
|
||||||
if (_pair.LastAppliedDataBytes >= 0)
|
if (_pair.LastAppliedDataBytes >= 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
presenceText += UiSharedService.TooltipSeparator;
|
presenceText += UiSharedService.TooltipSeparator;
|
||||||
presenceText += ((!_pair.IsVisible) ? "(Last) " : string.Empty) + "Mods Info" + Environment.NewLine;
|
presenceText += ((!_pair.IsVisible) ? "(Last) " : string.Empty) + "Mods Info" + Environment.NewLine;
|
||||||
presenceText += "Files Size: " + UiSharedService.ByteToString(_pair.LastAppliedDataBytes, true);
|
presenceText += "Files Size: " + UiSharedService.ByteToString(_pair.LastAppliedDataBytes, true);
|
||||||
@@ -127,6 +129,9 @@ public class DrawGroupPair : DrawPairBase
|
|||||||
|
|
||||||
protected override float DrawRightSide(float textPosY, float originalY)
|
protected override float DrawRightSide(float textPosY, float originalY)
|
||||||
{
|
{
|
||||||
|
var pauseIcon = _fullInfoDto.GroupUserPermissions.IsPaused() ? FontAwesomeIcon.Play : FontAwesomeIcon.Pause;
|
||||||
|
var pauseIconSize = _uiSharedService.GetIconButtonSize(pauseIcon);
|
||||||
|
var spacingX = ImGui.GetStyle().ItemSpacing.X;
|
||||||
var entryUID = _fullInfoDto.UserAliasOrUID;
|
var entryUID = _fullInfoDto.UserAliasOrUID;
|
||||||
var entryIsMod = _fullInfoDto.GroupPairStatusInfo.IsModerator();
|
var entryIsMod = _fullInfoDto.GroupPairStatusInfo.IsModerator();
|
||||||
var entryIsOwner = string.Equals(_pair.UserData.UID, _group.OwnerUID, StringComparison.Ordinal);
|
var entryIsOwner = string.Equals(_pair.UserData.UID, _group.OwnerUID, StringComparison.Ordinal);
|
||||||
@@ -145,19 +150,27 @@ public class DrawGroupPair : DrawPairBase
|
|||||||
bool showInfo = (individualAnimDisabled || individualSoundsDisabled || animDisabled || soundsDisabled);
|
bool showInfo = (individualAnimDisabled || individualSoundsDisabled || animDisabled || soundsDisabled);
|
||||||
bool showPlus = _pair.UserPair == null;
|
bool showPlus = _pair.UserPair == null;
|
||||||
bool showBars = (userIsOwner || (userIsModerator && !entryIsMod && !entryIsOwner)) || !_pair.IsPaused;
|
bool showBars = (userIsOwner || (userIsModerator && !entryIsMod && !entryIsOwner)) || !_pair.IsPaused;
|
||||||
|
bool showPause = true;
|
||||||
var spacing = ImGui.GetStyle().ItemSpacing.X;
|
var spacing = ImGui.GetStyle().ItemSpacing.X;
|
||||||
var permIcon = (individualAnimDisabled || individualSoundsDisabled || individualVFXDisabled) ? FontAwesomeIcon.ExclamationTriangle
|
var permIcon = (individualAnimDisabled || individualSoundsDisabled || individualVFXDisabled) ? FontAwesomeIcon.ExclamationTriangle
|
||||||
: ((soundsDisabled || animDisabled || vfxDisabled) ? FontAwesomeIcon.InfoCircle : FontAwesomeIcon.None);
|
: ((soundsDisabled || animDisabled || vfxDisabled) ? FontAwesomeIcon.InfoCircle : FontAwesomeIcon.None);
|
||||||
var runningIconWidth = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Running).X;
|
var runningIconWidth = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Running).X;
|
||||||
var infoIconWidth = UiSharedService.GetIconSize(permIcon).X;
|
var infoIconWidth = UiSharedService.GetIconSize(permIcon).X;
|
||||||
var plusButtonWidth = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Plus).X;
|
var plusButtonWidth = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Plus).X;
|
||||||
|
var pauseButtonWidth = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Plus).X;
|
||||||
|
|
||||||
var barButtonWidth = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Bars).X;
|
var barButtonWidth = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Bars).X;
|
||||||
|
var barButtonSize = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Bars);
|
||||||
|
|
||||||
|
var windowEndX = ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth();
|
||||||
|
var rightSidePos = windowEndX - barButtonSize.X;
|
||||||
|
|
||||||
|
|
||||||
var pos = ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth() + spacing
|
var pos = ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth() + spacing
|
||||||
- (showShared ? (runningIconWidth + spacing) : 0)
|
- (showShared ? (runningIconWidth + spacing) : 0)
|
||||||
- (showInfo ? (infoIconWidth + spacing) : 0)
|
- (showInfo ? (infoIconWidth + spacing) : 0)
|
||||||
- (showPlus ? (plusButtonWidth + spacing) : 0)
|
- (showPlus ? (plusButtonWidth + spacing) : 0)
|
||||||
|
- (showPause ? (pauseButtonWidth + spacing) : 0)
|
||||||
- (showBars ? (barButtonWidth + spacing) : 0);
|
- (showBars ? (barButtonWidth + spacing) : 0);
|
||||||
|
|
||||||
ImGui.SameLine(pos);
|
ImGui.SameLine(pos);
|
||||||
@@ -264,6 +277,7 @@ public class DrawGroupPair : DrawPairBase
|
|||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (showPlus)
|
if (showPlus)
|
||||||
{
|
{
|
||||||
ImGui.SetCursorPosY(originalY);
|
ImGui.SetCursorPosY(originalY);
|
||||||
@@ -275,7 +289,24 @@ public class DrawGroupPair : DrawPairBase
|
|||||||
UiSharedService.AttachToolTip("Pair with " + entryUID + " individually");
|
UiSharedService.AttachToolTip("Pair with " + entryUID + " individually");
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
}
|
}
|
||||||
|
if (showPause)
|
||||||
|
{
|
||||||
|
//rightSidePos -= pauseIconSize.X + spacingX;
|
||||||
|
ImGui.SetCursorPosY(originalY);
|
||||||
|
|
||||||
|
if (_uiSharedService.IconButton(pauseIcon))
|
||||||
|
{
|
||||||
|
var perm = _fullInfoDto.GroupUserPermissions;
|
||||||
|
var newPaused = !perm.IsPaused();
|
||||||
|
perm.SetPaused(newPaused);
|
||||||
|
}
|
||||||
|
|
||||||
|
UiSharedService.AttachToolTip(!_fullInfoDto.GroupUserPermissions.IsPaused()
|
||||||
|
? "Pause pairing with " + entryUID
|
||||||
|
: "Resume pairing with " + entryUID);
|
||||||
|
ImGui.SameLine();
|
||||||
|
|
||||||
|
}
|
||||||
if (showBars)
|
if (showBars)
|
||||||
{
|
{
|
||||||
ImGui.SetCursorPosY(originalY);
|
ImGui.SetCursorPosY(originalY);
|
||||||
@@ -285,7 +316,6 @@ public class DrawGroupPair : DrawPairBase
|
|||||||
ImGui.OpenPopup("Popup");
|
ImGui.OpenPopup("Popup");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui.BeginPopup("Popup"))
|
if (ImGui.BeginPopup("Popup"))
|
||||||
{
|
{
|
||||||
if ((userIsModerator || userIsOwner) && !(entryIsMod || entryIsOwner))
|
if ((userIsModerator || userIsOwner) && !(entryIsMod || entryIsOwner))
|
||||||
|
@@ -19,6 +19,7 @@ public class DrawUserPair : DrawPairBase
|
|||||||
protected readonly MareMediator _mediator;
|
protected readonly MareMediator _mediator;
|
||||||
private readonly SelectGroupForPairUi _selectGroupForPairUi;
|
private readonly SelectGroupForPairUi _selectGroupForPairUi;
|
||||||
private readonly CharaDataManager _charaDataManager;
|
private readonly CharaDataManager _charaDataManager;
|
||||||
|
public long VramUsage { get; set; }
|
||||||
|
|
||||||
public DrawUserPair(string id, Pair entry, UidDisplayHandler displayHandler, ApiController apiController,
|
public DrawUserPair(string id, Pair entry, UidDisplayHandler displayHandler, ApiController apiController,
|
||||||
MareMediator mareMediator, SelectGroupForPairUi selectGroupForPairUi,
|
MareMediator mareMediator, SelectGroupForPairUi selectGroupForPairUi,
|
||||||
@@ -84,6 +85,7 @@ public class DrawUserPair : DrawPairBase
|
|||||||
visibleTooltip += "Files Size: " + UiSharedService.ByteToString(_pair.LastAppliedDataBytes, true);
|
visibleTooltip += "Files Size: " + UiSharedService.ByteToString(_pair.LastAppliedDataBytes, true);
|
||||||
if (_pair.LastAppliedApproximateVRAMBytes >= 0)
|
if (_pair.LastAppliedApproximateVRAMBytes >= 0)
|
||||||
{
|
{
|
||||||
|
VramUsage = _pair.LastAppliedApproximateVRAMBytes;
|
||||||
visibleTooltip += Environment.NewLine + "Approx. VRAM Usage: " + UiSharedService.ByteToString(_pair.LastAppliedApproximateVRAMBytes, true);
|
visibleTooltip += Environment.NewLine + "Approx. VRAM Usage: " + UiSharedService.ByteToString(_pair.LastAppliedApproximateVRAMBytes, true);
|
||||||
}
|
}
|
||||||
if (_pair.LastAppliedDataTris >= 0)
|
if (_pair.LastAppliedDataTris >= 0)
|
||||||
@@ -97,6 +99,8 @@ public class DrawUserPair : DrawPairBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected override float DrawRightSide(float textPosY, float originalY)
|
protected override float DrawRightSide(float textPosY, float originalY)
|
||||||
{
|
{
|
||||||
var pauseIcon = _pair.UserPair!.OwnPermissions.IsPaused() ? FontAwesomeIcon.Play : FontAwesomeIcon.Pause;
|
var pauseIcon = _pair.UserPair!.OwnPermissions.IsPaused() ? FontAwesomeIcon.Play : FontAwesomeIcon.Pause;
|
||||||
|
@@ -428,6 +428,7 @@ internal sealed class GroupPanel
|
|||||||
var onlineUsers = new List<DrawGroupPair>();
|
var onlineUsers = new List<DrawGroupPair>();
|
||||||
var offlineUsers = new List<DrawGroupPair>();
|
var offlineUsers = new List<DrawGroupPair>();
|
||||||
|
|
||||||
|
|
||||||
foreach (var pair in sortedPairs)
|
foreach (var pair in sortedPairs)
|
||||||
{
|
{
|
||||||
var drawPair = new DrawGroupPair(
|
var drawPair = new DrawGroupPair(
|
||||||
@@ -453,6 +454,8 @@ internal sealed class GroupPanel
|
|||||||
ImGui.TextUnformatted("Visible");
|
ImGui.TextUnformatted("Visible");
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
_uidDisplayHandler.RenderPairList(visibleUsers);
|
_uidDisplayHandler.RenderPairList(visibleUsers);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (onlineUsers.Count > 0)
|
if (onlineUsers.Count > 0)
|
||||||
|
@@ -4,6 +4,7 @@ using Dalamud.Interface.Colors;
|
|||||||
using Dalamud.Interface.ImGuiFileDialog;
|
using Dalamud.Interface.ImGuiFileDialog;
|
||||||
using Dalamud.Interface.Textures.TextureWraps;
|
using Dalamud.Interface.Textures.TextureWraps;
|
||||||
using Dalamud.Interface.Utility;
|
using Dalamud.Interface.Utility;
|
||||||
|
using Dalamud.Utility;
|
||||||
using MareSynchronos.API.Data;
|
using MareSynchronos.API.Data;
|
||||||
using MareSynchronos.API.Dto.User;
|
using MareSynchronos.API.Dto.User;
|
||||||
using MareSynchronos.Services;
|
using MareSynchronos.Services;
|
||||||
@@ -28,14 +29,14 @@ public class EditProfileUi : WindowMediatorSubscriberBase
|
|||||||
private IDalamudTextureWrap? _pfpTextureWrap;
|
private IDalamudTextureWrap? _pfpTextureWrap;
|
||||||
private string _profileDescription = string.Empty;
|
private string _profileDescription = string.Empty;
|
||||||
private byte[] _profileImage = [];
|
private byte[] _profileImage = [];
|
||||||
private bool _showFileDialogError = false;
|
private string _showFileDialogError = string.Empty;
|
||||||
private bool _wasOpen;
|
private bool _wasOpen;
|
||||||
|
|
||||||
public EditProfileUi(ILogger<EditProfileUi> logger, MareMediator mediator,
|
public EditProfileUi(ILogger<EditProfileUi> logger, MareMediator mediator,
|
||||||
ApiController apiController, UiSharedService uiSharedService, FileDialogManager fileDialogManager,
|
ApiController apiController, UiSharedService uiSharedService, FileDialogManager fileDialogManager,
|
||||||
ServerConfigurationManager serverConfigurationManager,
|
ServerConfigurationManager serverConfigurationManager,
|
||||||
MareProfileManager mareProfileManager, PerformanceCollectorService performanceCollectorService)
|
MareProfileManager mareProfileManager, PerformanceCollectorService performanceCollectorService)
|
||||||
: base(logger, mediator, "Snowcloak Edit Profile###SnowcloakSyncEditProfileUI", performanceCollectorService)
|
: base(logger, mediator, "Snowcloak Profile Editor###SnowcloakSyncEditProfileUI", performanceCollectorService)
|
||||||
{
|
{
|
||||||
IsOpen = false;
|
IsOpen = false;
|
||||||
this.SizeConstraints = new()
|
this.SizeConstraints = new()
|
||||||
@@ -92,20 +93,13 @@ public class EditProfileUi : WindowMediatorSubscriberBase
|
|||||||
ImGui.Image(_pfpTextureWrap.Handle, ImGuiHelpers.ScaledVector2(_pfpTextureWrap.Width, _pfpTextureWrap.Height));
|
ImGui.Image(_pfpTextureWrap.Handle, ImGuiHelpers.ScaledVector2(_pfpTextureWrap.Width, _pfpTextureWrap.Height));
|
||||||
}
|
}
|
||||||
|
|
||||||
var spacing = ImGui.GetStyle().ItemSpacing.X;
|
var spacing = ImGui.GetStyle().ItemSpacing.X + 200;
|
||||||
ImGuiHelpers.ScaledRelativeSameLine(256, spacing);
|
ImGuiHelpers.ScaledRelativeSameLine(256, spacing);
|
||||||
using (_uiSharedService.GameFont.Push())
|
using (_uiSharedService.GameFont.Push())
|
||||||
{
|
{
|
||||||
var descriptionTextSize = ImGui.CalcTextSize(profile.Description, hideTextAfterDoubleHash: false, 256f);
|
var descriptionTextSize = ImGui.CalcTextSize(profile.Description, hideTextAfterDoubleHash: false, 256f);
|
||||||
var childFrame = ImGuiHelpers.ScaledVector2(256 + ImGui.GetStyle().WindowPadding.X + ImGui.GetStyle().WindowBorderSize, 256);
|
var childFrame = ImGuiHelpers.ScaledVector2(256 + ImGui.GetStyle().WindowPadding.X + ImGui.GetStyle().WindowBorderSize, 256);
|
||||||
if (descriptionTextSize.Y > childFrame.Y)
|
_adjustedForScollBarsOnlineProfile = (descriptionTextSize.Y > childFrame.Y);
|
||||||
{
|
|
||||||
_adjustedForScollBarsOnlineProfile = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_adjustedForScollBarsOnlineProfile = false;
|
|
||||||
}
|
|
||||||
childFrame = childFrame with
|
childFrame = childFrame with
|
||||||
{
|
{
|
||||||
X = childFrame.X + (_adjustedForScollBarsOnlineProfile ? ImGui.GetStyle().ScrollbarSize : 0),
|
X = childFrame.X + (_adjustedForScollBarsOnlineProfile ? ImGui.GetStyle().ScrollbarSize : 0),
|
||||||
@@ -122,9 +116,18 @@ public class EditProfileUi : WindowMediatorSubscriberBase
|
|||||||
ImGui.Checkbox("Is NSFW", ref nsfw);
|
ImGui.Checkbox("Is NSFW", ref nsfw);
|
||||||
ImGui.EndDisabled();
|
ImGui.EndDisabled();
|
||||||
|
|
||||||
|
ImGui.Separator();
|
||||||
|
_uiSharedService.BigText("Rules and Guidelines");
|
||||||
|
UiSharedService.ColorTextWrapped("Users that are paired with you (not paused) will be able to see your profile picture and description.", ImGuiColors.DalamudWhite);
|
||||||
|
UiSharedService.ColorTextWrapped("All users have the capability to report your profile if it violates the rules.", ImGuiColors.DalamudGrey);
|
||||||
|
UiSharedService.ColorTextWrapped(" - Please do NOT upload anything that can be considered highly illegal or obscene (beastiality, sexual acts depicting minors or anything representing a minor (including Lalafel), etc.)", ImGuiColors.DalamudRed);
|
||||||
|
UiSharedService.ColorTextWrapped(" - Please avoid the use of slurs, hate speech, threatening behaviour, etc.", ImGuiColors.DalamudRed);
|
||||||
|
UiSharedService.ColorTextWrapped(" - In the event we receive a report of an offensive profile, we may disable your profile forever or terminate your Snowcloak service account.", ImGuiColors.DalamudRed);
|
||||||
|
UiSharedService.ColorTextWrapped(" - You may not appeal any bans of your profile and or Snowcloak service account.", ImGuiColors.DalamudRed);
|
||||||
|
UiSharedService.ColorTextWrapped("Users who wish to mark their profile as NSFW should enable the toggle below.", ImGuiColors.DalamudWhite);
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
_uiSharedService.BigText("Profile Settings");
|
_uiSharedService.BigText("Profile Settings");
|
||||||
|
UiSharedService.ColorTextWrapped("Profile pictures must be cropped to 256x256px and have a file size of 250KiB or smaller.", ImGuiColors.DalamudGrey);
|
||||||
if (_uiSharedService.IconTextButton(FontAwesomeIcon.FileUpload, "Upload new profile picture"))
|
if (_uiSharedService.IconTextButton(FontAwesomeIcon.FileUpload, "Upload new profile picture"))
|
||||||
{
|
{
|
||||||
_fileDialogManager.OpenFileDialog("Select new Profile picture", ".png", (success, file) =>
|
_fileDialogManager.OpenFileDialog("Select new Profile picture", ".png", (success, file) =>
|
||||||
@@ -138,11 +141,10 @@ public class EditProfileUi : WindowMediatorSubscriberBase
|
|||||||
|
|
||||||
if (format.Width > 256 || format.Height > 256 || (fileContent.Length > 250 * 1024))
|
if (format.Width > 256 || format.Height > 256 || (fileContent.Length > 250 * 1024))
|
||||||
{
|
{
|
||||||
_showFileDialogError = true;
|
_showFileDialogError = format.Width > 256 || format.Height > 256 ? "ERROR: Image dimensions must be 256x256px or smaller." : fileContent.Length > 250 * 1024 ? "ERROR: File size was bigger than 250KiB" : "ERROR: An unknown error has occured.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
_showFileDialogError = string.Empty;
|
||||||
_showFileDialogError = false;
|
|
||||||
await _apiController.UserSetProfile(new UserProfileDto(new UserData(_apiController.UID), Disabled: false, IsNSFW: null, Convert.ToBase64String(fileContent), Description: null))
|
await _apiController.UserSetProfile(new UserProfileDto(new UserData(_apiController.UID), Disabled: false, IsNSFW: null, Convert.ToBase64String(fileContent), Description: null))
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
});
|
});
|
||||||
@@ -155,9 +157,9 @@ public class EditProfileUi : WindowMediatorSubscriberBase
|
|||||||
_ = _apiController.UserSetProfile(new UserProfileDto(new UserData(_apiController.UID), Disabled: false, IsNSFW: null, "", Description: null));
|
_ = _apiController.UserSetProfile(new UserProfileDto(new UserData(_apiController.UID), Disabled: false, IsNSFW: null, "", Description: null));
|
||||||
}
|
}
|
||||||
UiSharedService.AttachToolTip("Clear your currently uploaded profile picture");
|
UiSharedService.AttachToolTip("Clear your currently uploaded profile picture");
|
||||||
if (_showFileDialogError)
|
if (!_showFileDialogError.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
UiSharedService.ColorTextWrapped("The profile picture must be a PNG file with a maximum height and width of 256px and 250KiB size", ImGuiColors.DalamudRed);
|
UiSharedService.ColorTextWrapped(_showFileDialogError, ImGuiColors.DalamudRed);
|
||||||
}
|
}
|
||||||
var isNsfw = profile.IsNSFW;
|
var isNsfw = profile.IsNSFW;
|
||||||
if (ImGui.Checkbox("Profile is NSFW", ref isNsfw))
|
if (ImGui.Checkbox("Profile is NSFW", ref isNsfw))
|
||||||
|
@@ -956,6 +956,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
|||||||
_uiShared.BigText("UI");
|
_uiShared.BigText("UI");
|
||||||
var showCharacterNames = _configService.Current.ShowCharacterNames;
|
var showCharacterNames = _configService.Current.ShowCharacterNames;
|
||||||
var showVisibleSeparate = _configService.Current.ShowVisibleUsersSeparately;
|
var showVisibleSeparate = _configService.Current.ShowVisibleUsersSeparately;
|
||||||
|
var sortSyncshellByVRAM = _configService.Current.SortSyncshellsByVRAM;
|
||||||
var showOfflineSeparate = _configService.Current.ShowOfflineUsersSeparately;
|
var showOfflineSeparate = _configService.Current.ShowOfflineUsersSeparately;
|
||||||
var showProfiles = _configService.Current.ProfilesShow;
|
var showProfiles = _configService.Current.ProfilesShow;
|
||||||
var showNsfwProfiles = _configService.Current.ProfilesAllowNsfw;
|
var showNsfwProfiles = _configService.Current.ProfilesAllowNsfw;
|
||||||
@@ -1074,7 +1075,14 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
|||||||
_configService.Save();
|
_configService.Save();
|
||||||
}
|
}
|
||||||
_uiShared.DrawHelpText("This will show all currently visible users in a special 'Visible' group in the main UI.");
|
_uiShared.DrawHelpText("This will show all currently visible users in a special 'Visible' group in the main UI.");
|
||||||
|
if (ImGui.Checkbox("Sort visible syncshell users by VRAM usage", ref sortSyncshellByVRAM))
|
||||||
|
{
|
||||||
|
_configService.Current.SortSyncshellsByVRAM = sortSyncshellByVRAM;
|
||||||
|
_logger.LogWarning("Changing value: {sortSyncshellsByVRAM}", sortSyncshellByVRAM);
|
||||||
|
|
||||||
|
_configService.Save();
|
||||||
|
}
|
||||||
|
_uiShared.DrawHelpText("This will put users using the most VRAM in a syncshell at the top of the list.");
|
||||||
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;
|
||||||
|
@@ -121,7 +121,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
|
|||||||
{
|
{
|
||||||
Logger.LogWarning("Multiple secret keys for current character");
|
Logger.LogWarning("Multiple secret keys for current character");
|
||||||
_connectionDto = null;
|
_connectionDto = null;
|
||||||
Mediator.Publish(new NotificationMessage("Multiple Identical Characters detected", "Your Service configuration has multiple characters with the same name and world set up. Delete the duplicates in the character management to be able to connect to Mare.",
|
Mediator.Publish(new NotificationMessage("Multiple Identical Characters detected", "Your Service configuration has multiple characters with the same name and world set up. Delete the duplicates in the character management to be able to connect.",
|
||||||
NotificationType.Error));
|
NotificationType.Error));
|
||||||
await StopConnection(ServerState.MultiChara).ConfigureAwait(false);
|
await StopConnection(ServerState.MultiChara).ConfigureAwait(false);
|
||||||
_connectionCancellationTokenSource?.Cancel();
|
_connectionCancellationTokenSource?.Cancel();
|
||||||
|
BIN
MareSynchronos/images/logo.png
Normal file
BIN
MareSynchronos/images/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
Reference in New Issue
Block a user