fix issue with kick from profile

This commit is contained in:
RaidMax 2022-04-28 10:09:25 -05:00
parent 074e36413e
commit 389c687420
4 changed files with 13 additions and 7 deletions

View File

@ -11,6 +11,7 @@ public class SideContextMenuItem
public string Reference { get; set; }
public string Icon { get; set; }
public string Tooltip { get; set; }
public int? EntityId { get; set; }
}

View File

@ -275,6 +275,7 @@
IsButton = true,
Reference = "edit",
Icon = "oi-cog",
EntityId = Model.ClientId
});
}
@ -294,7 +295,8 @@
Title = isFlagged ? "Unflag" : "Flag",
IsButton = true,
Reference = isFlagged ? "unflag" : "flag",
Icon = "oi-flag"
Icon = "oi-flag",
EntityId = Model.ClientId
});
}
@ -306,6 +308,7 @@
IsButton = true,
Reference = "kick",
Icon = "oi-circle-x",
EntityId = Model.ClientId
});
}
@ -317,6 +320,7 @@
IsButton = true,
Reference = "ban",
Icon = "oi-lock-unlocked",
EntityId = Model.ClientId
});
}
@ -328,6 +332,7 @@
IsButton = true,
Reference = "unban",
Icon = "oi-lock-locked",
EntityId = Model.ClientId
});
}
}

View File

@ -48,7 +48,7 @@
</div>
<div class="modal-content p-10">
<div class="modal-content">
<a href="#" class="btn close" role="button" aria-label="Close">
<a href="#" onclick="halfmoon.toggleModal('actionModal')" class="btn close" role="button" aria-label="Close">
<span aria-hidden="true">&times;</span>
</a>
<div id="actionModalContent">
@ -67,7 +67,7 @@
</div>
<div class="modal-content">
<div class="modal-content p-10">
<a href="#" class="btn close" role="button" aria-label="Close">
<a href="#" onclick="halfmoon.toggleModal('contextModal')" class="btn close" role="button" aria-label="Close">
<span aria-hidden="true">&times;</span>
</a>
<div id="contextModalContent">
@ -82,7 +82,7 @@
<div class="page-wrapper with-navbar with-sidebar" data-sidebar-type="overlayed-sm-and-down">
<!-- toast notifications -->
<div class="sticky-alerts"></div>
<div class="sticky-alerts" style="z-index: 1001"></div>
<!-- top menu bar -->
<nav class="navbar">
<button id="toggle-sidebar-btn" class="btn btn-action" type="button" onclick="halfmoon.toggleSidebar()">
@ -127,7 +127,7 @@
<partial name="_SearchResourceForm"/>
</div>
<div class="d-flex d-lg-none">
<a href="#contextMenuModal">
<a href="#" onclick="halfmoon.toggleModal('contextMenuModal')">
<button class="btn" type="button">
<i class="oi oi-ellipses"></i>
</button>

View File

@ -8,7 +8,7 @@
@foreach (var item in Model.Items)
{
<a href="@(item.IsLink ? item.Reference : "#actionModal")" class="@(item.IsLink ? "" : "profile-action")" data-action="@(item.IsLink ? "" : item.Reference)">
<a href="#" class="@(item.IsLink ? "" : "profile-action")" data-action="@(item.IsLink ? "" : item.Reference)" data-action-id="@item.EntityId">
<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 : "#actionModal")" class="@(item.IsLink ? "" : "profile-action") no-decoration" data-action="@(item.IsLink ? "" : item.Reference)">
<a href="#" class="@(item.IsLink ? "" : "profile-action") no-decoration" data-action="@(item.IsLink ? "" : item.Reference)" data-action-id="@item.EntityId">
<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>