IW4M-Admin/WebfrontCore/Views/Server/_ClientActivity.cshtml
2018-02-22 00:06:21 -06:00

47 lines
1.7 KiB
Plaintext

@model SharedLibrary.Dtos.ServerInfo
@{
Layout = null;
int half = (int)Math.Ceiling(Model.ClientCount / 2.0);
}
<div class="col-12 col-md-8 d-none d-md-block">
@{
for (int i = 0; i < Model.ChatHistory.Length; i++)
{
string message = "&ndash; " + @Model.ChatHistory[i].Message;
if (Model.ChatHistory[i].Message == "CONNECTED")
{
<span class="text-light"><span class="oi oi-account-login mr-2 text-success"> </span>@Model.ChatHistory[i].Name</span><br />
}
if (Model.ChatHistory[i].Message == "DISCONNECTED")
{
<span class="text-light"><span class="oi oi-account-logout mr-2 text-danger"> </span>@Model.ChatHistory[i].Name</span><br />
}
if (Model.ChatHistory[i].Message != "CONNECTED" && Model.ChatHistory[i].Message != "DISCONNECTED")
{
<span class="text-light">@Model.ChatHistory[i].Name</span><span> @Html.Raw(@message) </span><br />
}
}
}
</div>
<div class="col-md-4">
<div class="row">
<div class="col-6 text-left text-md-right">
@{
for (int i = 0; i < half; i++)
{
<span>@Html.ActionLink(Model.Players[i].Name, "ProfileAsync", "Client", new { id = Model.Players[i].ClientId })</span><br />
}
}
</div>
<div class="col-6 text-right">
@{
for (int i = half; i < Model.ClientCount; i++)
{
<span>@Html.ActionLink(Model.Players[i].Name, "ProfileAsync", "Client", new { id = Model.Players[i].ClientId })</span><br />
}
}
</div>
</div>
</div>