add level color coding to target on penalty list for issue #265
This commit is contained in:
parent
407ce2bc8f
commit
3b83729457
@ -7,6 +7,7 @@ namespace SharedLibraryCore.Dtos
|
|||||||
public class PenaltyInfo : SharedInfo
|
public class PenaltyInfo : SharedInfo
|
||||||
{
|
{
|
||||||
public string OffenderName { get; set; }
|
public string OffenderName { get; set; }
|
||||||
|
public Permission OffenderLevel { get; set; }
|
||||||
public int OffenderId { get; set; }
|
public int OffenderId { get; set; }
|
||||||
public ulong OffenderNetworkId { get; set; }
|
public ulong OffenderNetworkId { get; set; }
|
||||||
public string OffenderIPAddress { get; set; }
|
public string OffenderIPAddress { get; set; }
|
||||||
@ -38,4 +39,4 @@ namespace SharedLibraryCore.Dtos
|
|||||||
public string AdditionalPenaltyInformation =>
|
public string AdditionalPenaltyInformation =>
|
||||||
$"{(!string.IsNullOrEmpty(AutomatedOffense) ? $" ({AutomatedOffense})" : "")}{(IsEvade ? $" ({Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_PENALTY_EVADE"]})" : "")}";
|
$"{(!string.IsNullOrEmpty(AutomatedOffense) ? $" ({AutomatedOffense})" : "")}{(IsEvade ? $" ({Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_PENALTY_EVADE"]})" : "")}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,6 +117,7 @@ namespace SharedLibraryCore.Services
|
|||||||
AutomatedOffense = _penalty.AutomatedOffense,
|
AutomatedOffense = _penalty.AutomatedOffense,
|
||||||
OffenderId = _penalty.OffenderId,
|
OffenderId = _penalty.OffenderId,
|
||||||
OffenderName = _penalty.Offender.CurrentAlias.Name,
|
OffenderName = _penalty.Offender.CurrentAlias.Name,
|
||||||
|
OffenderLevel = _penalty.Offender.Level,
|
||||||
PunisherId = _penalty.PunisherId,
|
PunisherId = _penalty.PunisherId,
|
||||||
PunisherName = _penalty.Punisher.CurrentAlias.Name,
|
PunisherName = _penalty.Punisher.CurrentAlias.Name,
|
||||||
PunisherLevel = _penalty.Punisher.Level,
|
PunisherLevel = _penalty.Punisher.Level,
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
var loc = Utilities.CurrentLocalization.LocalizationIndex;
|
var loc = Utilities.CurrentLocalization.LocalizationIndex;
|
||||||
|
|
||||||
var canSeeLevel = (ViewBag.PermissionsSet as IEnumerable<string>).HasPermission(WebfrontEntity.ClientLevel, WebfrontPermission.Read) && Model.PunisherLevel != 0;
|
var canSeeLevel = (ViewBag.PermissionsSet as IEnumerable<string>).HasPermission(WebfrontEntity.ClientLevel, WebfrontPermission.Read) && Model.PunisherLevel != 0;
|
||||||
var punisherLevelClass = canSeeLevel ? $"level-color-{(int)Model.PunisherLevel}" : "text-light-dm text-dark-lm";
|
var punisherLevelClass = canSeeLevel ? $"level-color-{Model.PunisherLevel.ToString().ToLower()}" : "text-light-dm text-dark-lm";
|
||||||
|
var offenderLevelClass = canSeeLevel ? $"level-color-{Model.OffenderLevel.ToString().ToLower()}" : "text-light-dm text-dark-lm";
|
||||||
}
|
}
|
||||||
|
|
||||||
@using WebfrontCore.Permissions
|
@using WebfrontCore.Permissions
|
||||||
@ -12,7 +13,7 @@
|
|||||||
<!-- desktop -->
|
<!-- desktop -->
|
||||||
<tr class="d-none d-lg-table-row">
|
<tr class="d-none d-lg-table-row">
|
||||||
<td colspan="20%">
|
<td colspan="20%">
|
||||||
<a asp-controller="Client" asp-action="Profile" asp-route-id="@Model.OffenderId" class="link-inverse">
|
<a asp-controller="Client" asp-action="Profile" asp-route-id="@Model.OffenderId" class="@offenderLevelClass">
|
||||||
<color-code value="@Model.OffenderName"></color-code>
|
<color-code value="@Model.OffenderName"></color-code>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user