2022-04-19 19:43:58 -04:00
|
|
|
@model IEnumerable<SharedLibraryCore.Dtos.ServerInfo>
|
|
|
|
@using WebfrontCore.ViewModels
|
2019-02-25 20:36:10 -05:00
|
|
|
|
2022-04-19 19:43:58 -04:00
|
|
|
<div class="content mt-20 row">
|
2022-06-09 14:59:00 -04:00
|
|
|
<div class="col-12 col-lg-9 mt-0">
|
2022-07-05 13:02:43 -04:00
|
|
|
<h2 class="content-title mb-0">@ViewBag.Localization["WEBFRONT_TOP_PLAYERS_TITLE"]</h2>
|
2022-04-19 19:43:58 -04:00
|
|
|
<span class="text-muted">
|
2022-06-02 18:53:14 -04:00
|
|
|
<color-code value="@(Model.FirstOrDefault(m => m.Endpoint == ViewBag.SelectedServerId)?.Name ?? ViewBag.Localization["WEBFRONT_STATS_INDEX_ALL_SERVERS"])"></color-code>
|
2022-07-05 13:42:17 -04:00
|
|
|
— <span class="text-primary">@ViewBag.TotalRankedClients.ToString("#,##0")</span> @ViewBag.Localization["WEBFRONT_TOP_PLAYERS_SUBTITLE"]
|
2022-04-19 19:43:58 -04:00
|
|
|
</span>
|
2022-07-05 13:02:43 -04:00
|
|
|
|
2022-04-19 19:43:58 -04:00
|
|
|
<div id="topPlayersContainer">
|
|
|
|
@await Component.InvokeAsync("TopPlayers", new { count = 25, offset = 0, serverEndpoint = ViewBag.SelectedServerId })
|
|
|
|
</div>
|
|
|
|
<div class="text-center">
|
|
|
|
<i id="loaderLoad" class="oi oi-chevron-bottom loader-load-more text-primary mt-5" aria-hidden="true"></i>
|
|
|
|
</div>
|
2019-02-25 20:36:10 -05:00
|
|
|
</div>
|
|
|
|
|
2022-04-19 19:43:58 -04:00
|
|
|
<!-- side context menu -->
|
|
|
|
@{
|
|
|
|
var menuItems = new SideContextMenuItems
|
|
|
|
{
|
2022-07-05 13:02:43 -04:00
|
|
|
MenuTitle = ViewBag.Localization["WEBFRONT_CONTEXT_MENU_GLOBAL_GAME"],
|
|
|
|
Items = Model.Select(server => new SideContextMenuItem
|
2022-04-19 19:43:58 -04:00
|
|
|
{
|
|
|
|
IsLink = true,
|
|
|
|
Reference = Url.Action("TopPlayers", "Stats", new { serverId = server.Endpoint }),
|
|
|
|
Title = server.Name.StripColors(),
|
|
|
|
IsActive = ViewBag.SelectedServerId == server.Endpoint
|
|
|
|
}).Prepend(new SideContextMenuItem
|
|
|
|
{
|
|
|
|
IsLink = true,
|
|
|
|
Reference = Url.Action("TopPlayers", "Stats"),
|
|
|
|
Title = ViewBag.Localization["WEBFRONT_STATS_INDEX_ALL_SERVERS"],
|
|
|
|
IsActive = ViewBag.SelectedServerId is null
|
|
|
|
}).ToList()
|
|
|
|
};
|
2019-02-25 20:36:10 -05:00
|
|
|
}
|
2022-04-19 19:43:58 -04:00
|
|
|
<partial name="_SideContextMenu" for="@menuItems"></partial>
|
2019-02-16 18:18:50 -05:00
|
|
|
</div>
|
2018-05-28 21:30:31 -04:00
|
|
|
|
2019-02-26 22:25:27 -05:00
|
|
|
@section scripts
|
2022-04-19 19:43:58 -04:00
|
|
|
{
|
2018-05-30 21:50:20 -04:00
|
|
|
<environment include="Development">
|
2019-02-26 22:25:27 -05:00
|
|
|
<script type="text/javascript" src="~/js/stats.js"></script>
|
2022-06-09 14:50:58 -04:00
|
|
|
<script type="text/javascript" src="~/lib/canvas.js/canvasjs.js"></script>
|
2018-05-30 21:50:20 -04:00
|
|
|
</environment>
|
2022-06-09 14:50:58 -04:00
|
|
|
<script>initLoader('/Stats/GetTopPlayersAsync', '#topPlayersContainer', 25, 25, [{ 'name': 'serverId', 'value' : () => @(ViewBag.ServerId ?? 0) }]);</script>
|
2019-02-16 18:18:50 -05:00
|
|
|
}
|