some minor fixes
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user