remove old ref + update gitsubmodule + update 0.1.0.0 + add NoSnapService + pimpmymod + Licence AGPLv3

This commit is contained in:
2025-09-05 15:03:41 +02:00
parent b5d8f288f9
commit eeab8354b6
95 changed files with 435 additions and 1742 deletions

View File

@@ -60,7 +60,7 @@ public class CompactUi : WindowMediatorSubscriberBase
public CompactUi(ILogger<CompactUi> logger, UiSharedService uiShared, MareConfigService configService, ApiController apiController, PairManager pairManager, ChatService chatService,
ServerConfigurationManager serverManager, MareMediator mediator, FileUploadManager fileTransferManager, UidDisplayHandler uidDisplayHandler, CharaDataManager charaDataManager,
PerformanceCollectorService performanceCollectorService)
: base(logger, mediator, "###UmbraSyncSyncMainUI", performanceCollectorService)
: base(logger, mediator, "###UmbraSyncMainUI", performanceCollectorService)
{
_uiSharedService = uiShared;
_configService = configService;
@@ -80,11 +80,11 @@ public class CompactUi : WindowMediatorSubscriberBase
#if DEBUG
string dev = "Dev Build";
var ver = Assembly.GetExecutingAssembly().GetName().Version!;
WindowName = $"UmbraSync {dev} ({ver.Major}.{ver.Minor}.{ver.Build})###UmbraSyncSyncMainUIDev";
WindowName = $"Umbra Sync {dev} ({ver.Major}.{ver.Minor}.{ver.Build})###UmbraSyncMainUIDev";
Toggle();
#else
var ver = Assembly.GetExecutingAssembly().GetName().Version!;
WindowName = "UmbraSync " + ver.Major + "." + ver.Minor + "." + ver.Build + "###UmbraSyncSyncMainUI";
WindowName = "Umbra Sync " + ver.Major + "." + ver.Minor + "." + ver.Build + "###UmbraSyncMainUI";
#endif
Mediator.Subscribe<SwitchToMainUiMessage>(this, (_) => IsOpen = true);
Mediator.Subscribe<SwitchToIntroUiMessage>(this, (_) => IsOpen = false);
@@ -104,7 +104,10 @@ public class CompactUi : WindowMediatorSubscriberBase
protected override void DrawInternal()
{
UiSharedService.AccentColor = new Vector4(0.2f, 0.6f, 1f, 1f); // custom blue
if (_serverManager.CurrentApiUrl.Equals(ApiController.UmbraServiceUri, StringComparison.Ordinal))
UiSharedService.AccentColor = new(0.4275f, 0.6863f, 1f, 1f);
else
UiSharedService.AccentColor = new Vector4(0.6f, 0.4f, 0.8f, 1f);
ImGui.SetCursorPosY(ImGui.GetCursorPosY() - ImGui.GetStyle().WindowPadding.Y - 1f * ImGuiHelpers.GlobalScale + ImGui.GetStyle().ItemSpacing.Y);
WindowContentWidth = UiSharedService.GetWindowContentRegionWidth();
if (!_apiController.IsCurrentVersion)
@@ -118,8 +121,8 @@ public class CompactUi : WindowMediatorSubscriberBase
ImGui.AlignTextToFramePadding();
ImGui.TextColored(ImGuiColors.DalamudRed, unsupported);
}
UiSharedService.ColorTextWrapped($"Your UmbraSync installation is out of date, the current version is {ver.Major}.{ver.Minor}.{ver.Build}. " +
$"It is highly recommended to keep UmbraSync up to date. Open /xlplugins and update the plugin.", ImGuiColors.DalamudRed);
UiSharedService.ColorTextWrapped($"Your Umbra installation is out of date, the current version is {ver.Major}.{ver.Minor}.{ver.Build}. " +
$"It is highly recommended to keep Umbra up to date. Open /xlplugins and update the plugin.", ImGuiColors.DalamudRed);
}
using (ImRaii.PushId("header")) DrawUIDHeader();
@@ -384,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);
if (!printShard) ImGui.AlignTextToFramePadding();
ImGui.TextColored(ImGuiColors.ParsedBlue, userCount);
ImGui.TextColored(new Vector4(0.6f, 0.4f, 0.8f, 1f), userCount);
ImGui.SameLine();
if (!printShard) ImGui.AlignTextToFramePadding();
ImGui.TextUnformatted("Users Online");
@@ -407,7 +410,7 @@ public class CompactUi : WindowMediatorSubscriberBase
{
ImGui.SetCursorPosY(ImGui.GetCursorPosY() - ((userSize.Y + textSize.Y) / 2 + shardTextSize.Y) / 2 - ImGui.GetStyle().ItemSpacing.Y + buttonSize.Y / 2);
}
var color = UiSharedService.GetBoolColor(!_serverManager.CurrentServer!.FullPause);
var color = !_serverManager.CurrentServer!.FullPause ? new Vector4(0.6f, 0.4f, 0.8f, 1f) : ImGuiColors.DalamudRed;
var connectedIcon = !_serverManager.CurrentServer.FullPause ? FontAwesomeIcon.Link : FontAwesomeIcon.Unlink;
if (_apiController.ServerState is ServerState.Connected)
@@ -522,7 +525,7 @@ public class CompactUi : WindowMediatorSubscriberBase
{
Mediator.Publish(new OpenSettingsUiMessage());
}
UiSharedService.AttachToolTip("Open the UmbraSync Settings");
UiSharedService.AttachToolTip("Open the Umbra Settings");
ImGui.SameLine(); //Important to draw the uidText consistently
ImGui.SetCursorPos(originalPos);
@@ -592,7 +595,7 @@ public class CompactUi : WindowMediatorSubscriberBase
{
ServerState.Connecting => ImGuiColors.DalamudYellow,
ServerState.Reconnecting => ImGuiColors.DalamudRed,
ServerState.Connected => new Vector4(0.2f, 0.6f, 1f, 1f), // custom blue
ServerState.Connected => UiSharedService.AccentColor,
ServerState.Disconnected => ImGuiColors.DalamudYellow,
ServerState.Disconnecting => ImGuiColors.DalamudYellow,
ServerState.Unauthorized => ImGuiColors.DalamudRed,

View File

@@ -163,13 +163,13 @@ public class DownloadUi : WindowMediatorSubscriberBase
UiSharedService.Color(0, 0, 0, transparency), 1);
drawList.AddRectFilled(dlBarStart with { X = dlBarStart.X - dlBarBorder, Y = dlBarStart.Y - dlBarBorder },
dlBarEnd with { X = dlBarEnd.X + dlBarBorder, Y = dlBarEnd.Y + dlBarBorder },
UiSharedService.Color(220, 220, 255, transparency), 1);
UiSharedService.Color(200, 170, 230, transparency), 1);
drawList.AddRectFilled(dlBarStart, dlBarEnd,
UiSharedService.Color(0, 0, 0, transparency), 1);
var dlProgressPercent = transferredBytes / (double)totalBytes;
drawList.AddRectFilled(dlBarStart,
dlBarEnd with { X = dlBarStart.X + (float)(dlProgressPercent * dlBarWidth) },
UiSharedService.Color(100, 100, 255, transparency), 1);
UiSharedService.Color(153, 102, 204, transparency), 1);
if (_configService.Current.TransferBarsShowText)
{
@@ -198,7 +198,7 @@ public class DownloadUi : WindowMediatorSubscriberBase
var drawList = ImGui.GetBackgroundDrawList();
UiSharedService.DrawOutlinedFont(drawList, uploadText,
screenPos with { X = screenPos.X - textSize.X / 2f - 1, Y = screenPos.Y - textSize.Y / 2f - 1 },
UiSharedService.Color(255, 255, 0, transparency),
UiSharedService.Color(153, 102, 204, transparency),
UiSharedService.Color(0, 0, 0, transparency), 2);
}
catch

View File

@@ -106,8 +106,9 @@ public partial class IntroUi : WindowMediatorSubscriberBase
{
if (_uiShared.IsInGpose) return;
if (!_configService.Current.AcceptedAgreement && !_readFirstPage)
if ((!_configService.Current.AcceptedAgreement || _configService.Current.AcceptedTOSVersion != _configService.Current.ExpectedTOSVersion) && !_readFirstPage)
{
// TODO: The UI bugs hard if this page *isn't* shown before the new TOS. There's probably a way around it.
_uiShared.BigText("Welcome to Umbra");
ImGui.Separator();
UiSharedService.TextWrapped("Umbra is a plugin that will replicate your full current character state including all Penumbra mods to other paired users. " +
@@ -125,7 +126,7 @@ public partial class IntroUi : WindowMediatorSubscriberBase
#if !DEBUG
_timeoutTask = Task.Run(async () =>
{
for (int i = 10; i > 0; i--)
for (int i = 45; i > 0; i--)
{
_timeoutLabel = $"'I agree' button will be available in {i}s";
await Task.Delay(TimeSpan.FromSeconds(1)).ConfigureAwait(false);
@@ -136,7 +137,7 @@ public partial class IntroUi : WindowMediatorSubscriberBase
#endif
}
}
else if (!_configService.Current.AcceptedAgreement && _readFirstPage)
else if ((!_configService.Current.AcceptedAgreement || _configService.Current.AcceptedTOSVersion != _configService.Current.ExpectedTOSVersion) && _readFirstPage)
{
using (_uiShared.UidFont.Push())
{
@@ -151,6 +152,7 @@ public partial class IntroUi : WindowMediatorSubscriberBase
UiSharedService.ColorText(readThis, ImGuiColors.DalamudRed);
ImGui.SetWindowFontScale(1.0f);
ImGui.Separator();
UiSharedService.TextWrapped("""
To use Umbra, you must be over the age of 18, or 21 in some jurisdictions.
""");
@@ -170,10 +172,7 @@ public partial class IntroUi : WindowMediatorSubscriberBase
Mod files that are saved on the service will remain on the service as long as there are requests for the files from clients. After a period of not being used, the mod files will be automatically deleted.
""");
UiSharedService.TextWrapped("""
Accounts that are inactive for ninety (90) days will be deleted for privacy reasons.
""");
UiSharedService.TextWrapped("""
Umbra is operated from servers located in the European Union. You agree not to upload any content to the service that violates EU law; and more specifically, German law.
Umbra is operated from servers located in the European Union and Switzerland. You agree not to upload any content to the service that violates EU and CH law; and more specifically, German law for EU.
""");
UiSharedService.TextWrapped("""
You may delete your account at any time from within the Settings panel of the plugin. Any mods unique to you will then be removed from the server within 14 days.
@@ -188,6 +187,7 @@ public partial class IntroUi : WindowMediatorSubscriberBase
if (ImGui.Button("I agree##toSetup"))
{
_configService.Current.AcceptedAgreement = true;
_configService.Current.AcceptedTOSVersion = _configService.Current.ExpectedTOSVersion;
_configService.Save();
}
}
@@ -196,7 +196,7 @@ public partial class IntroUi : WindowMediatorSubscriberBase
UiSharedService.TextWrapped(_timeoutLabel);
}
}
else if (_configService.Current.AcceptedAgreement
else if ((!_configService.Current.AcceptedAgreement || _configService.Current.AcceptedTOSVersion != _configService.Current.ExpectedTOSVersion)
&& (string.IsNullOrEmpty(_configService.Current.CacheFolder)
|| !_configService.Current.InitialScanComplete
|| !Directory.Exists(_configService.Current.CacheFolder)))

View File

@@ -851,6 +851,16 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
ImGui.TextColored(ImGuiColors.DalamudRed, "You need to install both Penumbra and Glamourer and keep them up to date to use Umbra.");
return false;
}
else if (NoSnapService.AnyLoaded)
{
IconText(FontAwesomeIcon.ExclamationTriangle, ImGuiColors.DalamudYellow);
ImGui.SameLine();
var cursorX = ImGui.GetCursorPosX();
ImGui.TextColored(ImGuiColors.DalamudYellow, "Synced player appearances will not apply until incompatible plugins are disabled:");
ImGui.SetCursorPosX(cursorX + 16.0f);
ImGui.TextColored(ImGuiColors.DalamudYellow, NoSnapService.ActivePlugins);
return false;
}
return true;
}