allow toggle of automated penalties display on the webfront

issue #112
fix small issue with script plugin loading
This commit is contained in:
RaidMax
2020-02-12 13:13:59 -06:00
parent c3c21a7749
commit f430dab3a7
9 changed files with 134 additions and 36 deletions

View File

@ -9,9 +9,9 @@ namespace WebfrontCore.ViewComponents
{
private const int PENALTY_COUNT = 15;
public async Task<IViewComponentResult> InvokeAsync(int offset, EFPenalty.PenaltyType showOnly)
public async Task<IViewComponentResult> InvokeAsync(int offset, EFPenalty.PenaltyType showOnly, bool ignoreAutomated)
{
var penalties = await Program.Manager.GetPenaltyService().GetRecentPenalties(PENALTY_COUNT, offset, showOnly);
var penalties = await Program.Manager.GetPenaltyService().GetRecentPenalties(PENALTY_COUNT, offset, showOnly, ignoreAutomated);
penalties = User.Identity.IsAuthenticated ? penalties : penalties.Where(p => !p.Sensitive).ToList();
return View("_List", penalties);