Remove handling of mare server url

This commit is contained in:
Loporrit
2025-07-21 17:06:47 +00:00
parent 86aa5639f3
commit 10b11e0f37
5 changed files with 0 additions and 57 deletions

View File

@@ -488,7 +488,6 @@ public class ServerConfigurationManager
private void EnsureMainExists()
{
bool lopExists = false;
int mainIdx = -1;
for (int i = 0; i < _configService.Current.ServerStorage.Count; ++i)
{
var x = _configService.Current.ServerStorage[i];
@@ -499,15 +498,6 @@ public class ServerConfigurationManager
}
if (x.ServerUri.Equals(ApiController.LoporritServiceUri, StringComparison.OrdinalIgnoreCase))
lopExists = true;
if (x.ServerUri.Equals(ApiController.MainServiceUri, StringComparison.OrdinalIgnoreCase))
mainIdx = i;
}
if (mainIdx >= 0)
{
_logger.LogDebug("Removing main server {uri}", ApiController.MainServiceUri);
_configService.Current.ServerStorage.RemoveAt(mainIdx);
if (_configService.Current.CurrentServer >= mainIdx)
_configService.Current.CurrentServer--;
}
if (!lopExists)
{

View File

@@ -122,20 +122,6 @@ public class EditProfileUi : WindowMediatorSubscriberBase
ImGui.Checkbox("Is NSFW", ref nsfw);
ImGui.EndDisabled();
if (_serverConfigurationManager.CurrentApiUrl.Equals(ApiController.MainServiceUri, StringComparison.Ordinal))
{
ImGui.Separator();
_uiSharedService.BigText("Notes and Rules for Profiles");
ImGui.TextWrapped($"- All users that are paired and unpaused with you will be able to see your profile picture and description.{Environment.NewLine}" +
$"- Other users have the possibility to report your profile for breaking the rules.{Environment.NewLine}" +
$"- !!! AVOID: anything as profile image that can be considered highly illegal or obscene (bestiality, anything that could be considered a sexual act with a minor (that includes Lalafells), etc.){Environment.NewLine}" +
$"- !!! AVOID: slurs of any kind in the description that can be considered highly offensive{Environment.NewLine}" +
$"- In case of valid reports from other users this can lead to disabling your profile forever or terminating your Mare account indefinitely.{Environment.NewLine}" +
$"- Judgement of your profile validity from reports through staff is not up to debate and the decisions to disable your profile/account permanent.{Environment.NewLine}" +
$"- If your profile picture or profile description could be considered NSFW, enable the toggle below.");
}
ImGui.Separator();
_uiSharedService.BigText("Profile Settings");

View File

@@ -95,17 +95,6 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
_textureWrap = _uiSharedService.LoadImage(_lastProfilePicture);
}
if (_supporterTextureWrap == null || !mareProfile.SupporterImageData.Value.SequenceEqual(_lastSupporterPicture))
{
_supporterTextureWrap?.Dispose();
_supporterTextureWrap = null;
if (!string.IsNullOrEmpty(mareProfile.Base64SupporterPicture))
{
_lastSupporterPicture = mareProfile.SupporterImageData.Value;
_supporterTextureWrap = _uiSharedService.LoadImage(_lastSupporterPicture);
}
}
var drawList = ImGui.GetWindowDrawList();
var rectMin = drawList.GetClipRectMin();
var rectMax = drawList.GetClipRectMax();

View File

@@ -21,8 +21,6 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
private readonly UiSharedService _uiSharedService;
private bool _adjustedForScrollBars = false;
private byte[] _lastProfilePicture = [];
private byte[] _lastSupporterPicture = [];
private IDalamudTextureWrap? _supporterTextureWrap;
private IDalamudTextureWrap? _textureWrap;
public StandaloneProfileUi(ILogger<StandaloneProfileUi> logger, MareMediator mediator, UiSharedService uiBuilder,
@@ -61,17 +59,6 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
_textureWrap = _uiSharedService.LoadImage(_lastProfilePicture);
}
if (_supporterTextureWrap == null || !mareProfile.SupporterImageData.Value.SequenceEqual(_lastSupporterPicture))
{
_supporterTextureWrap?.Dispose();
_supporterTextureWrap = null;
if (!string.IsNullOrEmpty(mareProfile.Base64SupporterPicture))
{
_lastSupporterPicture = mareProfile.SupporterImageData.Value;
_supporterTextureWrap = _uiSharedService.LoadImage(_lastSupporterPicture);
}
}
var drawList = ImGui.GetWindowDrawList();
var rectMin = drawList.GetClipRectMin();
var rectMax = drawList.GetClipRectMax();
@@ -166,13 +153,6 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
var remainingHeight = (256f * ImGuiHelpers.GlobalScale - newHeight) / 2f;
drawList.AddImage(_textureWrap.ImGuiHandle, new Vector2(rectMin.X + padding + remainingWidth, rectMin.Y + spacing.Y + pos.Y + remainingHeight),
new Vector2(rectMin.X + padding + remainingWidth + newWidth, rectMin.Y + spacing.Y + pos.Y + remainingHeight + newHeight));
if (_supporterTextureWrap != null)
{
const float iconSize = 38;
drawList.AddImage(_supporterTextureWrap.ImGuiHandle,
new Vector2(rectMax.X - iconSize - spacing.X, rectMin.Y + (textPos / 2) - (iconSize / 2)),
new Vector2(rectMax.X - spacing.X, rectMin.Y + iconSize + (textPos / 2) - (iconSize / 2)));
}
}
catch (Exception ex)
{

View File

@@ -26,8 +26,6 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
public const string LoporritServiceUri = "wss://lop-sync.com";
public const string LoporritServiceHubUri = "wss://hub.lop-sync.com/mare";
public const string LoporritServiceUriOld = "wss://loporrit.us.to";
public const string MainServer = "Lunae Crescere Incipientis (Central Server EU)";
public const string MainServiceUri = "wss://maresynchronos.com";
private readonly DalamudUtilService _dalamudUtil;
private readonly HubFactory _hubFactory;