misc webfront tweaks
This commit is contained in:
parent
540cf7489d
commit
f43f7b5040
@ -35,19 +35,19 @@
|
||||
@foreach (var social in Model.CommunityInformation.SocialAccounts ?? Array.Empty<SocialAccountConfiguration>())
|
||||
{
|
||||
<div>
|
||||
<a href="@social.Url" target="_blank" title="@social.Title">
|
||||
<a href="@social.Url" target="_blank" title="@social.Title" class="d-flex no-decoration">
|
||||
@if (!string.IsNullOrWhiteSpace(social.IconId))
|
||||
{
|
||||
<span class="oi @social.IconId"></span>
|
||||
<i class="oi @social.IconId mr-5" style="width: 1.6rem;"></i>
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(social.IconUrl))
|
||||
{
|
||||
var url = Uri.TryCreate(social.IconUrl, UriKind.Absolute, out var parsedUrl)
|
||||
? parsedUrl.AbsoluteUri
|
||||
: $"images/community/{social.IconUrl}";
|
||||
<img class="img-fluid" style="max-width: 1rem; fill: white" src="@url" alt="@social.Title"/>
|
||||
<img class="img-fluid mr-5" style="width: 1.6rem; fill: white" src="@url" alt="@social.Title"/>
|
||||
}
|
||||
<span class="ml-1">@social.Title</span>
|
||||
<div class="ml-1">@social.Title</div>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
|
@ -36,6 +36,12 @@
|
||||
<color-code value="@Model.ServerName"></color-code>
|
||||
</span>
|
||||
|
||||
@if (!Model.ClientInfo.Any())
|
||||
{
|
||||
<div class="mt-20">@ViewBag.Localization["WEBFRONT_SCOREBOARD_NO_PLAYERS"]</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table table-sort mt-15"
|
||||
data-sort-column="@(Model.OrderByKey ?? nameof(ClientScoreboardInfo.Score))"
|
||||
data-sort-down="@Model.ShouldOrderDescending.ToString().ToLower()">
|
||||
@ -94,3 +100,4 @@
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
}
|
||||
|
@ -42,7 +42,7 @@
|
||||
class="text-light align-self-center">
|
||||
<i class="oi oi-spreadsheet ml-5 mr-5"></i>
|
||||
</a>
|
||||
<span class="ml-5 mr-5 text-light badge font-weight-light" data-toggle="tooltip" data-title="@ViewBag.Localization[$"GAME_{Model.Game}"]">@Utilities.MakeAbbreviation(ViewBag.Localization[$"GAME_{Model.Game}"])</span>
|
||||
<span class="ml-5 mr-5 text-light-dm text-primary-lm badge font-weight-light" data-toggle="tooltip" data-title="@ViewBag.Localization[$"GAME_{Model.Game}"]">@Utilities.MakeAbbreviation(ViewBag.Localization[$"GAME_{Model.Game}"])</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- second column -->
|
||||
|
@ -62,7 +62,7 @@
|
||||
{
|
||||
if (match.IsInterpolation && match.MatchValue == "event")
|
||||
{
|
||||
<span class="text-light">@meta.When.ToStandardFormat()</span>
|
||||
<span class="text-light-dm text-dark-lm">@meta.When.ToStandardFormat()</span>
|
||||
}
|
||||
|
||||
else
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user