2019-04-06 22:48:49 -04:00
|
|
|
@model SharedLibraryCore.Dtos.ServerInfo
|
2018-02-21 20:29:23 -05:00
|
|
|
@{
|
|
|
|
Layout = null;
|
2022-03-29 17:42:53 -04:00
|
|
|
|
|
|
|
string GetMapName(string mapCode)
|
|
|
|
{
|
|
|
|
if (ViewBag.Maps?.Count == 0)
|
|
|
|
{
|
|
|
|
return mapCode;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (ViewBag.Maps as List<Map>)?.FirstOrDefault(map => map.Name == mapCode)?.Alias ?? mapCode;
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach (var snapshot in Model.ClientHistory.ClientCounts)
|
|
|
|
{
|
|
|
|
snapshot.MapAlias = GetMapName(snapshot.Map);
|
|
|
|
}
|
2018-02-21 20:29:23 -05:00
|
|
|
}
|
|
|
|
|
2022-04-19 19:43:58 -04:00
|
|
|
<div class="card mt-20 mb-20 ml-0 mr-0 p-0">
|
|
|
|
<div class="p-5 pl-10 pr-10 bg-primary rounded-top d-flex flex-column flex-md-row flex-wrap justify-content-between text-light" id="server_header_@Model.ID">
|
|
|
|
<div class="d-flex align-self-center flex-column-reverse flex-md-row">
|
|
|
|
<div class="ml-5 mr-5 text-center">
|
|
|
|
<color-code value="@Model.Name"></color-code>
|
|
|
|
</div>
|
|
|
|
<div class="d-flex justify-content-center">
|
|
|
|
<!-- connect button -->
|
|
|
|
<a href="@Model.ConnectProtocolUrl" class="text-light align-self-center" title="@Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_HOME_JOIN_DESC"]">
|
|
|
|
<i class="oi oi-play-circle ml-5 mr-5"></i>
|
|
|
|
<span class="server-header-ip-address" style="display:none;">@(Model.ExternalIPAddress):@(Model.Port)</span>
|
|
|
|
</a>
|
|
|
|
<has-permission entity="AdminMenu" required-permission="Update">
|
|
|
|
<!-- send message button -->
|
|
|
|
<a href="#actionModal" class="profile-action text-light align-self-center" data-action="chat" data-action-id="@Model.ID">
|
|
|
|
<i class="oi oi-chat ml-5 mr-5"></i>
|
|
|
|
</a>
|
|
|
|
</has-permission>
|
|
|
|
<!-- scoreboard button -->
|
|
|
|
<a asp-controller="Server" asp-action="Scoreboard" asp-route-serverId="@Model.Endpoint" title="@ViewBag.Localization["WEBFRONT_TITLE_SCOREBOARD"]"
|
|
|
|
class="text-light align-self-center">
|
|
|
|
<i class="oi oi-spreadsheet ml-5 mr-5"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="align-self-center">
|
|
|
|
<span>@Model.Map</span>
|
|
|
|
@if (!string.IsNullOrEmpty(Model.GameType) && Model.GameType.Length > 1)
|
|
|
|
{
|
|
|
|
<span>–</span>
|
|
|
|
<span>@Model.GameType</span>
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
<div class="align-self-center d-flex flex-column flex-md-row">
|
|
|
|
@if (Model.LobbyZScore != null)
|
|
|
|
{
|
|
|
|
<div data-toggle="tooltip" data-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" style="margin-right: 2px; margin-left: 2px"></span>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
<div class="mr-5 ml-5 align-self-center">
|
|
|
|
<span class="server-clientcount">@Model.ClientCount</span>/<span class="server-maxclients">@Model.MaxClients</span>
|
2021-06-30 10:57:07 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-07-13 21:45:25 -04:00
|
|
|
|
2022-04-19 19:43:58 -04:00
|
|
|
<div id="server_clientactivity_@Model.ID" class="bg-dark-dm bg-light-lm server-activity">
|
|
|
|
<partial name="../Server/_ClientActivity" for="@Model"/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@if (Model.Players.Any())
|
2019-07-13 21:45:25 -04:00
|
|
|
{
|
2022-04-19 19:43:58 -04:00
|
|
|
<div class="ml-15 mr-15">
|
|
|
|
<hr/>
|
2019-07-13 21:45:25 -04:00
|
|
|
</div>
|
|
|
|
}
|
2018-02-21 20:29:23 -05:00
|
|
|
|
2022-04-19 19:43:58 -04:00
|
|
|
<div class="server-history">
|
|
|
|
<div class="server-history-row m-auto bg-dark-dm bg-light-lm rounded-bottom" style="position:relative; width: 100%" id="server_history_@Model.ID" data-serverid="@Model.ID"
|
|
|
|
data-clienthistory='@Html.Raw(Json.Serialize(Model.ClientHistory))'
|
|
|
|
data-clienthistory-ex='@Html.Raw(Json.Serialize(Model.ClientHistory.ClientCounts))'
|
|
|
|
data-online="@Model.Online">
|
|
|
|
<canvas id="server_history_canvas_@Model.ID" class="rounded-bottom" height="100"></canvas>
|
|
|
|
</div>
|
2022-03-29 17:42:53 -04:00
|
|
|
</div>
|
2021-11-28 11:17:56 -05:00
|
|
|
</div>
|