@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) .OrderBy(_meta => _meta.Order) .GroupBy(_meta => _meta.Column) .OrderBy(_grouping => _grouping.Key); }
@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) { }
}
@foreach (var metaColumn in informationMeta) {
@foreach (var meta in metaColumn) {
@meta.Value @meta.Key
}
}
@await Component.InvokeAsync("ProfileMetaList", new { clientId = Model.ClientId, count = 30, offset = 0 })
@section targetid { } @section scripts { }