@using WebfrontCore.ViewModels @model IEnumerable @{ var selectedServer = Model?.FirstOrDefault(server => server.ServerId == ViewBag.SelectedServerId) ?? Model?.First(); }
@if (Model is not null) {
}
@{ var menuItems = new SideContextMenuItems { MenuTitle = ViewBag.Localization["WEBFRONT_CONTEXT_MENU_GLOBAL_SERVER"], Items = Model.Select(server => new SideContextMenuItem { IsLink = true, Reference = Url.Action("Scoreboard", "Server", new { serverId = server.ServerId }), Title = server.ServerName.StripColors(), IsActive = ViewBag.SelectedServerId == server.ServerId }).ToList() }; }
@section scripts { }