2018-04-08 02:44:42 -04:00
|
|
|
@model SharedLibraryCore.Dtos.PlayerInfo
|
2018-03-22 14:50:09 -04:00
|
|
|
@{
|
2018-03-13 17:30:22 -04:00
|
|
|
string match = System.Text.RegularExpressions.Regex.Match(Model.Name.ToUpper(), "[A-Z]").Value;
|
|
|
|
string shortCode = match == string.Empty ? "?" : match;
|
2018-05-05 18:52:04 -04:00
|
|
|
var loc = SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex;
|
2018-03-13 17:30:22 -04:00
|
|
|
}
|
2018-02-22 01:06:21 -05:00
|
|
|
<div id="profile_wrapper" class="row d-flex d-sm-inline-flex justify-content-center justify-content-left pb-3">
|
2018-02-21 20:29:23 -05:00
|
|
|
<div class="mr-auto ml-auto ml-sm-0 mr-sm-0">
|
|
|
|
<div id="profile_avatar" class="mb-4 mb-md-0 text-center level-bgcolor-@Model.Level.ToLower()">
|
2018-03-13 17:30:22 -04:00
|
|
|
<span class="profile-shortcode">@shortCode</span>
|
2018-02-21 20:29:23 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-02-22 01:06:21 -05:00
|
|
|
<div id="profile_info" class="text-center text-sm-left pr-3 pl-3">
|
2018-02-21 20:29:23 -05:00
|
|
|
<div id="profile_name">
|
2018-04-15 00:26:27 -04:00
|
|
|
@if (Model.Online)
|
|
|
|
{
|
|
|
|
<span class="oi oi-media-record text-success pr-2 h4" title="Online for @Model.TimeOnline"></span>
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<span class="oi oi-media-record text-danger pr-2 h4" title="Offline"></span>
|
|
|
|
}
|
2018-04-02 01:25:06 -04:00
|
|
|
<div class="client-name h1 d-flex d-inline-flex">
|
|
|
|
@Model.Name
|
|
|
|
</div>
|
|
|
|
@{
|
|
|
|
if (ViewBag.Authorized)
|
|
|
|
{
|
|
|
|
<div class="d-flex d-md-inline-flex justify-content-center order-1">
|
|
|
|
<div id="profile_aliases_btn" class="oi oi-caret-bottom h3 ml-0 ml-md-2"></div>
|
2018-03-09 03:01:12 -05:00
|
|
|
|
2018-04-09 23:33:42 -04:00
|
|
|
@if (Model.LevelInt < (int)ViewBag.User.Level &&
|
2018-05-14 13:55:10 -04:00
|
|
|
(SharedLibraryCore.Objects.Player.Permission)Model.LevelInt != SharedLibraryCore.Objects.Player.Permission.Banned)
|
2018-03-26 00:51:25 -04:00
|
|
|
{
|
2018-04-04 15:38:34 -04:00
|
|
|
<div id="profile_action_ban_btn" class="profile-action oi oi-lock-unlocked text-success h3 ml-2" title="Ban Client" data-action="ban" aria-hidden="true"></div>
|
2018-04-02 01:25:06 -04:00
|
|
|
}
|
2018-03-26 00:51:25 -04:00
|
|
|
|
2018-04-02 01:25:06 -04:00
|
|
|
@if (Model.LevelInt < (int)ViewBag.User.Level &&
|
2018-05-14 13:55:10 -04:00
|
|
|
(SharedLibraryCore.Objects.Player.Permission)Model.LevelInt == SharedLibraryCore.Objects.Player.Permission.Banned)
|
2018-04-02 01:25:06 -04:00
|
|
|
{
|
2018-04-04 15:38:34 -04:00
|
|
|
<div id="profile_action_unban_btn" class="profile-action oi oi-lock-locked text-danger h3 ml-2" title="Unban Client" data-action="unban" aria-hidden="true"></div>
|
2018-04-02 01:25:06 -04:00
|
|
|
}
|
|
|
|
</div>
|
2018-03-26 00:51:25 -04:00
|
|
|
|
2018-04-02 01:25:06 -04:00
|
|
|
<div id="profile_aliases" class="pr-0 pr-sm-4 pb-2 mb-2 text-muted order-0">
|
|
|
|
@{
|
2018-05-14 13:55:10 -04:00
|
|
|
foreach (var linked in Model.LinkedAccounts)
|
|
|
|
{
|
|
|
|
@Html.ActionLink(linked.Value.ToString("X"), "ProfileAsync", "Client", new { id = linked.Key}, new { @class = "link-inverse" })<br/>
|
|
|
|
}
|
2018-04-02 01:25:06 -04:00
|
|
|
foreach (string alias in Model.Aliases)
|
2018-03-26 00:51:25 -04:00
|
|
|
{
|
2018-05-14 13:55:10 -04:00
|
|
|
@alias<br />
|
2018-03-26 00:51:25 -04:00
|
|
|
}
|
|
|
|
|
2018-04-02 01:25:06 -04:00
|
|
|
if (ViewBag.Authorized)
|
|
|
|
{
|
|
|
|
foreach (string ip in Model.IPs)
|
|
|
|
{
|
|
|
|
<a class="ip-locate-link" href="#" data-ip="@ip">@ip</a><br />
|
|
|
|
}
|
|
|
|
}
|
2018-03-22 14:50:09 -04:00
|
|
|
}
|
2018-04-02 01:25:06 -04:00
|
|
|
</div>
|
2018-02-21 20:29:23 -05:00
|
|
|
}
|
2018-04-02 01:25:06 -04:00
|
|
|
}
|
2018-03-22 14:50:09 -04:00
|
|
|
</div>
|
|
|
|
<div id="profile_level" class="text-muted mb-2">
|
|
|
|
<h5><span class="level-color-@Model.Level.ToLower()"><strong>@Model.Level</strong></span></h5>
|
|
|
|
</div>
|
|
|
|
<div id="profile_time_played" class="text-muted">
|
2018-05-10 01:34:29 -04:00
|
|
|
@loc["WEBFRONT_PROFILE_PLAYER"] <span class="text-primary">@Model.TimePlayed</span> @loc["GLOBAL_HOURS"]
|
2018-03-22 14:50:09 -04:00
|
|
|
</div>
|
|
|
|
<div id="profile_first_seen" class="text-muted">
|
2018-05-10 01:34:29 -04:00
|
|
|
@loc["WEBFRONT_PROFILE_FSEEN"] <span class="text-primary">@Model.FirstSeen</span> @loc["WEBFRONT_PENALTY_TEMPLATE_AGO"]
|
2018-03-22 14:50:09 -04:00
|
|
|
</div>
|
|
|
|
<div id="profile_last_seen" class="text-muted">
|
2018-05-05 18:52:04 -04:00
|
|
|
@loc["WEBFRONT_PROFILE_LSEEN"] <span class="text-primary">@Model.LastSeen</span> @loc["WEBFRONT_PENALTY_TEMPLATE_AGO"]
|
2018-02-21 20:29:23 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-03-22 14:50:09 -04:00
|
|
|
<div id="profile_meta" class="text-center text-sm-right pt-2 mt-md-4 pt-md-3 mr-4 pr-4 mr-md-0 ml-4 pl-4 ml-md-0 pr-md-0 pl-md-0">
|
2018-05-16 00:57:37 -04:00
|
|
|
<div class="profile-meta-entry">
|
|
|
|
<span class="profile-meta-value text-primary">@Model.ConnectionCount</span>
|
|
|
|
<span class="profile-meta-value text-muted"> @loc["WEBFRONT_CLIENT_META_CONNECTIONS"]</span>
|
|
|
|
</div>
|
2018-03-22 14:50:09 -04:00
|
|
|
</div>
|
2018-02-21 20:29:23 -05:00
|
|
|
</div>
|
2018-02-24 00:56:03 -05:00
|
|
|
|
2018-02-22 01:06:21 -05:00
|
|
|
<div class="row d-md-flex pt-2">
|
2018-02-21 20:29:23 -05:00
|
|
|
<div id="profile_events" class="text-muted text-left ml-sm-0">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-03-27 00:54:20 -04:00
|
|
|
@section targetid {
|
|
|
|
<input type="hidden" name="targetId" value="@Model.ClientId" />
|
|
|
|
}
|
|
|
|
|
2018-02-21 20:29:23 -05:00
|
|
|
@section scripts {
|
|
|
|
<script>
|
|
|
|
const clientInfo = {};
|
|
|
|
clientInfo.clientId = @Model.ClientId;
|
|
|
|
clientInfo.Meta =@Html.Raw(Json.Serialize(@Model.Meta));
|
|
|
|
</script>
|
2018-04-09 23:33:42 -04:00
|
|
|
<environment include="Development">
|
|
|
|
<script type="text/javascript" src="~/js/profile.js"></script>
|
|
|
|
</environment>
|
|
|
|
}
|