mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-07-06 20:09:11 -05:00
Add flag icon on client profile
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
<form class="action-form" action="/Action/@Model.Action">
|
||||
<form class="action-form @(Model.ShouldRefresh ? "refreshable" : "")" action="/Action/@Model.Action">
|
||||
@foreach (var input in Model.Inputs)
|
||||
{
|
||||
string inputType = input.Type ?? "text";
|
||||
|
@ -5,6 +5,7 @@
|
||||
var loc = SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex;
|
||||
string gravatarUrl = Model.Meta.FirstOrDefault(m => m.Key == "GravatarEmail")?.Value;
|
||||
bool isTempBanned = Model.ActivePenaltyType == "TempBan";
|
||||
bool isFlagged = Model.LevelInt == (int)SharedLibraryCore.Database.Models.EFClient.Permission.Flagged;
|
||||
var informationMeta = Model.Meta
|
||||
.Where(_meta => _meta.Type == SharedLibraryCore.Dtos.ProfileMeta.MetaType.Information)
|
||||
.OrderBy(_meta => _meta.Order)
|
||||
@ -56,6 +57,8 @@
|
||||
@if (ViewBag.Authorized)
|
||||
{
|
||||
<div class="pr-lg-0 text-center text-lg-right">
|
||||
<div class="profile-action oi oi-flag h3 ml-2 @(isFlagged ? "text-secondary" : "text-success")" data-action="@(isFlagged ? "unflag" : "flag")" aria-hidden="true"></div>
|
||||
|
||||
@if (Model.LevelInt < (int)ViewBag.User.Level && !Model.HasActivePenalty)
|
||||
{
|
||||
<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>
|
||||
@ -74,6 +77,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@if (Model.LevelInt != -1)
|
||||
{
|
||||
<div id="profile_action_edit_btn" class="profile-action oi oi-cog text-muted h3 ml-2" title="Client Options" data-action="edit" aria-hidden="true"></div>
|
||||
|
@ -17,15 +17,27 @@
|
||||
|
||||
if (Model.ChatHistory[i].Message == "CONNECTED")
|
||||
{
|
||||
<span class="text-light"><span class="oi oi-account-login mr-2 text-success"> </span>@Model.ChatHistory[i].Name</span><br />
|
||||
<span class="text-light">
|
||||
<span class="oi oi-account-login mr-2 text-success"> </span>
|
||||
<color-code value="@Model.ChatHistory[i].Name" allow="@ViewBag.EnableColorCodes"></color-code>
|
||||
</span><br />
|
||||
}
|
||||
if (Model.ChatHistory[i].Message == "DISCONNECTED")
|
||||
{
|
||||
<span class="text-light"><span class="oi oi-account-logout mr-2 text-danger"> </span>@Model.ChatHistory[i].Name</span><br />
|
||||
<span class="text-light">
|
||||
<span class="oi oi-account-logout mr-2 text-danger"> </span>
|
||||
<color-code value="@Model.ChatHistory[i].Name" allow="@ViewBag.EnableColorCodes"></color-code>
|
||||
</span><br />
|
||||
}
|
||||
if (Model.ChatHistory[i].Message != "CONNECTED" && Model.ChatHistory[i].Message != "DISCONNECTED")
|
||||
{
|
||||
<span class="text-light">@Model.ChatHistory[i].Name</span><span> — @Model.ChatHistory[i].Message.Substring(0, Math.Min(65, Model.ChatHistory[i].Message.Length)) </span><br />
|
||||
<span class="text-light">
|
||||
<color-code value="@Model.ChatHistory[i].Name" allow="@ViewBag.EnableColorCodes"></color-code>
|
||||
</span>
|
||||
<span>
|
||||
—
|
||||
<color-code value="@Model.ChatHistory[i].Message.Substring(0, Math.Min(40, Model.ChatHistory[i].Message.Length))" allow="@ViewBag.EnableColorCodes"></color-code>
|
||||
</span><br />
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -83,12 +95,17 @@
|
||||
|
||||
if (Model.ChatHistory[i].Message == "CONNECTED")
|
||||
{
|
||||
<span class="text-light"><span class="oi oi-account-login mr-2 text-success"> </span>@Model.ChatHistory[i].Name</span><br />
|
||||
<span class="text-light">
|
||||
<span class="oi oi-account-login mr-2 text-success"> </span>
|
||||
<color-code value="@Model.ChatHistory[i].Name" allow="@ViewBag.EnableColorCodes"></color-code>
|
||||
</span><br />
|
||||
}
|
||||
if (Model.ChatHistory[i].Message == "DISCONNECTED")
|
||||
{
|
||||
|
||||
<span class="text-light"><span class="oi oi-account-logout mr-2 text-danger"> </span>@Model.ChatHistory[i].Name</span><br />
|
||||
<span class="text-light">
|
||||
<span class="oi oi-account-logout mr-2 text-danger"> </span>
|
||||
<color-code value="@Model.ChatHistory[i].Name" allow="@ViewBag.EnableColorCodes"></color-code>
|
||||
</span><br />
|
||||
}
|
||||
if (Model.ChatHistory[i].Message != "CONNECTED" && Model.ChatHistory[i].Message != "DISCONNECTED")
|
||||
{
|
||||
|
Reference in New Issue
Block a user