Initial Loporrit rebranding

This commit is contained in:
Loporrit
2023-12-11 22:38:13 +00:00
parent 4a04a74701
commit e0ae62ff0d
34 changed files with 156 additions and 121 deletions

View File

@@ -200,7 +200,7 @@ public sealed class PeriodicFileScanner : DisposableMediatorSubscriberBase
if (string.IsNullOrEmpty(_configService.Current.CacheFolder) || !Directory.Exists(_configService.Current.CacheFolder))
{
cacheDirExists = false;
Logger.LogWarning("Mare Cache directory is not set or does not exist.");
Logger.LogWarning("Loporrit Cache directory is not set or does not exist.");
}
if (!penDirExists || !cacheDirExists)
{

View File

@@ -534,7 +534,7 @@ public sealed class IpcManager : DisposableMediatorSubscriberBase
return await _dalamudUtil.RunOnFrameworkThread(() =>
{
var collName = "Mare_" + uid;
var collName = "Loporrit_" + uid;
var retCreate = _penumbraCreateNamedTemporaryCollection.Invoke(collName);
logger.LogTrace("Creating Temp Collection {collName}, Success: {ret}", collName, retCreate);
return collName;
@@ -682,7 +682,7 @@ public sealed class IpcManager : DisposableMediatorSubscriberBase
if (!apiAvailable && !_shownGlamourerUnavailable)
{
_shownGlamourerUnavailable = true;
Mediator.Publish(new NotificationMessage("Glamourer inactive", "Your Glamourer installation is not active or out of date. Update Glamourer to continue to use Mare.", NotificationType.Error));
Mediator.Publish(new NotificationMessage("Glamourer inactive", "Your Glamourer installation is not active or out of date. Update Glamourer to continue to use Loporrit.", NotificationType.Error));
}
}
}
@@ -744,7 +744,7 @@ public sealed class IpcManager : DisposableMediatorSubscriberBase
if (!penumbraAvailable && !_shownPenumbraUnavailable)
{
_shownPenumbraUnavailable = true;
Mediator.Publish(new NotificationMessage("Penumbra inactive", "Your Penumbra installation is not active or out of date. Update Penumbra and/or the Enable Mods setting in Penumbra to continue to use Mare.", NotificationType.Error));
Mediator.Publish(new NotificationMessage("Penumbra inactive", "Your Penumbra installation is not active or out of date. Update Penumbra and/or the Enable Mods setting in Penumbra to continue to use Loporrit.", NotificationType.Error));
}
}
}

View File

@@ -37,7 +37,7 @@ public static class Strings
"The service holds no information about which mod files belong to which mod.");
public readonly string Paragraph6 = Loc.Localize("Paragraph6",
"This service is provided as-is. In case of abuse join the Mare Synchronos Discord.");
"This service is provided as-is.");
public readonly string ReadLabel = Loc.Localize("ReadLabel", "READ THIS CAREFULLY");
}

View File

@@ -32,7 +32,7 @@
"description": "ToSStrings..ctor"
},
"Paragraph6": {
"message": "Dieser Dienst wird ohne Gewähr angeboten. Im Falle eines Missbrauchs tretet dem Mare Synchronos Discord bei.",
"message": "Dieser Dienst wird ohne Gewähr angeboten.",
"description": "ToSStrings..ctor"
},
"AgreeLabel": {

View File

@@ -32,7 +32,7 @@
"description": "ToSStrings..ctor"
},
"Paragraph6": {
"message": "Ce service et ses composants vous sont fournis en l'état. En cas d'abus rejoindre le serveur Discord Mare Synchronos.",
"message": "Ce service et ses composants vous sont fournis en l'état.",
"description": "ToSStrings..ctor"
},
"AgreeLabel": {

View File

@@ -10,6 +10,7 @@ public class ServerConfig : IMareConfiguration
public List<ServerStorage> ServerStorage { get; set; } = new()
{
{ new ServerStorage() { ServerName = ApiController.LoporritServer, ServerUri = ApiController.LoporritServiceUri } },
{ new ServerStorage() { ServerName = ApiController.MainServer, ServerUri = ApiController.MainServiceUri } },
};

View File

@@ -88,7 +88,7 @@ public class MarePlugin : MediatorSubscriberBase, IHostedService
public Task StartAsync(CancellationToken cancellationToken)
{
var version = Assembly.GetExecutingAssembly().GetName().Version!;
Logger.LogInformation("Launching {name} {major}.{minor}.{build}", "Mare Synchronos", version.Major, version.Minor, version.Build);
Logger.LogInformation("Launching {name} {major}.{minor}.{build}-lop{rev}", "Loporrit Sync", version.Major, version.Minor, version.Build, version.Revision);
Mediator.Subscribe<SwitchToMainUiMessage>(this, (msg) => _ = Task.Run(WaitForPlayerAndLaunchCharacterManager));
Mediator.Subscribe<DalamudLoginMessage>(this, (_) => DalamudUtilOnLogIn());
@@ -152,7 +152,7 @@ public class MarePlugin : MediatorSubscriberBase, IHostedService
if (_mareConfigService.Current.LogLevel != LogLevel.Information)
{
Mediator.Publish(new NotificationMessage("Abnormal Log Level",
$"Your log level is set to '{_mareConfigService.Current.LogLevel}' which is not recommended for normal usage. Set it to '{LogLevel.Information}' in \"Mare Settings -> Debug\" unless instructed otherwise.",
$"Your log level is set to '{_mareConfigService.Current.LogLevel}' which is not recommended for normal usage. Set it to '{LogLevel.Information}' in \"Loporrit Settings -> Debug\" unless instructed otherwise.",
Dalamud.Interface.Internal.Notifications.NotificationType.Error, 15000));
}
#endif

View File

@@ -18,6 +18,7 @@
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CopyLocalLockfileAssemblies>true</CopyLocalLockfileAssemblies>
<AssemblyName>LoporritSync</AssemblyName>
</PropertyGroup>
<PropertyGroup>

View File

@@ -60,10 +60,10 @@ public class Pair
SeStringBuilder seStringBuilder2 = new();
SeStringBuilder seStringBuilder3 = new();
SeStringBuilder seStringBuilder4 = new();
var openProfileSeString = seStringBuilder.AddUiForeground(526).AddText(" ").AddUiForegroundOff().AddText("Open Profile").Build();
var reapplyDataSeString = seStringBuilder2.AddUiForeground(526).AddText(" ").AddUiForegroundOff().AddText("Reapply last data").Build();
var cyclePauseState = seStringBuilder3.AddUiForeground(526).AddText(" ").AddUiForegroundOff().AddText("Cycle pause state").Build();
var changePermissions = seStringBuilder4.AddUiForeground(526).AddText(" ").AddUiForegroundOff().AddText("Change Permissions").Build();
var openProfileSeString = seStringBuilder.AddUiForeground(559).AddText(" ").AddUiForegroundOff().AddText("Open Profile").Build();
var reapplyDataSeString = seStringBuilder2.AddUiForeground(559).AddText(" ").AddUiForegroundOff().AddText("Reapply last data").Build();
var cyclePauseState = seStringBuilder3.AddUiForeground(559).AddText(" ").AddUiForegroundOff().AddText("Cycle pause state").Build();
var changePermissions = seStringBuilder4.AddUiForeground(559).AddText(" ").AddUiForegroundOff().AddText("Change Permissions").Build();
args.AddCustomItem(new GameObjectContextMenuItem(openProfileSeString, (a) =>
{
_mediator.Publish(new ProfileOpenStandaloneMessage(this));

View File

@@ -25,7 +25,9 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace MareSynchronos;
using MareSynchronos;
namespace LoporritSync;
public sealed class Plugin : IDalamudPlugin
{
@@ -46,7 +48,7 @@ public sealed class Plugin : IDalamudPlugin
})
.ConfigureServices(collection =>
{
collection.AddSingleton(new WindowSystem("MareSynchronos"));
collection.AddSingleton(new WindowSystem("LoporritSync"));
collection.AddSingleton<FileDialogManager>();
collection.AddSingleton(new Dalamud.Localization("MareSynchronos.Localization.", "", useEmbedded: true));
@@ -103,7 +105,7 @@ public sealed class Plugin : IDalamudPlugin
collection.AddScoped<WindowMediatorSubscriberBase, EditProfileUi>((s) => new EditProfileUi(s.GetRequiredService<ILogger<EditProfileUi>>(),
s.GetRequiredService<MareMediator>(), s.GetRequiredService<ApiController>(), pluginInterface.UiBuilder, s.GetRequiredService<UiSharedService>(),
s.GetRequiredService<FileDialogManager>(), s.GetRequiredService<MareProfileManager>()));
s.GetRequiredService<FileDialogManager>(), s.GetRequiredService<ServerConfigurationManager>(), s.GetRequiredService<MareProfileManager>()));
collection.AddScoped<WindowMediatorSubscriberBase, PopupHandler>();
collection.AddScoped<IPopupHandler, ReportPopupHandler>();
collection.AddScoped<IPopupHandler, BanUserPopupHandler>();

View File

@@ -173,7 +173,7 @@ public sealed class CharacterAnalyzer : MediatorSubscriberBase, IDisposable
LastAnalysis.Values.Sum(v => v.Values.Count),
UiSharedService.ByteToString(LastAnalysis.Values.Sum(c => c.Values.Sum(v => v.OriginalSize))),
UiSharedService.ByteToString(LastAnalysis.Values.Sum(c => c.Values.Sum(v => v.CompressedSize))));
Logger.LogInformation("IMPORTANT NOTES:\n\r- For Mare up- and downloads only the compressed size is relevant.\n\r- An unusually high total files count beyond 200 and up will also increase your download time to others significantly.");
Logger.LogInformation("IMPORTANT NOTES:\n\r- For uploads and downloads only the compressed size is relevant.\n\r- An unusually high total files count beyond 200 and up will also increase your download time to others significantly.");
}
internal sealed record FileDataEntry(string Hash, string FileType, List<string> GamePaths, List<string> FilePaths, long OriginalSize, long CompressedSize)

View File

@@ -12,7 +12,8 @@ namespace MareSynchronos.Services;
public sealed class CommandManagerService : IDisposable
{
private const string _commandName = "/mare";
private const string _commandName = "/sync";
private const string _commandName2 = "/loporrit";
private readonly ApiController _apiController;
private readonly ICommandManager _commandManager;
@@ -35,13 +36,18 @@ public sealed class CommandManagerService : IDisposable
_mareConfigService = mareConfigService;
_commandManager.AddHandler(_commandName, new CommandInfo(OnCommand)
{
HelpMessage = "Opens the Mare Synchronos UI"
HelpMessage = "Opens the Loporrit UI"
});
_commandManager.AddHandler(_commandName2, new CommandInfo(OnCommand)
{
HelpMessage = "Opens the Loporrit UI"
});
}
public void Dispose()
{
_commandManager.RemoveHandler(_commandName);
_commandManager.RemoveHandler(_commandName2);
}
private void OnCommand(string command, string args)
@@ -62,7 +68,7 @@ public sealed class CommandManagerService : IDisposable
{
if (_apiController.ServerState == WebAPI.SignalR.Utils.ServerState.Disconnecting)
{
_mediator.Publish(new NotificationMessage("Mare disconnecting", "Cannot use /toggle while Mare Synchronos is still disconnecting",
_mediator.Publish(new NotificationMessage("Loporrit disconnecting", "Cannot use /toggle while Loporrit is still disconnecting",
Dalamud.Interface.Internal.Notifications.NotificationType.Error));
}

View File

@@ -2,6 +2,7 @@
using MareSynchronos.API.Data.Comparer;
using MareSynchronos.MareConfiguration;
using MareSynchronos.Services.Mediator;
using MareSynchronos.Services.ServerConfiguration;
using MareSynchronos.WebAPI;
using Microsoft.Extensions.Logging;
using System.Collections.Concurrent;
@@ -18,6 +19,7 @@ public class MareProfileManager : MediatorSubscriberBase
private const string _nsfw = "Profile not displayed - NSFW";
private readonly ApiController _apiController;
private readonly MareConfigService _mareConfigService;
private readonly ServerConfigurationManager _serverConfigurationManager;
private readonly ConcurrentDictionary<UserData, MareProfileData> _mareProfiles = new(UserDataComparer.Instance);
private readonly MareProfileData _defaultProfileData = new(IsFlagged: false, IsNSFW: false, _mareLogo, string.Empty, _noDescription);
@@ -25,10 +27,11 @@ public class MareProfileManager : MediatorSubscriberBase
private readonly MareProfileData _nsfwProfileData = new(IsFlagged: false, IsNSFW: false, _mareLogoNsfw, string.Empty, _nsfw);
public MareProfileManager(ILogger<MareProfileManager> logger, MareConfigService mareConfigService,
MareMediator mediator, ApiController apiController) : base(logger, mediator)
MareMediator mediator, ApiController apiController, ServerConfigurationManager serverConfigurationManager) : base(logger, mediator)
{
_mareConfigService = mareConfigService;
_apiController = apiController;
_serverConfigurationManager = serverConfigurationManager;
Mediator.Subscribe<ClearProfileDataMessage>(this, (msg) =>
{
@@ -57,9 +60,12 @@ public class MareProfileManager : MediatorSubscriberBase
{
_mareProfiles[data] = _loadingProfileData;
var profile = await _apiController.UserGetProfile(new API.Dto.User.UserDto(data)).ConfigureAwait(false);
bool isSupporter = !string.Equals(data.Alias, data.UID, StringComparison.Ordinal);
if (_serverConfigurationManager.CurrentApiUrl != ApiController.MainServiceUri)
isSupporter = false;
MareProfileData profileData = new(profile.Disabled, profile.IsNSFW ?? false,
string.IsNullOrEmpty(profile.ProfilePictureBase64) ? _mareLogo : profile.ProfilePictureBase64,
!string.IsNullOrEmpty(data.Alias) && !string.Equals(data.Alias, data.UID, StringComparison.Ordinal) ? _mareSupporter : string.Empty,
!string.IsNullOrEmpty(data.Alias) && isSupporter ? _mareSupporter : string.Empty,
string.IsNullOrEmpty(profile.Description) ? _noDescription : profile.Description);
if (profileData.IsNSFW && !_mareConfigService.Current.ProfilesAllowNsfw && !string.Equals(_apiController.UID, data.UID, StringComparison.Ordinal))
{

View File

@@ -26,19 +26,19 @@ public class NotificationService : DisposableMediatorSubscriberBase
private void PrintErrorChat(string? message)
{
SeStringBuilder se = new SeStringBuilder().AddText("[Mare Synchronos] Error: " + message);
SeStringBuilder se = new SeStringBuilder().AddText("[LoporritSync] Error: " + message);
_chatGui.PrintError(se.BuiltString);
}
private void PrintInfoChat(string? message)
{
SeStringBuilder se = new SeStringBuilder().AddText("[Mare Synchronos] Info: ").AddItalics(message ?? string.Empty);
SeStringBuilder se = new SeStringBuilder().AddText("[LoporritSync] Info: ").AddItalics(message ?? string.Empty);
_chatGui.Print(se.BuiltString);
}
private void PrintWarnChat(string? message)
{
SeStringBuilder se = new SeStringBuilder().AddText("[Mare Synchronos] ").AddUiForeground("Warning: " + (message ?? string.Empty), 31).AddUiForegroundOff();
SeStringBuilder se = new SeStringBuilder().AddText("[LoporritSync] ").AddUiForeground("Warning: " + (message ?? string.Empty), 31).AddUiForegroundOff();
_chatGui.Print(se.BuiltString);
}
@@ -108,6 +108,6 @@ public class NotificationService : DisposableMediatorSubscriberBase
private void ShowToast(NotificationMessage msg)
{
_uiBuilder.AddNotification(msg.Message ?? string.Empty, "[Mare Synchronos] " + msg.Title, msg.Type, msg.TimeShownOnScreen);
_uiBuilder.AddNotification(msg.Message ?? string.Empty, "[LoporritSync] " + msg.Title, msg.Type, msg.TimeShownOnScreen);
}
}

View File

@@ -338,9 +338,19 @@ public class ServerConfigurationManager
private void EnsureMainExists()
{
if (_configService.Current.ServerStorage.Count == 0 || !string.Equals(_configService.Current.ServerStorage[0].ServerUri, ApiController.MainServiceUri, StringComparison.OrdinalIgnoreCase))
bool lopExists = false;
bool mainExists = false;
_configService.Current.ServerStorage.ForEach((x) => {
_logger.LogDebug(" server uri = {x.ServerUri}");
if (x.ServerUri.Equals(ApiController.LoporritServiceUri, StringComparison.OrdinalIgnoreCase))
lopExists = true;
else if (x.ServerUri.Equals(ApiController.MainServiceUri, StringComparison.OrdinalIgnoreCase))
mainExists = true;
});
if (!lopExists)
{
_configService.Current.ServerStorage.Insert(0, new ServerStorage() { ServerUri = ApiController.MainServiceUri, ServerName = ApiController.MainServer });
_logger.LogDebug("Re-adding missing server {ApiController.LoporritServiceUri}");
_configService.Current.ServerStorage.Insert(0, new ServerStorage() { ServerUri = ApiController.LoporritServiceUri, ServerName = ApiController.LoporritServer });
}
Save();
}

View File

@@ -57,7 +57,7 @@ public class CompactUi : WindowMediatorSubscriberBase
private bool _wasOpen;
public CompactUi(ILogger<CompactUi> logger, UiSharedService uiShared, MareConfigService configService, ApiController apiController, PairManager pairManager,
ServerConfigurationManager serverManager, MareMediator mediator, FileUploadManager fileTransferManager, UidDisplayHandler uidDisplayHandler) : base(logger, mediator, "###MareSynchronosMainUI")
ServerConfigurationManager serverManager, MareMediator mediator, FileUploadManager fileTransferManager, UidDisplayHandler uidDisplayHandler) : base(logger, mediator, "###LoporritSyncMainUI")
{
_uiShared = uiShared;
_configService = configService;
@@ -76,11 +76,11 @@ public class CompactUi : WindowMediatorSubscriberBase
#if DEBUG
string dev = "Dev Build";
var ver = Assembly.GetExecutingAssembly().GetName().Version!;
WindowName = $"Mare Synchronos {dev} ({ver.Major}.{ver.Minor}.{ver.Build})###MareSynchronosMainUI";
WindowName = $"Loporrit Sync {dev} ({ver.Major}.{ver.Minor}.{ver.Build}-lop{ver.Revision})###LoporritSyncMainUI";
Toggle();
#else
var ver = Assembly.GetExecutingAssembly().GetName().Version;
WindowName = "Mare Synchronos " + ver.Major + "." + ver.Minor + "." + ver.Build + "###MareSynchronosMainUI";
WindowName = "Loporrit Sync " + ver.Major + "." + ver.Minor + "." + ver.Build + "-lop" + ver.Revision + "###LoporritSyncMainUI";
#endif
Mediator.Subscribe<SwitchToMainUiMessage>(this, (_) => IsOpen = true);
Mediator.Subscribe<SwitchToIntroUiMessage>(this, (_) => IsOpen = false);
@@ -100,6 +100,17 @@ public class CompactUi : WindowMediatorSubscriberBase
public override void Draw()
{
/*if (_apiController.ServerInfo.AccentColor.HasValue)
{
UiSharedService.AccentColor = _apiController.ServerInfo.AccentColor.Value;
}
else*/
{
if (_serverManager.CurrentApiUrl == ApiController.LoporritServiceUri)
UiSharedService.AccentColor = new Vector4(1.0f, 0.8666f, 0.06666f, 1.0f);
else
UiSharedService.AccentColor = ImGuiColors.ParsedGreen;
}
WindowContentWidth = UiSharedService.GetWindowContentRegionWidth();
if (!_apiController.IsCurrentVersion)
{
@@ -110,8 +121,8 @@ public class CompactUi : WindowMediatorSubscriberBase
ImGui.SetCursorPosX((ImGui.GetWindowContentRegionMax().X + ImGui.GetWindowContentRegionMin().X) / 2 - uidTextSize.X / 2);
ImGui.TextColored(ImGuiColors.DalamudRed, unsupported);
if (_uiShared.UidFontBuilt) ImGui.PopFont();
UiSharedService.ColorTextWrapped($"Your Mare Synchronos installation is out of date, the current version is {ver.Major}.{ver.Minor}.{ver.Build}. " +
$"It is highly recommended to keep Mare Synchronos up to date. Open /xlplugins and update the plugin.", ImGuiColors.DalamudRed);
UiSharedService.ColorTextWrapped($"Your Loporrit installation is out of date, the current version is {ver.Major}.{ver.Minor}.{ver.Build}. " +
$"It is highly recommended to keep Loporrit up to date. Open /xlplugins and update the plugin.", ImGuiColors.DalamudRed);
}
using (ImRaii.PushId("header")) DrawUIDHeader();
@@ -424,7 +435,7 @@ public class CompactUi : WindowMediatorSubscriberBase
{
Mediator.Publish(new UiToggleMessage(typeof(EditProfileUi)));
}
UiSharedService.AttachToolTip("Edit your Mare Profile");
UiSharedService.AttachToolTip("Edit your Profile");
}
ImGui.SameLine(ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth() - buttonSize.X);
@@ -526,7 +537,7 @@ public class CompactUi : WindowMediatorSubscriberBase
{
Mediator.Publish(new OpenSettingsUiMessage());
}
UiSharedService.AttachToolTip("Open the Mare Synchronos Settings");
UiSharedService.AttachToolTip("Open the Loporrit Settings");
ImGui.SameLine(); //Important to draw the uidText consistently
ImGui.SetCursorPos(originalPos);
@@ -577,10 +588,10 @@ public class CompactUi : WindowMediatorSubscriberBase
{
ServerState.Connecting => "Attempting to connect to the server.",
ServerState.Reconnecting => "Connection to server interrupted, attempting to reconnect to the server.",
ServerState.Disconnected => "You are currently disconnected from the Mare Synchronos server.",
ServerState.Disconnected => "You are currently disconnected from the sync server.",
ServerState.Disconnecting => "Disconnecting from the server",
ServerState.Unauthorized => "Server Response: " + _apiController.AuthFailureMessage,
ServerState.Offline => "Your selected Mare Synchronos server is currently offline.",
ServerState.Offline => "Your selected sync server is currently offline.",
ServerState.VersionMisMatch =>
"Your plugin or the server you are connecting to is out of date. Please update your plugin now. If you already did so, contact the server provider to update their server to the latest version.",
ServerState.RateLimited => "You are rate limited for (re)connecting too often. Disconnect, wait 10 minutes and try again.",
@@ -596,7 +607,7 @@ public class CompactUi : WindowMediatorSubscriberBase
{
ServerState.Connecting => ImGuiColors.DalamudYellow,
ServerState.Reconnecting => ImGuiColors.DalamudRed,
ServerState.Connected => ImGuiColors.ParsedGreen,
ServerState.Connected => UiSharedService.AccentColor,
ServerState.Disconnected => ImGuiColors.DalamudYellow,
ServerState.Disconnecting => ImGuiColors.DalamudYellow,
ServerState.Unauthorized => ImGuiColors.DalamudRed,

View File

@@ -310,12 +310,12 @@ public class DrawGroupPair : DrawPairBase
ImGui.CloseCurrentPopup();
}
UiSharedService.AttachToolTip("Opens the profile for this user in a new window");
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.ExclamationTriangle, "Report Mare Profile"))
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.ExclamationTriangle, "Report Profile"))
{
ImGui.CloseCurrentPopup();
_mediator.Publish(new OpenReportPopupMessage(_pair));
}
UiSharedService.AttachToolTip("Report this users Mare Profile to the administrative team");
UiSharedService.AttachToolTip("Report this users Profile to the administrative team");
}
ImGui.EndPopup();
}

View File

@@ -263,12 +263,12 @@ public class DrawUserPair : DrawPairBase
ImGui.Separator();
if (!entry.IsPaused)
{
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.ExclamationTriangle, "Report Mare Profile"))
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.ExclamationTriangle, "Report Profile"))
{
ImGui.CloseCurrentPopup();
_mediator.Publish(new OpenReportPopupMessage(_pair));
}
UiSharedService.AttachToolTip("Report this users Mare Profile to the administrative team");
UiSharedService.AttachToolTip("Report this users profile to the administrative team");
}
}
}

View File

@@ -29,15 +29,14 @@ internal class ReportPopupHandler : IPopupHandler
public void DrawContent()
{
using (ImRaii.PushFont(_uiSharedService.UidFont))
UiSharedService.TextWrapped("Report " + _reportedPair!.UserData.AliasOrUID + " Mare Profile");
UiSharedService.TextWrapped("Report " + _reportedPair!.UserData.AliasOrUID + " Profile");
ImGui.InputTextMultiline("##reportReason", ref _reportReason, 500, new Vector2(500 - ImGui.GetStyle().ItemSpacing.X * 2, 200));
UiSharedService.TextWrapped($"Note: Sending a report will disable the offending profile globally.{Environment.NewLine}" +
$"The report will be sent to the team of your currently connected Mare Synchronos Service.{Environment.NewLine}" +
$"The report will include your user and your contact info (Discord User).{Environment.NewLine}" +
$"Depending on the severity of the offense the users Mare profile or account can be permanently disabled or banned.");
$"The report will be sent to the team of your currently connected server.{Environment.NewLine}" +
$"Depending on the severity of the offense the users profile or account can be permanently disabled or banned.");
UiSharedService.ColorTextWrapped("Report spam and wrong reports will not be tolerated and can lead to permanent account suspension.", ImGuiColors.DalamudRed);
UiSharedService.ColorTextWrapped("This is not for reporting misbehavior or Mare usage but solely for the actual profile. " +
UiSharedService.ColorTextWrapped("This is not for reporting misbehavior but solely for the actual profile. " +
"Reports that are not solely for the profile will be ignored.", ImGuiColors.DalamudYellow);
using (ImRaii.Disabled(string.IsNullOrEmpty(_reportReason)))

View File

@@ -98,7 +98,7 @@ public class DataAnalysisUi : WindowMediatorSubscriberBase
_hasUpdate = false;
}
UiSharedService.TextWrapped("This window shows you all files and their sizes that are currently in use through your character and associated entities in Mare");
UiSharedService.TextWrapped("This window shows you all files and their sizes that are currently in use through your character and associated entities");
if (_cachedAnalysis!.Count == 0) return;
@@ -333,7 +333,7 @@ public class DataAnalysisUi : WindowMediatorSubscriberBase
private void DrawTable(IGrouping<string, CharacterAnalyzer.FileDataEntry> fileGroup)
{
using var table = ImRaii.Table("Analysis", string.Equals(fileGroup.Key, "tex", StringComparison.Ordinal) ?
using var table = ImRaii.Table("Analysis", string.Equals(fileGroup.Key, "tex", StringComparison.Ordinal) ?
(_enableBc7ConversionMode ? 7 : 6) : 5, ImGuiTableFlags.Sortable | ImGuiTableFlags.RowBg | ImGuiTableFlags.ScrollY | ImGuiTableFlags.SizingFixedFit,
new Vector2(0, 300));
if (!table.Success) return;

View File

@@ -22,7 +22,7 @@ public class DownloadUi : WindowMediatorSubscriberBase
private readonly ConcurrentDictionary<GameObjectHandler, bool> _uploadingPlayers = new();
public DownloadUi(ILogger<DownloadUi> logger, DalamudUtilService dalamudUtilService, MareConfigService configService,
FileUploadManager fileTransferManager, MareMediator mediator, UiSharedService uiShared) : base(logger, mediator, "Mare Synchronos Downloads")
FileUploadManager fileTransferManager, MareMediator mediator, UiSharedService uiShared) : base(logger, mediator, "Loporrit Downloads")
{
_dalamudUtilService = dalamudUtilService;
_configService = configService;

View File

@@ -79,7 +79,7 @@ public sealed class DtrEntry : IDisposable, IHostedService
private DtrBarEntry CreateEntry()
{
_logger.LogTrace("Creating new DtrBar entry");
var entry = _dtrBar.Get("Mare Synchronos");
var entry = _dtrBar.Get("Loporrit");
entry.OnClick = () => _mareMediator.Publish(new UiToggleMessage(typeof(CompactUi)));
return entry;
@@ -135,18 +135,18 @@ public sealed class DtrEntry : IDisposable, IHostedService
.Where(x => x.IsVisible)
.Select(x => string.Format("{0}", _configService.Current.PreferNoteInDtrTooltip ? x.GetNote() ?? x.PlayerName : x.PlayerName));
}
tooltip = $"Mare Synchronos: Connected{Environment.NewLine}----------{Environment.NewLine}{string.Join(Environment.NewLine, visiblePairs)}";
tooltip = $"Loporrit: Connected{Environment.NewLine}----------{Environment.NewLine}{string.Join(Environment.NewLine, visiblePairs)}";
}
else
{
tooltip = "Mare Synchronos: Connected";
tooltip = "Loporrit: Connected";
}
}
else
{
text = "\uE044 \uE04C";
tooltip = "Mare Synchronos: Not Connected";
tooltip = "Loporrit: Not Connected";
}
if (!string.Equals(text, _text, StringComparison.Ordinal))
@@ -156,4 +156,4 @@ public sealed class DtrEntry : IDisposable, IHostedService
_entry.Value.Tooltip = tooltip;
}
}
}
}

View File

@@ -9,6 +9,7 @@ using MareSynchronos.API.Data;
using MareSynchronos.API.Dto.User;
using MareSynchronos.Services;
using MareSynchronos.Services.Mediator;
using MareSynchronos.Services.ServerConfiguration;
using MareSynchronos.WebAPI;
using Microsoft.Extensions.Logging;
@@ -21,6 +22,7 @@ public class EditProfileUi : WindowMediatorSubscriberBase
private readonly MareProfileManager _mareProfileManager;
private readonly UiBuilder _uiBuilder;
private readonly UiSharedService _uiSharedService;
private readonly ServerConfigurationManager _serverConfigurationManager;
private bool _adjustedForScollBarsLocalProfile = false;
private bool _adjustedForScollBarsOnlineProfile = false;
private string _descriptionText = string.Empty;
@@ -32,7 +34,8 @@ public class EditProfileUi : WindowMediatorSubscriberBase
public EditProfileUi(ILogger<EditProfileUi> logger, MareMediator mediator,
ApiController apiController, UiBuilder uiBuilder, UiSharedService uiSharedService,
FileDialogManager fileDialogManager, MareProfileManager mareProfileManager) : base(logger, mediator, "Mare Synchronos Edit Profile###MareSynchronosEditProfileUI")
FileDialogManager fileDialogManager, ServerConfigurationManager serverConfigurationManager,
MareProfileManager mareProfileManager) : base(logger, mediator, "Loporrit Edit Profile###LoporritSyncEditProfileUI")
{
IsOpen = false;
this.SizeConstraints = new()
@@ -44,6 +47,7 @@ public class EditProfileUi : WindowMediatorSubscriberBase
_uiBuilder = uiBuilder;
_uiSharedService = uiSharedService;
_fileDialogManager = fileDialogManager;
_serverConfigurationManager = serverConfigurationManager;
_mareProfileManager = mareProfileManager;
Mediator.Subscribe<GposeStartMessage>(this, (_) => { _wasOpen = IsOpen; IsOpen = false; });
@@ -118,16 +122,20 @@ public class EditProfileUi : WindowMediatorSubscriberBase
ImGui.Checkbox("Is NSFW", ref nsfw);
ImGui.EndDisabled();
ImGui.Separator();
_uiSharedService.BigText("Notes and Rules for Profiles");
if (_serverConfigurationManager.CurrentApiUrl == ApiController.MainServiceUri)
{
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.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

@@ -20,7 +20,7 @@ public class GposeUi : WindowMediatorSubscriberBase
public GposeUi(ILogger<GposeUi> logger, MareCharaFileManager mareCharaFileManager,
DalamudUtilService dalamudUtil, FileDialogManager fileDialogManager, MareConfigService configService,
MareMediator mediator) : base(logger, mediator, "Mare Synchronos Gpose Import UI###MareSynchronosGposeUI")
MareMediator mediator) : base(logger, mediator, "Loporrit Gpose Import UI###LoporritSyncGposeUI")
{
_mareCharaFileManager = mareCharaFileManager;
_dalamudUtil = dalamudUtil;
@@ -80,7 +80,7 @@ public class GposeUi : WindowMediatorSubscriberBase
{
UiSharedService.ColorTextWrapped("Loading Character...", ImGuiColors.DalamudYellow);
}
UiSharedService.TextWrapped("Hint: You can disable the automatic loading of this window in the Mare settings and open it manually with /mare gpose");
UiSharedService.TextWrapped("Hint: You can disable the automatic loading of this window in the Loporrit settings and open it manually with /sync gpose");
}
private void EndGpose()

View File

@@ -29,7 +29,7 @@ public class IntroUi : WindowMediatorSubscriberBase
private string[]? _tosParagraphs;
public IntroUi(ILogger<IntroUi> logger, UiSharedService uiShared, MareConfigService configService,
PeriodicFileScanner fileCacheManager, ServerConfigurationManager serverConfigurationManager, MareMediator mareMediator) : base(logger, mareMediator, "Mare Synchronos Setup")
PeriodicFileScanner fileCacheManager, ServerConfigurationManager serverConfigurationManager, MareMediator mareMediator) : base(logger, mareMediator, "Loporrit Setup")
{
_uiShared = uiShared;
_configService = configService;
@@ -62,9 +62,9 @@ public class IntroUi : WindowMediatorSubscriberBase
if (!_configService.Current.AcceptedAgreement && !_readFirstPage)
{
_uiShared.BigText("Welcome to Mare Synchronos");
_uiShared.BigText("Welcome to Loporrit");
ImGui.Separator();
UiSharedService.TextWrapped("Mare Synchronos is a plugin that will replicate your full current character state including all Penumbra mods to other paired Mare Synchronos users. " +
UiSharedService.TextWrapped("Loporrit is a plugin that will replicate your full current character state including all Penumbra mods to other paired users. " +
"Note that you will have to have Penumbra as well as Glamourer installed to use this plugin.");
UiSharedService.TextWrapped("We will have to setup a few things first before you can start using this plugin. Click on next to continue.");
@@ -78,7 +78,7 @@ public class IntroUi : WindowMediatorSubscriberBase
_readFirstPage = true;
_timeoutTask = Task.Run(async () =>
{
for (int i = 60; i > 0; i--)
for (int i = 10; i > 0; i--)
{
_timeoutLabel = $"{Strings.ToS.ButtonWillBeAvailableIn} {i}s";
await Task.Delay(TimeSpan.FromSeconds(1)).ConfigureAwait(false);
@@ -153,11 +153,11 @@ public class IntroUi : WindowMediatorSubscriberBase
}
else
{
UiSharedService.TextWrapped("To not unnecessary download files already present on your computer, Mare Synchronos will have to scan your Penumbra mod directory. " +
"Additionally, a local storage folder must be set where Mare Synchronos will download other character files to. " +
UiSharedService.TextWrapped("To not unnecessary download files already present on your computer, Loporrit will have to scan your Penumbra mod directory. " +
"Additionally, a local storage folder must be set where Loporrit will download other character files to. " +
"Once the storage folder is set and the scan complete, this page will automatically forward to registration at a service.");
UiSharedService.TextWrapped("Note: The initial scan, depending on the amount of mods you have, might take a while. Please wait until it is completed.");
UiSharedService.ColorTextWrapped("Warning: once past this step you should not delete the FileCache.csv of Mare Synchronos in the Plugin Configurations folder of Dalamud. " +
UiSharedService.ColorTextWrapped("Warning: once past this step you should not delete the FileCache.csv of Loporrit in the Plugin Configurations folder of Dalamud. " +
"Otherwise on the next launch a full re-scan of the file cache database will be initiated.", ImGuiColors.DalamudYellow);
UiSharedService.ColorTextWrapped("Warning: if the scan is hanging and does nothing for a long time, chances are high your Penumbra folder is not set up properly.", ImGuiColors.DalamudYellow);
_uiShared.DrawCacheDirectorySetting();
@@ -182,8 +182,8 @@ public class IntroUi : WindowMediatorSubscriberBase
_configService.Current.UseCompactor = useFileCompactor;
_configService.Save();
}
UiSharedService.ColorTextWrapped("The File Compactor can save a tremendeous amount of space on the hard disk for downloads through Mare. It will incur a minor CPU penalty on download but can speed up " +
"loading of other characters. It is recommended to keep it enabled. You can change this setting later anytime in the Mare settings.", ImGuiColors.DalamudYellow);
UiSharedService.ColorTextWrapped("The File Compactor can save a tremendeous amount of space on the hard disk for downloads through Loporrit. It will incur a minor CPU penalty on download but can speed up " +
"loading of other characters. It is recommended to keep it enabled. You can change this setting later anytime in the Loporrit settings.", ImGuiColors.DalamudYellow);
}
}
else if (!_uiShared.ApiController.ServerAlive)
@@ -192,7 +192,7 @@ public class IntroUi : WindowMediatorSubscriberBase
ImGui.TextUnformatted("Service Registration");
if (_uiShared.UidFontBuilt) ImGui.PopFont();
ImGui.Separator();
UiSharedService.TextWrapped("To be able to use Mare Synchronos you will have to register an account.");
UiSharedService.TextWrapped("To be able to use Loporrit you will have to register an account.");
UiSharedService.TextWrapped("For the official Mare Synchronos Servers the account creation will be handled on the official Mare Synchronos Discord. Due to security risks for the server, there is no way to handle this senisibly otherwise.");
UiSharedService.TextWrapped("If you want to register at the main server \"" + WebAPI.ApiController.MainServer + "\" join the Discord and follow the instructions as described in #mare-commands.");

View File

@@ -20,7 +20,7 @@ public class PermissionWindowUI : WindowMediatorSubscriberBase
private UserPermissions _ownPermissions;
public PermissionWindowUI(ILogger<PermissionWindowUI> logger, Pair pair, MareMediator mediator, UiSharedService uiSharedService,
ApiController apiController) : base(logger, mediator, "Permissions for " + pair.UserData.AliasOrUID + "###MareSynchronosPermissions" + pair.UserData.UID)
ApiController apiController) : base(logger, mediator, "Permissions for " + pair.UserData.AliasOrUID + "###LoporritSyncPermissions" + pair.UserData.UID)
{
Pair = pair;
_uiSharedService = uiSharedService;

View File

@@ -31,7 +31,7 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
public PopoutProfileUi(ILogger<PopoutProfileUi> logger, MareMediator mediator, UiSharedService uiBuilder,
ServerConfigurationManager serverManager, MareConfigService mareConfigService,
MareProfileManager mareProfileManager, PairManager pairManager) : base(logger, mediator, "###MareSynchronosPopoutProfileUI")
MareProfileManager mareProfileManager, PairManager pairManager) : base(logger, mediator, "###LoporritSyncPopoutProfileUI")
{
_uiSharedService = uiBuilder;
_serverManager = serverManager;
@@ -111,8 +111,8 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
var rectMin = drawList.GetClipRectMin();
var rectMax = drawList.GetClipRectMax();
using (ImRaii.PushFont(_uiSharedService.UidFont, _uiSharedService.UidFontBuilt))
UiSharedService.ColorText(_pair.UserData.AliasOrUID, ImGuiColors.HealerGreen);
using (ImRaii.PushFont(_uiSharedService.UidFont, _uiSharedService.UidFontBuilt))
UiSharedService.ColorText(_pair.UserData.AliasOrUID, UiSharedService.AccentColor);
ImGuiHelpers.ScaledDummy(spacing.Y, spacing.Y);
var textPos = ImGui.GetCursorPosY();

View File

@@ -64,7 +64,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
FileUploadManager fileTransferManager,
FileTransferOrchestrator fileTransferOrchestrator,
FileCacheManager fileCacheManager,
FileCompactor fileCompactor, ApiController apiController) : base(logger, mediator, "Mare Synchronos Settings")
FileCompactor fileCompactor, ApiController apiController) : base(logger, mediator, "Loporrit Settings")
{
_configService = configService;
_mareCharaFileManager = mareCharaFileManager;
@@ -117,7 +117,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
_lastTab = "BlockedTransfers";
UiSharedService.ColorTextWrapped("Files that you attempted to upload or download that were forbidden to be transferred by their creators will appear here. " +
"If you see file paths from your drive here, then those files were not allowed to be uploaded. If you see hashes, those files were not allowed to be downloaded. " +
"Ask your paired friend to send you the mod in question through other means, acquire the mod yourself or pester the mod creator to allow it to be sent over Mare.",
"Ask your paired friend to send you the mod in question through other means or acquire the mod yourself.",
ImGuiColors.DalamudGrey);
if (ImGui.BeginTable("TransfersTable", 2, ImGuiTableFlags.SizingStretchProp))
@@ -414,8 +414,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
UiSharedService.FontText("Export MCDF", _uiShared.UidFont);
UiSharedService.TextWrapped("This feature allows you to pack your character into a MCDF file and manually send it to other people. MCDF files can officially only be imported during GPose through Mare. " +
"Be aware that the possibility exists that people write unofficial custom exporters to extract the containing data.");
UiSharedService.TextWrapped("This feature allows you to pack your character appearance into a MCDF file and manually send it to other people. MCDF files can imported during GPose.");
ImGui.Checkbox("##readExport", ref _readExport);
ImGui.SameLine();
@@ -469,13 +468,13 @@ public class SettingsUi : WindowMediatorSubscriberBase
_configService.Current.OpenGposeImportOnGposeStart = openInGpose;
_configService.Save();
}
UiSharedService.DrawHelpText("This will automatically open the import menu when loading into Gpose. If unchecked you can open the menu manually with /mare gpose");
UiSharedService.DrawHelpText("This will automatically open the import menu when loading into Gpose. If unchecked you can open the menu manually with /sync gpose");
ImGui.Separator();
UiSharedService.FontText("Storage", _uiShared.UidFont);
UiSharedService.TextWrapped("Mare stores downloaded files from paired people permanently. This is to improve loading performance and requiring less downloads. " +
UiSharedService.TextWrapped("Loporrit stores downloaded files from paired people permanently. This is to improve loading performance and requiring less downloads. " +
"The storage governs itself by clearing data beyond the set storage size. Please set the storage size accordingly. It is not necessary to manually clear the storage.");
_uiShared.DrawFileScanState();
@@ -499,14 +498,14 @@ public class SettingsUi : WindowMediatorSubscriberBase
{
_ = Task.Run(() => _fileCompactor.CompactStorage(compress: true));
}
UiSharedService.AttachToolTip("This will run compression on all files in your current Mare Storage." + Environment.NewLine
UiSharedService.AttachToolTip("This will run compression on all files in your current storage folder." + Environment.NewLine
+ "You do not need to run this manually if you keep the file compactor enabled.");
ImGui.SameLine();
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.File, "Decompact all files in storage"))
{
_ = Task.Run(() => _fileCompactor.CompactStorage(compress: false));
}
UiSharedService.AttachToolTip("This will run decompression on all files in your current Mare Storage.");
UiSharedService.AttachToolTip("This will run decompression on all files in your current storage folder.");
}
else
{
@@ -520,7 +519,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
ImGuiHelpers.ScaledDummy(new Vector2(10, 10));
ImGui.Separator();
UiSharedService.TextWrapped("File Storage validation can make sure that all files in your local Mare Storage are valid. " +
UiSharedService.TextWrapped("File Storage validation can make sure that all files in your local storage folder are valid. " +
"Run the validation before you clear the Storage for no reason. " + Environment.NewLine +
"This operation, depending on how many files you have in your storage, can take a while and will be CPU and drive intensive.");
using (ImRaii.Disabled(_validationTask != null && !_validationTask.IsCompleted))
@@ -585,7 +584,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
}
UiSharedService.AttachToolTip("You normally do not need to do this. THIS IS NOT SOMETHING YOU SHOULD BE DOING TO TRY TO FIX SYNC ISSUES." + Environment.NewLine
+ "This will solely remove all downloaded data from all players and will require you to re-download everything again." + Environment.NewLine
+ "Mares storage is self-clearing and will not surpass the limit you have set it to." + Environment.NewLine
+ "Loporrit's storage is self-clearing and will not surpass the limit you have set it to." + Environment.NewLine
+ "If you still think you need to do this hold CTRL while pressing the button.");
if (!_readClearCache)
ImGui.EndDisabled();
@@ -663,14 +662,14 @@ public class SettingsUi : WindowMediatorSubscriberBase
_configService.Current.EnableRightClickMenus = enableRightClickMenu;
_configService.Save();
}
UiSharedService.DrawHelpText("This will add Mare related right click menu entries in the game UI on paired players.");
UiSharedService.DrawHelpText("This will add Loporrit related right click menu entries in the game UI on paired players.");
if (ImGui.Checkbox("Display status and visible pair count in Server Info Bar", ref enableDtrEntry))
{
_configService.Current.EnableDtrEntry = enableDtrEntry;
_configService.Save();
}
UiSharedService.DrawHelpText("This will add Mare connection status and visible pair count in the Server Info Bar.\nYou can further configure this through your Dalamud Settings.");
UiSharedService.DrawHelpText("This will add Loporrit connection status and visible pair count in the Server Info Bar.\nYou can further configure this through your Dalamud Settings.");
using (ImRaii.Disabled(!enableDtrEntry))
{
@@ -720,7 +719,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
if (!_configService.Current.ShowCharacterNameInsteadOfNotesForVisible) ImGui.EndDisabled();
ImGui.Unindent();
if (ImGui.Checkbox("Show Mare Profiles on Hover", ref showProfiles))
if (ImGui.Checkbox("Show Profiles on Hover", ref showProfiles))
{
Mediator.Publish(new ClearProfileDataMessage());
_configService.Current.ProfilesShow = showProfiles;
@@ -925,7 +924,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
{
if (selectedServer.SecretKeys.Any())
{
UiSharedService.ColorTextWrapped("Characters listed here will automatically connect to the selected Mare service with the settings as provided below." +
UiSharedService.ColorTextWrapped("Characters listed here will automatically connect to the selected service with the settings as provided below." +
" Make sure to enter the character names correctly or use the 'Add current character' button at the bottom.", ImGuiColors.DalamudYellow);
int i = 0;
foreach (var item in selectedServer.Authentications.ToList())
@@ -1062,7 +1061,8 @@ public class SettingsUi : WindowMediatorSubscriberBase
{
var serverName = selectedServer.ServerName;
var serverUri = selectedServer.ServerUri;
var isMain = string.Equals(serverName, ApiController.MainServer, StringComparison.OrdinalIgnoreCase);
var isMain = string.Equals(serverName, ApiController.LoporritServer, StringComparison.OrdinalIgnoreCase)
|| string.Equals(serverName, ApiController.MainServer, StringComparison.OrdinalIgnoreCase);
var flags = isMain ? ImGuiInputTextFlags.ReadOnly : ImGuiInputTextFlags.None;
if (ImGui.InputText("Service URI", ref serverUri, 255, flags))
@@ -1114,14 +1114,6 @@ public class SettingsUi : WindowMediatorSubscriberBase
ImGui.SameLine();
ImGui.TextUnformatted(")");
}
ImGui.AlignTextToFramePadding();
ImGui.TextUnformatted("Community and Support:");
ImGui.SameLine();
if (ImGui.Button("Mare Synchronos Discord"))
{
Util.OpenLink("https://discord.gg/mpNdkrTRjW");
}
ImGui.Separator();
if (ImGui.BeginTabBar("mainTabBar"))
{

View File

@@ -28,7 +28,7 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
public StandaloneProfileUi(ILogger<StandaloneProfileUi> logger, MareMediator mediator, UiSharedService uiBuilder,
ServerConfigurationManager serverManager, MareProfileManager mareProfileManager, PairManager pairManager, Pair pair)
: base(logger, mediator, "Mare Profile of " + pair.UserData.AliasOrUID + "##MareSynchronosStandaloneProfileUI" + pair.UserData.AliasOrUID)
: base(logger, mediator, "Profile of " + pair.UserData.AliasOrUID + "##LoporritSyncStandaloneProfileUI" + pair.UserData.AliasOrUID)
{
_uiSharedService = uiBuilder;
_serverManager = serverManager;
@@ -78,7 +78,7 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
var headerSize = ImGui.GetCursorPosY() - ImGui.GetStyle().WindowPadding.Y;
using (ImRaii.PushFont(_uiSharedService.UidFont, _uiSharedService.UidFontBuilt))
UiSharedService.ColorText(Pair.UserData.AliasOrUID, ImGuiColors.HealerGreen);
UiSharedService.ColorText(Pair.UserData.AliasOrUID, UiSharedService.AccentColor);
ImGuiHelpers.ScaledDummy(new Vector2(spacing.Y, spacing.Y));
var textPos = ImGui.GetCursorPosY() - headerSize;

View File

@@ -31,6 +31,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
public static readonly ImGuiWindowFlags PopupWindowFlags = ImGuiWindowFlags.NoResize |
ImGuiWindowFlags.NoScrollbar |
ImGuiWindowFlags.NoScrollWithMouse;
public static Vector4 AccentColor = ImGuiColors.DalamudYellow;
public readonly FileDialogManager FileDialogManager;
@@ -565,7 +566,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
public void DrawCacheDirectorySetting()
{
ColorTextWrapped("Note: The storage folder should be somewhere close to root (i.e. C:\\MareStorage) in a new empty folder. DO NOT point this to your game folder. DO NOT point this to your Penumbra folder.", ImGuiColors.DalamudYellow);
ColorTextWrapped("Note: The storage folder should be somewhere close to root (i.e. C:\\LoporritStorage) in a new empty folder. DO NOT point this to your game folder. DO NOT point this to your Penumbra folder.", ImGuiColors.DalamudYellow);
var cacheDirectory = _configService.Current.CacheFolder;
ImGui.InputText("Storage Folder##cache", ref cacheDirectory, 255, ImGuiInputTextFlags.ReadOnly);
@@ -574,7 +575,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
string folderIcon = FontAwesomeIcon.Folder.ToIconString();
if (ImGui.Button(folderIcon + "##chooseCacheFolder"))
{
FileDialogManager.OpenFolderDialog("Pick Mare Synchronos Storage Folder", (success, path) =>
FileDialogManager.OpenFolderDialog("Pick Loporrit Storage Folder", (success, path) =>
{
if (!success) return;
@@ -608,7 +609,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
}
else if (_cacheDirectoryHasOtherFilesThanCache)
{
ColorTextWrapped("Your selected directory has files inside that are not Mare related. Use an empty directory or a previous Mare storage directory only.", ImGuiColors.DalamudRed);
ColorTextWrapped("Your selected directory has files inside that are not Loporrit related. Use an empty directory or a previous storage directory only.", ImGuiColors.DalamudRed);
}
else if (!_cacheDirectoryIsValidPath)
{
@@ -622,7 +623,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
_configService.Current.MaxLocalCacheInGiB = maxCacheSize;
_configService.Save();
}
DrawHelpText("The storage is automatically governed by Mare. It will clear itself automatically once it reaches the set capacity by removing the oldest unused files. You typically do not need to clear it yourself.");
DrawHelpText("The storage is automatically governed by Loporrit. It will clear itself automatically once it reaches the set capacity by removing the oldest unused files. You typically do not need to clear it yourself.");
}
public T? DrawCombo<T>(string comboName, IEnumerable<T> comboItems, Func<T, string> toName,
@@ -767,7 +768,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
if (!_penumbraExists || !_glamourerExists)
{
ImGui.TextColored(ImGuiColors.DalamudRed, "You need to install both Penumbra and Glamourer and keep them up to date to use Mare Synchronos.");
ImGui.TextColored(ImGuiColors.DalamudRed, "You need to install both Penumbra and Glamourer and keep them up to date to use Loporrit.");
return false;
}
@@ -866,7 +867,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
_configService.Current.FileScanPaused = isPaused;
_configService.Save();
}
DrawHelpText("This allows you to stop the periodic scans of your Penumbra and Mare cache directories. Use this to move the Mare cache and Penumbra mod folders around. If you enable this permanently, run a Force rescan after adding mods to Penumbra.");
DrawHelpText("This allows you to stop the periodic scans of your Penumbra and Loporrit cache directories. Use this to move the Loporrit cache and Penumbra mod folders around. If you enable this permanently, run a Force rescan after adding mods to Penumbra.");
}
public void LoadLocalization(string languageCode)

View File

@@ -19,6 +19,8 @@ namespace MareSynchronos.WebAPI;
#pragma warning disable MA0040
public sealed partial class ApiController : DisposableMediatorSubscriberBase, IMareHubClient
{
public const string LoporritServer = "Loporrit Main Server";
public const string LoporritServiceUri = "wss://loporrit.us.to";
public const string MainServer = "Lunae Crescere Incipientis (Central Server EU)";
public const string MainServiceUri = "wss://maresynchronos.com";
@@ -175,7 +177,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
Mediator.Publish(new NotificationMessage("Client incompatible",
$"Your client is outdated ({currentClientVer.Major}.{currentClientVer.Minor}.{currentClientVer.Build}), current is: " +
$"{_connectionDto.CurrentClientVersion.Major}.{_connectionDto.CurrentClientVersion.Minor}.{_connectionDto.CurrentClientVersion.Build}. " +
$"This client version is incompatible and will not be able to connect. Please update your Mare Synchronos client.",
$"This client version is incompatible and will not be able to connect. Please update your Loporrit client.",
Dalamud.Interface.Internal.Notifications.NotificationType.Error));
}
await StopConnection(ServerState.VersionMisMatch).ConfigureAwait(false);
@@ -187,7 +189,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
Mediator.Publish(new NotificationMessage("Client outdated",
$"Your client is outdated ({currentClientVer.Major}.{currentClientVer.Minor}.{currentClientVer.Build}), current is: " +
$"{_connectionDto.CurrentClientVersion.Major}.{_connectionDto.CurrentClientVersion.Minor}.{_connectionDto.CurrentClientVersion.Build}. " +
$"Please keep your Mare Synchronos client up-to-date.",
$"Please keep your Loporrit client up-to-date.",
Dalamud.Interface.Internal.Notifications.NotificationType.Warning));
}

View File

@@ -83,7 +83,7 @@ public sealed class TokenProvider : IDisposable, IMediatorSubscriber
if (ex.StatusCode == System.Net.HttpStatusCode.Unauthorized)
{
Mediator.Publish(new NotificationMessage("Error refreshing token", "Your authentication token could not be renewed. Try reconnecting to Mare manually.",
Mediator.Publish(new NotificationMessage("Error refreshing token", "Your authentication token could not be renewed. Try reconnecting manually.",
Dalamud.Interface.Internal.Notifications.NotificationType.Error));
Mediator.Publish(new DisconnectedMessage());
throw new MareAuthFailureException(response);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -1,7 +1,3 @@
# Mare Synchronos Dalamud Plugin
Available at [This dalamud Repo](https://raw.githubusercontent.com/Penumbra-Sync/repo/main/plogonmaster.json)
# [Mare Synchronos Discord](https://discord.gg/5HVveFefcB)
# Loporrit Sync Dalamud Plugin
Readme TBD