some minor fixes
This commit is contained in:
@@ -199,8 +199,10 @@ public class DrawUserPair
|
|||||||
ImGui.AlignTextToFramePadding();
|
ImGui.AlignTextToFramePadding();
|
||||||
using var _ = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
|
using var _ = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
|
||||||
using var font = ImRaii.PushFont(UiBuilder.IconFont);
|
using var font = ImRaii.PushFont(UiBuilder.IconFont);
|
||||||
ImGui.TextUnformatted(_pair.IndividualPairStatus == API.Data.Enum.IndividualPairStatus.Bidirectional
|
ImGui.TextUnformatted(_pair.IndividualPairStatus == API.Data.Enum.IndividualPairStatus.OneSided
|
||||||
? FontAwesomeIcon.User.ToIconString() : FontAwesomeIcon.Users.ToIconString());
|
? FontAwesomeIcon.ArrowsLeftRight.ToIconString()
|
||||||
|
: (_pair.IndividualPairStatus == API.Data.Enum.IndividualPairStatus.Bidirectional
|
||||||
|
? FontAwesomeIcon.User.ToIconString() : FontAwesomeIcon.Users.ToIconString()));
|
||||||
userPairText = _pair.UserData.AliasOrUID + " is offline";
|
userPairText = _pair.UserData.AliasOrUID + " is offline";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -208,6 +210,7 @@ public class DrawUserPair
|
|||||||
ImGui.AlignTextToFramePadding();
|
ImGui.AlignTextToFramePadding();
|
||||||
|
|
||||||
using var font = ImRaii.PushFont(UiBuilder.IconFont);
|
using var font = ImRaii.PushFont(UiBuilder.IconFont);
|
||||||
|
using var _ = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.HealerGreen);
|
||||||
ImGui.TextUnformatted(_pair.IndividualPairStatus == API.Data.Enum.IndividualPairStatus.Bidirectional
|
ImGui.TextUnformatted(_pair.IndividualPairStatus == API.Data.Enum.IndividualPairStatus.Bidirectional
|
||||||
? FontAwesomeIcon.User.ToIconString() : FontAwesomeIcon.Users.ToIconString());
|
? FontAwesomeIcon.User.ToIconString() : FontAwesomeIcon.Users.ToIconString());
|
||||||
userPairText = _pair.UserData.AliasOrUID + " is online";
|
userPairText = _pair.UserData.AliasOrUID + " is online";
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
|
|||||||
catch (InvalidOperationException ex)
|
catch (InvalidOperationException ex)
|
||||||
{
|
{
|
||||||
Logger.LogWarning(ex, "InvalidOperationException on connection");
|
Logger.LogWarning(ex, "InvalidOperationException on connection");
|
||||||
ServerState = ServerState.Disconnected;
|
await StopConnection(ServerState.Disconnected).ConfigureAwait(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
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)
|
if (jwtToken.ValidTo.Subtract(TimeSpan.FromHours(6).Add(TimeSpan.FromMinutes(1))) > DateTime.UtcNow)
|
||||||
{
|
{
|
||||||
_tokenCache.TryRemove(CurrentIdentifier, out _);
|
_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. " +
|
"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));
|
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}");
|
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;
|
return response;
|
||||||
|
|||||||
Reference in New Issue
Block a user