add lobby rating to home
add gametype (WIP) to home misc UI tweaks
This commit is contained in:
@ -3,6 +3,7 @@ using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Linq;
|
||||
using Data.Models.Client.Stats;
|
||||
|
||||
namespace WebfrontCore.Controllers
|
||||
{
|
||||
@ -39,7 +40,8 @@ namespace WebfrontCore.Controllers
|
||||
Name = p.Name,
|
||||
ClientId = p.ClientId,
|
||||
Level = p.Level.ToLocalizedLevelName(),
|
||||
LevelInt = (int)p.Level
|
||||
LevelInt = (int)p.Level,
|
||||
ZScore = p.GetAdditionalProperty<EFClientStatistics>(IW4MAdmin.Plugins.Stats.Helpers.StatManager.CLIENT_STATS_KEY)?.ZScore
|
||||
}).ToList(),
|
||||
ChatHistory = s.ChatHistory.ToList(),
|
||||
PlayerHistory = s.ClientHistory.ToArray(),
|
||||
|
@ -3,6 +3,7 @@ using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using Data.Models.Client.Stats;
|
||||
using static SharedLibraryCore.Server;
|
||||
|
||||
namespace WebfrontCore.ViewComponents
|
||||
@ -30,7 +31,8 @@ namespace WebfrontCore.ViewComponents
|
||||
ClientId = p.ClientId,
|
||||
Level = p.Level.ToLocalizedLevelName(),
|
||||
LevelInt = (int)p.Level,
|
||||
Tag = p.Tag
|
||||
Tag = p.Tag,
|
||||
ZScore = p.GetAdditionalProperty<EFClientStatistics>(IW4MAdmin.Plugins.Stats.Helpers.StatManager.CLIENT_STATS_KEY)?.ZScore
|
||||
}).ToList(),
|
||||
ChatHistory = s.ChatHistory.ToList(),
|
||||
Online = !s.Throttled,
|
||||
|
@ -22,7 +22,7 @@
|
||||
}
|
||||
</div>
|
||||
<!-- Name/Level Column -->
|
||||
<div class="w-75 d-block d-lg-inline-flex flex-column flex-fill text-center text-lg-left pb-3 pb-lg-0 pt-3 pt-lg-0 pl-3 pr-3 ml-auto mr-auto" style="overflow-wrap: anywhere">
|
||||
<div class="w-50 d-block d-lg-inline-flex flex-column flex-fill text-center text-lg-left pb-3 pb-lg-0 pt-3 pt-lg-0 pl-3 pr-3 ml-auto mr-auto" style="overflow-wrap: anywhere">
|
||||
<div class="mt-n2 flex-fill d-block d-lg-inline-flex">
|
||||
<div id="profile_name" class="client-name h1 mb-0">
|
||||
<color-code value="@Model.Name" allow="@ViewBag.EnableColorCodes"></color-code>
|
||||
|
@ -92,7 +92,7 @@
|
||||
</a>
|
||||
@if (ViewBag.Authorized)
|
||||
{
|
||||
<span class="oi oi-circle-x ml-1 profile-action align-baseline action-kick-button flex-column" data-action="kick" data-action-id="@Model.Players[i].ClientId" aria-hidden="true"></span>
|
||||
<span class="oi oi-circle-x profile-action align-baseline action-kick-button flex-column mt-0" data-action="kick" data-action-id="@Model.Players[i].ClientId" aria-hidden="true"></span>
|
||||
}
|
||||
<br />
|
||||
</div>
|
||||
|
@ -16,8 +16,26 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="text-center col-md-4">@Model.Map</div>
|
||||
<div class="text-center text-md-right col-md-4"><span class="server-clientcount">@Model.ClientCount</span>/<span class="server-maxclients">@Model.MaxClients</span></div>
|
||||
<div class="text-center col-md-4">
|
||||
<span>@Model.Map</span>
|
||||
@if (!string.IsNullOrEmpty(Model.GameType) && Model.GameType.Length > 1)
|
||||
{
|
||||
<span>–</span>
|
||||
<span>@Model.GameType.ToUpper()</span>
|
||||
}
|
||||
</div>
|
||||
<div class="text-center text-md-right col-md-4 d-flex justify-content-center justify-content-md-end flex-column-reverse flex-sm-row">
|
||||
@if (Model.LobbyZScore != null)
|
||||
{
|
||||
<div title="@ViewBag.Localization["WEBFRONT_HOME_RATING_DESC"]" class="cursor-help d-flex flex-row-reverse flex-md-row justify-content-center">
|
||||
<span>@(Model.LobbyZScore ?? 0)</span>
|
||||
<span class="oi oi-bolt align-self-center mr-1 ml-1"></span>
|
||||
</div>
|
||||
}
|
||||
<div>
|
||||
<span class="server-clientcount">@Model.ClientCount</span>/<span class="server-maxclients">@Model.MaxClients</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (ViewBag.Authorized)
|
||||
{
|
||||
@ -27,10 +45,10 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
<div id="server_clientactivity_@Model.ID" class="bg-dark row server-activity pt-2 pb-2">
|
||||
<div id="server_clientactivity_@Model.ID" class="bg-dark row server-activity @(Model.ClientCount > 0 ? "pt-2 pb-2" : "")">
|
||||
@await Html.PartialAsync("../Server/_ClientActivity", Model)
|
||||
</div>
|
||||
|
||||
<div class="row server-history mb-4">
|
||||
<div class="server-history-row" id="server_history_@Model.ID" data-serverid="@Model.ID" data-clienthistory='@Html.Raw(Json.Serialize(Model.PlayerHistory))' data-online="@Model.Online"></div>
|
||||
</div>
|
||||
</div>
|
@ -437,3 +437,7 @@ div.card {
|
||||
#hitlocation_container {
|
||||
background-color: #141414;
|
||||
}
|
||||
|
||||
.cursor-help {
|
||||
cursor: help;
|
||||
}
|
||||
|
Reference in New Issue
Block a user