IW4M-Admin/WebfrontCore/Views/Client/_PenaltyInfo.cshtml

24 lines
944 B
Plaintext
Raw Normal View History

@model IEnumerable<Data.Models.Client.Stats.EFACSnapshot>
@{
Layout = null;
}
2022-04-19 19:43:58 -04:00
<div class="penalty-info-context bg-dark-dm bg-light-lm p-20 mt-5 mb-5 rounded-top rounded-bottom border-top border-bottom">
@foreach (var snapshot in Model)
{
<!-- this is not ideal, but I didn't want to manually write out all the properties-->
var snapProperties = Model.First().GetType().GetProperties().OrderBy(prop => prop.Name);
foreach (var prop in snapProperties)
{
@if ((prop.Name.EndsWith("Id") && prop.Name != "WeaponId" || prop.Name == "Server") || new[] {"Active", "Client", "PredictedViewAngles"}.Contains(prop.Name))
{
2019-09-27 16:53:52 -04:00
continue;
}
2019-09-27 16:53:52 -04:00
2022-04-19 19:43:58 -04:00
<span class="text-light-dm text-dark-lm">@prop.Name </span>
<span>&mdash; @prop.GetValue(snapshot)?.ToString()?.StripColors()</span><br/>
}
2022-04-19 19:43:58 -04:00
<hr class="mt-10 mb-10"/>
}
2022-04-19 19:43:58 -04:00
</div>