diff --git a/WebfrontCore/Views/About/Index.cshtml b/WebfrontCore/Views/About/Index.cshtml index 89bf21a30..62dbb19a3 100644 --- a/WebfrontCore/Views/About/Index.cshtml +++ b/WebfrontCore/Views/About/Index.cshtml @@ -35,19 +35,19 @@ @foreach (var social in Model.CommunityInformation.SocialAccounts ?? Array.Empty()) {
- + @if (!string.IsNullOrWhiteSpace(social.IconId)) { - + } else if (!string.IsNullOrWhiteSpace(social.IconUrl)) { var url = Uri.TryCreate(social.IconUrl, UriKind.Absolute, out var parsedUrl) ? parsedUrl.AbsoluteUri : $"images/community/{social.IconUrl}"; - @social.Title + @social.Title } - @social.Title +
@social.Title
} diff --git a/WebfrontCore/Views/Server/_Scoreboard.cshtml b/WebfrontCore/Views/Server/_Scoreboard.cshtml index 7fa39f915..153310d72 100644 --- a/WebfrontCore/Views/Server/_Scoreboard.cshtml +++ b/WebfrontCore/Views/Server/_Scoreboard.cshtml @@ -30,67 +30,74 @@ }

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

- - - - - - - - - - - - @foreach (var client in Model.ShouldOrderDescending ? Model.ClientInfo.OrderByDescending(OrderByFunc) : Model.ClientInfo.OrderBy(OrderByFunc)) - { - - - - - - - - - - +@if (!Model.ClientInfo.Any()) +{ +
@ViewBag.Localization["WEBFRONT_SCOREBOARD_NO_PLAYERS"]
+} +else +{ +
@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_PLAYER"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.ClientName)))@ViewBag.Localization["WEBFRONT_ADV_STATS_SCORE"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.Score)))@ViewBag.Localization["WEBFRONT_ADV_STATS_KILLS"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.Kills)))@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_DEATHS"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.Deaths)))@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_RATIO"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.Kdr)))@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_SPM"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.ScorePerMinute)))@ViewBag.Localization["WEBFRONT_ADV_STATS_ZSCORE"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.ZScore)))@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_PING"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.Ping)))
- - - - @client.Score@(client.Kills ?? 0)@(client.Deaths ?? 0)@Math.Round(client.Kdr ?? 0, 2)@Math.Round(client.ScorePerMinute ?? 0)@(client.ZScore is null or 0 ? "--" : Math.Round(client.ZScore.Value, 2).ToString(CultureInfo.CurrentCulture))@client.Ping
+ + + + + + + + + + @foreach (var client in Model.ShouldOrderDescending ? Model.ClientInfo.OrderByDescending(OrderByFunc) : Model.ClientInfo.OrderBy(OrderByFunc)) + { + + + + + + + + + + + - - + + - - - } -
@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_PLAYER"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.ClientName)))@ViewBag.Localization["WEBFRONT_ADV_STATS_SCORE"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.Score)))@ViewBag.Localization["WEBFRONT_ADV_STATS_KILLS"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.Kills)))@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_DEATHS"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.Deaths)))@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_RATIO"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.Kdr)))@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_SPM"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.ScorePerMinute)))@ViewBag.Localization["WEBFRONT_ADV_STATS_ZSCORE"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.ZScore)))@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_PING"]@Html.Raw(GetColumnSortDisplay(nameof(ClientScoreboardInfo.Ping)))
+ + + + @client.Score@(client.Kills ?? 0)@(client.Deaths ?? 0)@Math.Round(client.Kdr ?? 0, 2)@Math.Round(client.ScorePerMinute ?? 0)@(client.ZScore is null or 0 ? "--" : Math.Round(client.ZScore.Value, 2).ToString(CultureInfo.CurrentCulture))@client.Ping
-
@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_PLAYER"]
-
@ViewBag.Localization["WEBFRONT_ADV_STATS_SCORE"]
-
@ViewBag.Localization["WEBFRONT_ADV_STATS_KILLS"]
-
@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_DEATHS"]
-
@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_RATIO"]
-
@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_SPM"]
-
@ViewBag.Localization["WEBFRONT_ADV_STATS_ZSCORE"]
-
@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_PING"]
-
+
@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_PLAYER"]
+
@ViewBag.Localization["WEBFRONT_ADV_STATS_SCORE"]
+
@ViewBag.Localization["WEBFRONT_ADV_STATS_KILLS"]
+
@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_DEATHS"]
+
@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_RATIO"]
+
@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_SPM"]
+
@ViewBag.Localization["WEBFRONT_ADV_STATS_ZSCORE"]
+
@ViewBag.Localization["WEBFRONT_SCOREBOARD_TABLE_PING"]
+
- - - -
@client.Score
-
@(client.Kills ?? 0)
-
@(client.Deaths ?? 0)
-
@Math.Round(client.Kdr ?? 0, 2)
-
@Math.Round(client.ScorePerMinute ?? 0)
-
@(client.ZScore is null or 0 ? "--" : Math.Round(client.ZScore.Value, 2).ToString(CultureInfo.CurrentCulture))
-
@client.Ping
-
+ + + + +
@client.Score
+
@(client.Kills ?? 0)
+
@(client.Deaths ?? 0)
+
@Math.Round(client.Kdr ?? 0, 2)
+
@Math.Round(client.ScorePerMinute ?? 0)
+
@(client.ZScore is null or 0 ? "--" : Math.Round(client.ZScore.Value, 2).ToString(CultureInfo.CurrentCulture))
+
@client.Ping
+ + + } + +} diff --git a/WebfrontCore/Views/Server/_Server.cshtml b/WebfrontCore/Views/Server/_Server.cshtml index 669831b3d..b6e5cc26c 100644 --- a/WebfrontCore/Views/Server/_Server.cshtml +++ b/WebfrontCore/Views/Server/_Server.cshtml @@ -42,7 +42,7 @@ class="text-light align-self-center"> - @Utilities.MakeAbbreviation(ViewBag.Localization[$"GAME_{Model.Game}"]) + @Utilities.MakeAbbreviation(ViewBag.Localization[$"GAME_{Model.Game}"]) diff --git a/WebfrontCore/Views/Shared/Components/ProfileMetaList/_List.cshtml b/WebfrontCore/Views/Shared/Components/ProfileMetaList/_List.cshtml index c0791048e..ecab33ce4 100644 --- a/WebfrontCore/Views/Shared/Components/ProfileMetaList/_List.cshtml +++ b/WebfrontCore/Views/Shared/Components/ProfileMetaList/_List.cshtml @@ -62,7 +62,7 @@ { if (match.IsInterpolation && match.MatchValue == "event") { - @meta.When.ToStandardFormat() + @meta.When.ToStandardFormat() } else diff --git a/WebfrontCore/wwwroot/js/advanced_stats.js b/WebfrontCore/wwwroot/js/advanced_stats.js index 744453a04..9358bd65e 100644 --- a/WebfrontCore/wwwroot/js/advanced_stats.js +++ b/WebfrontCore/wwwroot/js/advanced_stats.js @@ -393,6 +393,8 @@ function renderPerformanceChart() { position: 'right', ticks: { + precision: 0, + stepSize: 3, callback: function (value, index, values) { if (index === values.length - 1) { return min; diff --git a/WebfrontCore/wwwroot/js/stats.js b/WebfrontCore/wwwroot/js/stats.js index 4e66526fb..eba781a41 100644 --- a/WebfrontCore/wwwroot/js/stats.js +++ b/WebfrontCore/wwwroot/js/stats.js @@ -47,7 +47,7 @@ function getStatsChart(id) { }; const options = { - defaultFontFamily: '-apple-system, BlinkMacSystemFont, "Open Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', + defaultFontFamily: "-apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'", responsive: true, maintainAspectRatio: false, legend: false, @@ -69,7 +69,7 @@ function getStatsChart(id) { elements: { line: { fill: false, - borderColor: halfmoon.getPreferredMode() === "light-mode" ? 'rgba(0, 0, 0, 0.85)' : 'rgba(255, 255, 255, 0.75)', + borderColor: halfmoon.getPreferredMode() === 'light-mode' ? 'rgba(0, 0, 0, 0.85)' : 'rgba(255, 255, 255, 0.75)', borderWidth: 2 }, point: { @@ -87,6 +87,8 @@ function getStatsChart(id) { position: 'right', ticks: { + precision: 0, + stepSize: 3, callback: function (value, index, values) { if (index === values.length - 1) { return min; @@ -127,9 +129,9 @@ $(document).ready(function () { }); }); -$(document).on("loaderFinished", function (event, response) { - const ids = $.map($(response).find('.client-rating-graph'), function (elem) { return $(elem).attr('id'); }); +$(document).on('loaderFinished', function (event, response) { + const ids = $.map($(response).find('.client-rating-graph'), function (elem) { return $(elem).children('canvas').attr('id'); }); ids.forEach(function (item, index) { - getStatsChart($(item).children('canvas').attr('id')); + getStatsChart(item); }); });