@model SharedLibraryCore.Dtos.ServerInfo @{ Layout = null; int half = Model.ClientCount == 0 || Model.Players.Count == 0 ? 0 : (int)Math.Ceiling(Model.ClientCount / 2.0); }
@{ for (int i = 0; i < Model.ChatHistory.Count; i++) { if (Model.ChatHistory[i] == null || Model.ChatHistory[i].Message == null || Model.ChatHistory[i].Name == null) { continue; } if (Model.ChatHistory[i].Message == "CONNECTED") {
} if (Model.ChatHistory[i].Message == "DISCONNECTED") {
} if (Model.ChatHistory[i].Message != "CONNECTED" && Model.ChatHistory[i].Message != "DISCONNECTED") {
} } }
@{ for (int i = 0; i < half; i++) { if (i > Model.Players.Count - 1) { continue; } if (ViewBag.Authorized) { } string levelColorClass = !ViewBag.Authorized ? "" : $"level-color-{Model.Players[i].LevelInt}"; if (ViewBag.Authorized) { }
} }
@{ for (int i = half; i < Math.Min(Model.ClientCount, Model.Players.Count); i++) { if (i > Model.Players.Count - 1) { continue; } string levelColorClass = !ViewBag.Authorized ? "" : $"level-color-{Model.Players[i].LevelInt}"; if (ViewBag.Authorized) { }
} }
@if (Model.ChatHistory.Count > 0) {
}
@{ for (int i = 0; i < Model.ChatHistory.Count; i++) { if (Model.ChatHistory[i] == null || Model.ChatHistory[i].Message == null || Model.ChatHistory[i].Name == null) { continue; } if (Model.ChatHistory[i].Message == "CONNECTED") {
} if (Model.ChatHistory[i].Message == "DISCONNECTED") {
} if (Model.ChatHistory[i].Message != "CONNECTED" && Model.ChatHistory[i].Message != "DISCONNECTED") {
} } }