2018-04-08 02:44:42 -04:00
|
|
|
@model SharedLibraryCore.Dtos.ServerInfo
|
2018-02-21 20:29:23 -05:00
|
|
|
|
|
|
|
@{
|
|
|
|
Layout = null;
|
2019-01-26 21:33:37 -05:00
|
|
|
int half = Model.ClientCount == 0 || Model.Players.Count == 0 ? 0 : (int)Math.Ceiling(Model.ClientCount / 2.0);
|
2018-02-21 20:29:23 -05:00
|
|
|
}
|
2020-08-12 14:46:14 -04:00
|
|
|
<div class="col-12 col-md-7 d-none d-md-block">
|
2018-02-21 20:29:23 -05:00
|
|
|
@{
|
2018-05-14 13:55:10 -04:00
|
|
|
for (int i = 0; i < Model.ChatHistory.Count; i++)
|
2018-02-21 20:29:23 -05:00
|
|
|
{
|
2018-05-16 00:57:37 -04:00
|
|
|
if (Model.ChatHistory[i] == null ||
|
|
|
|
Model.ChatHistory[i].Message == null ||
|
|
|
|
Model.ChatHistory[i].Name == null)
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2020-08-20 11:38:11 -04:00
|
|
|
string message = Model.ChatHistory[i].IsHidden && !ViewBag.Authorized ? Model.ChatHistory[i].HiddenMessage : Model.ChatHistory[i].Message;
|
|
|
|
|
2018-02-21 20:29:23 -05:00
|
|
|
if (Model.ChatHistory[i].Message == "CONNECTED")
|
2018-02-22 01:06:21 -05:00
|
|
|
{
|
2019-08-04 18:06:07 -04:00
|
|
|
<span class="text-light">
|
|
|
|
<span class="oi oi-account-login mr-2 text-success"> </span>
|
|
|
|
<color-code value="@Model.ChatHistory[i].Name" allow="@ViewBag.EnableColorCodes"></color-code>
|
|
|
|
</span><br />
|
2018-02-22 01:06:21 -05:00
|
|
|
}
|
|
|
|
if (Model.ChatHistory[i].Message == "DISCONNECTED")
|
|
|
|
{
|
2019-08-04 18:06:07 -04:00
|
|
|
<span class="text-light">
|
|
|
|
<span class="oi oi-account-logout mr-2 text-danger"> </span>
|
|
|
|
<color-code value="@Model.ChatHistory[i].Name" allow="@ViewBag.EnableColorCodes"></color-code>
|
|
|
|
</span><br />
|
2018-02-22 01:06:21 -05:00
|
|
|
}
|
|
|
|
if (Model.ChatHistory[i].Message != "CONNECTED" && Model.ChatHistory[i].Message != "DISCONNECTED")
|
|
|
|
{
|
2019-08-04 18:06:07 -04:00
|
|
|
<span class="text-light">
|
|
|
|
<color-code value="@Model.ChatHistory[i].Name" allow="@ViewBag.EnableColorCodes"></color-code>
|
|
|
|
</span>
|
|
|
|
<span>
|
|
|
|
—
|
2020-08-20 11:38:11 -04:00
|
|
|
<color-code value="@message.CapClientName(48)" allow="@ViewBag.EnableColorCodes"></color-code>
|
2019-08-04 18:06:07 -04:00
|
|
|
</span><br />
|
2018-02-22 01:06:21 -05:00
|
|
|
}
|
2018-02-21 20:29:23 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</div>
|
2020-08-12 14:46:14 -04:00
|
|
|
<div class="col-md-5">
|
2021-01-24 14:30:22 -05:00
|
|
|
<div class="row" style="overflow-wrap: anywhere">
|
|
|
|
<div class="col-6 text-left text-md-right">
|
|
|
|
@{
|
|
|
|
for (int i = 0; i < half; i++)
|
2018-02-21 20:29:23 -05:00
|
|
|
{
|
2021-01-24 14:30:22 -05:00
|
|
|
if (i > Model.Players.Count - 1)
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
2020-07-14 15:13:40 -04:00
|
|
|
|
2021-01-24 14:30:22 -05:00
|
|
|
string levelColorClass = !ViewBag.Authorized ? "" : $"level-color-{Model.Players[i].LevelInt}";
|
|
|
|
<div class="d-inline-flex">
|
|
|
|
@if (ViewBag.Authorized)
|
|
|
|
{
|
|
|
|
<div class="oi oi-circle-x ml-0 mr-1 profile-action action-kick-button d-inline d-md-none" data-action="kick" data-action-id="@Model.Players[i].ClientId" aria-hidden="true"></div>
|
|
|
|
}
|
2020-08-12 14:46:14 -04:00
|
|
|
|
2021-01-24 14:30:22 -05:00
|
|
|
<a asp-controller="Client" asp-action="ProfileAsync" asp-route-id="@Model.Players[i].ClientId" class="@levelColorClass">
|
|
|
|
<color-code value="@Model.Players[i].Name" allow="@ViewBag.EnableColorCodes"></color-code>
|
|
|
|
</a>
|
2020-08-18 21:11:41 -04:00
|
|
|
|
2021-01-24 14:30:22 -05:00
|
|
|
@if (ViewBag.Authorized)
|
|
|
|
{
|
|
|
|
<div class="oi oi-circle-x ml-1 profile-action action-kick-button d-none d-md-inline" data-action="kick" data-action-id="@Model.Players[i].ClientId" aria-hidden="true"></div>
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
<br />
|
2018-02-21 20:29:23 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</div>
|
2021-01-24 14:30:22 -05:00
|
|
|
<div class="col-6 text-right w-50">
|
|
|
|
@{
|
|
|
|
for (int i = half; i < Math.Min(Model.ClientCount, Model.Players.Count); i++)
|
2018-02-21 20:29:23 -05:00
|
|
|
{
|
2021-01-24 14:30:22 -05:00
|
|
|
if (i > Model.Players.Count - 1)
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
2020-07-14 15:13:40 -04:00
|
|
|
|
2021-01-24 14:30:22 -05:00
|
|
|
string levelColorClass = !ViewBag.Authorized ? "" : $"level-color-{Model.Players[i].LevelInt}";
|
2020-08-12 14:46:14 -04:00
|
|
|
|
2021-01-24 14:30:22 -05:00
|
|
|
<div>
|
|
|
|
<a asp-controller="Client" asp-action="ProfileAsync" asp-route-id="@Model.Players[i].ClientId" class="@levelColorClass">
|
|
|
|
<color-code value="@Model.Players[i].Name" allow="@ViewBag.EnableColorCodes"></color-code>
|
|
|
|
</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>
|
|
|
|
}
|
|
|
|
<br />
|
|
|
|
</div>
|
2018-02-21 20:29:23 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-04-04 15:38:34 -04:00
|
|
|
</div>
|
2018-05-14 13:55:10 -04:00
|
|
|
@if (Model.ChatHistory.Count > 0)
|
2018-04-04 15:38:34 -04:00
|
|
|
{
|
|
|
|
<div class="w-100 border-bottom d-md-none d-block mt-1 mb-1"></div>
|
|
|
|
}
|
|
|
|
<div class="col-12 col-md-8 d-md-none d-block text-left">
|
|
|
|
@{
|
2018-05-14 13:55:10 -04:00
|
|
|
for (int i = 0; i < Model.ChatHistory.Count; i++)
|
2018-04-04 15:38:34 -04:00
|
|
|
{
|
2018-05-16 00:57:37 -04:00
|
|
|
if (Model.ChatHistory[i] == null ||
|
|
|
|
Model.ChatHistory[i].Message == null ||
|
|
|
|
Model.ChatHistory[i].Name == null)
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2020-08-20 11:38:11 -04:00
|
|
|
string message = Model.ChatHistory[i].IsHidden && !ViewBag.Authorized ? Model.ChatHistory[i].HiddenMessage : Model.ChatHistory[i].Message;
|
|
|
|
|
2018-04-04 15:38:34 -04:00
|
|
|
if (Model.ChatHistory[i].Message == "CONNECTED")
|
|
|
|
{
|
2019-08-04 18:06:07 -04:00
|
|
|
<span class="text-light">
|
|
|
|
<span class="oi oi-account-login mr-2 text-success"> </span>
|
|
|
|
<color-code value="@Model.ChatHistory[i].Name" allow="@ViewBag.EnableColorCodes"></color-code>
|
|
|
|
</span><br />
|
2018-04-04 15:38:34 -04:00
|
|
|
}
|
|
|
|
if (Model.ChatHistory[i].Message == "DISCONNECTED")
|
|
|
|
{
|
2019-08-04 18:06:07 -04:00
|
|
|
<span class="text-light">
|
|
|
|
<span class="oi oi-account-logout mr-2 text-danger"> </span>
|
|
|
|
<color-code value="@Model.ChatHistory[i].Name" allow="@ViewBag.EnableColorCodes"></color-code>
|
|
|
|
</span><br />
|
2018-04-04 15:38:34 -04:00
|
|
|
}
|
|
|
|
if (Model.ChatHistory[i].Message != "CONNECTED" && Model.ChatHistory[i].Message != "DISCONNECTED")
|
|
|
|
{
|
2019-08-02 19:04:34 -04:00
|
|
|
<span class="text-light">
|
|
|
|
<color-code value="@Model.ChatHistory[i].Name" allow="@ViewBag.EnableColorCodes"></color-code>
|
|
|
|
</span>
|
2020-07-14 15:13:40 -04:00
|
|
|
<span>
|
|
|
|
—
|
2020-08-20 11:38:11 -04:00
|
|
|
<color-code value="@message.CapClientName(48)" allow="@ViewBag.EnableColorCodes"></color-code>
|
2019-08-02 19:04:34 -04:00
|
|
|
</span><br />
|
2018-04-04 15:38:34 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-02-21 20:29:23 -05:00
|
|
|
</div>
|