Skip to content

Commit

Permalink
fix edge case for temp mute penalties with no expiration
Browse files Browse the repository at this point in the history
  • Loading branch information
RaidMax committed Jan 24, 2023
1 parent b1a43e0 commit 7720e5e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions WebfrontCore/Views/Client/Profile/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@
<span class="text-light-dm font-weight-lighter">@(ViewBag.Authorized ? !string.IsNullOrEmpty(Model.ActivePenalty.AutomatedOffense) && Model.ActivePenalty.Type != EFPenalty.PenaltyType.Warning ? Utilities.FormatExt(ViewBag.Localization["WEBFRONT_PROFILE_ANTICHEAT_DETECTION"], Model.ActivePenalty.AutomatedOffense) : Model.ActivePenalty.Offense.StripColors() : Model.ActivePenalty.Offense.StripColors())</span>
break;
case "time":
<span class="text-light-dm font-weight-lighter">
@((Model.ActivePenalty.Expires.Value - DateTime.UtcNow).HumanizeForCurrentCulture())
</span>
if (Model.ActivePenalty.Expires.HasValue)
{
<span class="text-light-dm font-weight-lighter">
@((Model.ActivePenalty.Expires.Value - DateTime.UtcNow).HumanizeForCurrentCulture())
</span>
}
break;
default:
<span>@result.MatchValue</span>
Expand Down

0 comments on commit 7720e5e

Please sign in to comment.