From 9e17bcc38f099e025f78f0d43a018383e03ffde5 Mon Sep 17 00:00:00 2001 From: RaidMax Date: Sat, 9 Jul 2022 16:32:23 -0500 Subject: [PATCH] improve ban management display and additional translations --- WebfrontCore/Views/Admin/_BanEntries.cshtml | 44 ++++++++++++------- .../Views/Client/Profile/Index.cshtml | 6 +-- WebfrontCore/Views/Penalty/_Penalty.cshtml | 2 +- WebfrontCore/Views/Server/_Scoreboard.cshtml | 2 +- WebfrontCore/wwwroot/js/action.js | 2 +- 5 files changed, 35 insertions(+), 21 deletions(-) diff --git a/WebfrontCore/Views/Admin/_BanEntries.cshtml b/WebfrontCore/Views/Admin/_BanEntries.cshtml index 9d9b03baf..2a1b71f37 100644 --- a/WebfrontCore/Views/Admin/_BanEntries.cshtml +++ b/WebfrontCore/Views/Admin/_BanEntries.cshtml @@ -10,12 +10,16 @@
-
- @ban.ClientName -
-
-
@Utilities.MakeAbbreviation(ViewBag.Localization[$"GAME_{ban.Game}"])
+
+
+ + + +
+
@Utilities.MakeAbbreviation(ViewBag.Localization[$"GAME_{ban.Game}"])
+
+
@ban.NetworkId.ToString("X")
@@ -25,8 +29,11 @@
@if (ban.AttachedPenalty is not null) { -
@ban.AttachedPenalty.Offense.CapClientName(30)
+
+ +
@ban.AttachedPenalty.DateTime.ToStandardFormat()
+
@ViewBag.Localization["WEBFRONT_BAN_MGMT_ACTION_UNBAN"]
} else @@ -42,15 +49,20 @@ @foreach (var associatedEntity in ban.AssociatedPenalties) { -
-
- -
- @associatedEntity.OffenderInfo.ClientName +
+
+
+ +
+ + + +
+ +
+
+
@Utilities.MakeAbbreviation(ViewBag.Localization[$"GAME_{ban.Game}"])
-
-
-
@Utilities.MakeAbbreviation(ViewBag.Localization[$"GAME_{ban.Game}"])

@@ -60,7 +72,9 @@
@associatedEntity.OffenderInfo.IPAddress.ConvertIPtoString()

-
@associatedEntity.Offense.CapClientName(30)
+
+ +
@associatedEntity.DateTime.ToStandardFormat()
@ViewBag.Localization["WEBFRONT_BAN_MGMT_ACTION_UNBAN"]
diff --git a/WebfrontCore/Views/Client/Profile/Index.cshtml b/WebfrontCore/Views/Client/Profile/Index.cshtml index adb7e66c7..b597dc393 100644 --- a/WebfrontCore/Views/Client/Profile/Index.cshtml +++ b/WebfrontCore/Views/Client/Profile/Index.cshtml @@ -82,7 +82,7 @@
- + @@ -115,7 +115,7 @@
- @Model.Level +
@@ -164,7 +164,7 @@ @if (Model.IPs.Count > 15) { - @((ViewBag.Localization["WEBFRONT_PROFILE_ALIAS_COUNT_MORE_FORMAT"] as string).FormatExt(Model.Aliases.Count - 15)) + @((ViewBag.Localization["WEBFRONT_PROFILE_ALIAS_COUNT_MORE_FORMAT"] as string).FormatExt(Model.IPs.Count - 15)) }
diff --git a/WebfrontCore/Views/Penalty/_Penalty.cshtml b/WebfrontCore/Views/Penalty/_Penalty.cshtml index 5f6f6c704..01799f0bd 100644 --- a/WebfrontCore/Views/Penalty/_Penalty.cshtml +++ b/WebfrontCore/Views/Penalty/_Penalty.cshtml @@ -55,7 +55,7 @@
- @Model.PenaltyType + @ViewBag.Localization[$"WEBFRONT_PENALTY_{Model.PenaltyType.ToString().ToUpper()}"]
diff --git a/WebfrontCore/Views/Server/_Scoreboard.cshtml b/WebfrontCore/Views/Server/_Scoreboard.cshtml index d0e097d2e..7fa39f915 100644 --- a/WebfrontCore/Views/Server/_Scoreboard.cshtml +++ b/WebfrontCore/Views/Server/_Scoreboard.cshtml @@ -30,7 +30,7 @@ }

- Scoreboard + @ViewBag.Localization["WEBFRONT_TITLE_SCOREBOARD"]

diff --git a/WebfrontCore/wwwroot/js/action.js b/WebfrontCore/wwwroot/js/action.js index 17138d583..63c74018b 100644 --- a/WebfrontCore/wwwroot/js/action.js +++ b/WebfrontCore/wwwroot/js/action.js @@ -26,7 +26,7 @@ function getUrlParameter(sParam) { sParameterName = sURLVariables[i].split('='); if (sParameterName[0] === sParam) { - return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]); + return sParameterName[1] === undefined ? true : decodeURIComponent(unescape(sParameterName[1])); } } return false;