diff --git a/MareSynchronos/UI/Components/DrawUserPair.cs b/MareSynchronos/UI/Components/DrawUserPair.cs index 44c78a1..2cf3be8 100644 --- a/MareSynchronos/UI/Components/DrawUserPair.cs +++ b/MareSynchronos/UI/Components/DrawUserPair.cs @@ -199,8 +199,10 @@ public class DrawUserPair ImGui.AlignTextToFramePadding(); using var _ = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed); using var font = ImRaii.PushFont(UiBuilder.IconFont); - ImGui.TextUnformatted(_pair.IndividualPairStatus == API.Data.Enum.IndividualPairStatus.Bidirectional - ? FontAwesomeIcon.User.ToIconString() : FontAwesomeIcon.Users.ToIconString()); + ImGui.TextUnformatted(_pair.IndividualPairStatus == API.Data.Enum.IndividualPairStatus.OneSided + ? FontAwesomeIcon.ArrowsLeftRight.ToIconString() + : (_pair.IndividualPairStatus == API.Data.Enum.IndividualPairStatus.Bidirectional + ? FontAwesomeIcon.User.ToIconString() : FontAwesomeIcon.Users.ToIconString())); userPairText = _pair.UserData.AliasOrUID + " is offline"; } else @@ -208,6 +210,7 @@ public class DrawUserPair ImGui.AlignTextToFramePadding(); using var font = ImRaii.PushFont(UiBuilder.IconFont); + using var _ = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.HealerGreen); ImGui.TextUnformatted(_pair.IndividualPairStatus == API.Data.Enum.IndividualPairStatus.Bidirectional ? FontAwesomeIcon.User.ToIconString() : FontAwesomeIcon.Users.ToIconString()); userPairText = _pair.UserData.AliasOrUID + " is online"; diff --git a/MareSynchronos/WebAPI/SignalR/ApiController.cs b/MareSynchronos/WebAPI/SignalR/ApiController.cs index 6b8937b..a0df76e 100644 --- a/MareSynchronos/WebAPI/SignalR/ApiController.cs +++ b/MareSynchronos/WebAPI/SignalR/ApiController.cs @@ -215,7 +215,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM catch (InvalidOperationException ex) { Logger.LogWarning(ex, "InvalidOperationException on connection"); - ServerState = ServerState.Disconnected; + await StopConnection(ServerState.Disconnected).ConfigureAwait(false); return; } catch (Exception ex) diff --git a/MareSynchronos/WebAPI/SignalR/TokenProvider.cs b/MareSynchronos/WebAPI/SignalR/TokenProvider.cs index 5cd24e9..825c111 100644 --- a/MareSynchronos/WebAPI/SignalR/TokenProvider.cs +++ b/MareSynchronos/WebAPI/SignalR/TokenProvider.cs @@ -106,11 +106,10 @@ public sealed class TokenProvider : IDisposable, IMediatorSubscriber if (jwtToken.ValidTo.Subtract(TimeSpan.FromHours(6).Add(TimeSpan.FromMinutes(1))) > DateTime.UtcNow) { _tokenCache.TryRemove(CurrentIdentifier, out _); - Mediator.Publish(new NotificationMessage("Invalid timezone", "The time zone of your computer is invalid. " + + Mediator.Publish(new NotificationMessage("Invalid system clock", "The clock of your computer is invalid. " + "Mare will not function properly if the time zone is not set correctly. " + - "Please set your computers time zone correctly and keep it synchronized with the internet.", + "Please set your computers time zone correctly and keep your clock synchronized with the internet.", Dalamud.Interface.Internal.Notifications.NotificationType.Error)); - Mediator.Publish(new DisconnectedMessage()); throw new InvalidOperationException($"JwtToken is behind DateTime.UtcNow, DateTime.UtcNow is possibly wrong. DateTime.UtcNow is {DateTime.UtcNow}, JwtToken.ValidTo is {jwtToken.ValidTo}"); } return response;