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>())
|
@foreach (var social in Model.CommunityInformation.SocialAccounts ?? Array.Empty<SocialAccountConfiguration>())
|
||||||
{
|
{
|
||||||
<div>
|
<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))
|
@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))
|
else if (!string.IsNullOrWhiteSpace(social.IconUrl))
|
||||||
{
|
{
|
||||||
var url = Uri.TryCreate(social.IconUrl, UriKind.Absolute, out var parsedUrl)
|
var url = Uri.TryCreate(social.IconUrl, UriKind.Absolute, out var parsedUrl)
|
||||||
? parsedUrl.AbsoluteUri
|
? parsedUrl.AbsoluteUri
|
||||||
: $"images/community/{social.IconUrl}";
|
: $"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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,13 @@
|
|||||||
<color-code value="@Model.ServerName"></color-code>
|
<color-code value="@Model.ServerName"></color-code>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<table class="table table-sort mt-15"
|
@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-column="@(Model.OrderByKey ?? nameof(ClientScoreboardInfo.Score))"
|
||||||
data-sort-down="@Model.ShouldOrderDescending.ToString().ToLower()">
|
data-sort-down="@Model.ShouldOrderDescending.ToString().ToLower()">
|
||||||
<tr class="bg-dark-dm bg-white-lm d-none d-lg-table-row">
|
<tr class="bg-dark-dm bg-white-lm d-none d-lg-table-row">
|
||||||
@ -93,4 +99,5 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</table>
|
</table>
|
||||||
|
}
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
class="text-light align-self-center">
|
class="text-light align-self-center">
|
||||||
<i class="oi oi-spreadsheet ml-5 mr-5"></i>
|
<i class="oi oi-spreadsheet ml-5 mr-5"></i>
|
||||||
</a>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
<!-- second column -->
|
<!-- second column -->
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
{
|
{
|
||||||
if (match.IsInterpolation && match.MatchValue == "event")
|
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
|
else
|
||||||
|
@ -393,6 +393,8 @@ function renderPerformanceChart() {
|
|||||||
|
|
||||||
position: 'right',
|
position: 'right',
|
||||||
ticks: {
|
ticks: {
|
||||||
|
precision: 0,
|
||||||
|
stepSize: 3,
|
||||||
callback: function (value, index, values) {
|
callback: function (value, index, values) {
|
||||||
if (index === values.length - 1) {
|
if (index === values.length - 1) {
|
||||||
return min;
|
return min;
|
||||||
|
@ -47,7 +47,7 @@ function getStatsChart(id) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const options = {
|
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,
|
responsive: true,
|
||||||
maintainAspectRatio: false,
|
maintainAspectRatio: false,
|
||||||
legend: false,
|
legend: false,
|
||||||
@ -69,7 +69,7 @@ function getStatsChart(id) {
|
|||||||
elements: {
|
elements: {
|
||||||
line: {
|
line: {
|
||||||
fill: false,
|
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
|
borderWidth: 2
|
||||||
},
|
},
|
||||||
point: {
|
point: {
|
||||||
@ -87,6 +87,8 @@ function getStatsChart(id) {
|
|||||||
|
|
||||||
position: 'right',
|
position: 'right',
|
||||||
ticks: {
|
ticks: {
|
||||||
|
precision: 0,
|
||||||
|
stepSize: 3,
|
||||||
callback: function (value, index, values) {
|
callback: function (value, index, values) {
|
||||||
if (index === values.length - 1) {
|
if (index === values.length - 1) {
|
||||||
return min;
|
return min;
|
||||||
@ -127,9 +129,9 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on("loaderFinished", function (event, response) {
|
$(document).on('loaderFinished', function (event, response) {
|
||||||
const ids = $.map($(response).find('.client-rating-graph'), function (elem) { return $(elem).attr('id'); });
|
const ids = $.map($(response).find('.client-rating-graph'), function (elem) { return $(elem).children('canvas').attr('id'); });
|
||||||
ids.forEach(function (item, index) {
|
ids.forEach(function (item, index) {
|
||||||
getStatsChart($(item).children('canvas').attr('id'));
|
getStatsChart(item);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user