mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
implement profile interaction registration through plugins (mute and vpn detection implementation)
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
<h5 class="modal-title mb-10">@Model.Name.Titleize()</h5>
|
||||
<h5 class="modal-title mb-10">@Model.Name?.Titleize()</h5>
|
||||
@if (Model.Inputs.Any(input => input.Type != "hidden"))
|
||||
{
|
||||
<hr class="mb-10"/>
|
||||
|
@ -22,7 +22,7 @@
|
||||
EFPenalty.PenaltyType.Flag => "alert-secondary",
|
||||
EFPenalty.PenaltyType.TempBan => "alert-secondary",
|
||||
_ => "alert"
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
string ClassForProfileBackground()
|
||||
@ -391,6 +391,20 @@
|
||||
});
|
||||
}
|
||||
|
||||
foreach (var interaction in Model.Interactions.Where(i => (int)ViewBag.User.Level >= ((int?)i.MinimumPermission ?? 0)))
|
||||
{
|
||||
menuItems.Items.Add(new SideContextMenuItem
|
||||
{
|
||||
Title = interaction.Name,
|
||||
Tooltip = interaction.Description,
|
||||
EntityId = interaction.EntityId,
|
||||
Icon = interaction.DisplayMeta,
|
||||
Reference = interaction.ActionPath,
|
||||
Meta = System.Text.Json.JsonSerializer.Serialize(interaction.ActionMeta),
|
||||
IsButton = true
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
<partial name="_SideContextMenu" for="@menuItems"></partial>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
@foreach (var item in Model.Items)
|
||||
{
|
||||
<a href="@(item.IsLink ? item.Reference : "#")" class="@(item.IsLink ? "" : "profile-action")" data-action="@(item.IsLink ? "" : item.Reference)" data-action-id="@item.EntityId">
|
||||
<a href="@(item.IsLink ? item.Reference : "#")" class="@(item.IsLink ? "" : "profile-action")" data-action="@(item.IsLink ? "" : item.Reference)" data-action-id="@item.EntityId" data-action-meta="@item.Meta">
|
||||
<div class="@(item.IsButton ? "btn btn-block" : "")" data-title="@item.Tooltip" data-placement="left" data-toggle="@(string.IsNullOrEmpty(item.Tooltip) ? "" : "tooltip")">
|
||||
<i class="@(string.IsNullOrEmpty(item.Icon) ? "" : $"oi {item.Icon}") mr-5 font-size-12"></i>
|
||||
<span class="@(item.IsActive ? "text-primary" : "") text-truncate">@item.Title</span>
|
||||
@ -28,7 +28,7 @@
|
||||
@foreach (var item in Model.Items)
|
||||
{
|
||||
<div class="mt-15 mb-15">
|
||||
<a href="@(item.IsLink ? item.Reference : "#")" class="@(item.IsLink ? "" : "profile-action") no-decoration" data-action="@(item.IsLink ? "" : item.Reference)" data-action-id="@item.EntityId">
|
||||
<a href="@(item.IsLink ? item.Reference : "#")" class="@(item.IsLink ? "" : "profile-action") no-decoration" data-action="@(item.IsLink ? "" : item.Reference)" data-action-id="@item.EntityId" data-action-meta="@item.Meta">
|
||||
<div class="btn btn-block btn-lg @(item.IsActive ? "btn-primary" : "") text-truncate" data-title="@item.Tooltip" data-toggle="@(string.IsNullOrEmpty(item.Tooltip) ? "" : "tooltip")">
|
||||
<i class="@(string.IsNullOrEmpty(item.Icon) ? "" : $"oi {item.Icon}") mr-5 font-size-12"></i>
|
||||
<span>@item.Title</span>
|
||||
|
Reference in New Issue
Block a user