@model SharedLibraryCore.Dtos.PlayerInfo @{ string match = System.Text.RegularExpressions.Regex.Match(Model.Name.ToUpper(), "[A-Z]").Value; string shortCode = match == string.Empty ? "?" : match; var loc = SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex; string gravatarUrl = Model.Meta.FirstOrDefault(m => m.Key == "GravatarEmail")?.Value; bool isTempBanned = Model.ActivePenaltyType == "TempBan"; var informationMeta = Model.Meta .Where(_meta => _meta.Type == SharedLibraryCore.Dtos.ProfileMeta.MetaType.Information) .ToList(); }
@if (string.IsNullOrEmpty(gravatarUrl)) { @shortCode }
@Model.Name
@if (ViewBag.Authorized) {
}
@if (ViewBag.Authorized) {
@foreach (var linked in Model.LinkedAccounts) { @Html.ActionLink(linked.Value.ToString("X"), "ProfileAsync", "Client", new { id = linked.Key }, new { @class = "link-inverse" })
} @foreach (string alias in Model.Aliases) { @alias
} @foreach (string ip in Model.IPs) { @ip
}
}
@Model.Level @(isTempBanned ? $"({loc["WEBFRONT_PROFILE_TEMPBAN"]})" : "")
@if (ViewBag.Authorized) {
@if (Model.LevelInt < (int)ViewBag.User.Level && !Model.HasActivePenalty) { } @if (Model.LevelInt < (int)ViewBag.User.Level && Model.HasActivePenalty) { @if (isTempBanned) { } else { } } @if (Model.LevelInt != -1) { }
}
@for (int i = 0; i < informationMeta.Count; i += 3) {
@informationMeta[i].Value @informationMeta[i].Key
}
@for (int i = 1; i < informationMeta.Count; i += 3) {
@informationMeta[i].Value @informationMeta[i].Key
}
@for (int i = 2; i < informationMeta.Count; i += 3) {
@informationMeta[i].Value @informationMeta[i].Key
}
@await Component.InvokeAsync("ProfileMetaList", new { clientId = Model.ClientId, count = 30, offset = 0 })
@section targetid { } @section scripts { }