Made webfront optional for decreased ram usage

initialization should be better asynced
clean up publish folder after publish
added chevron hover icon for loading more penalties
added T6M maps to config
This commit is contained in:
RaidMax
2018-04-16 15:31:14 -05:00
parent 2fc2109a2e
commit 9aea9e1c02
19 changed files with 255 additions and 86 deletions

View File

@ -4,7 +4,6 @@ using SharedLibraryCore.Dtos;
using SharedLibraryCore.Objects;
using System;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
namespace WebfrontCore.ViewComponents
@ -13,7 +12,7 @@ namespace WebfrontCore.ViewComponents
{
public async Task<IViewComponentResult> InvokeAsync(int offset)
{
var penalties = await Program.Manager.GetPenaltyService().GetRecentPenalties(15, offset);
var penalties = await Program.Manager.GetPenaltyService().GetRecentPenalties(12, offset);
var penaltiesDto = penalties.Select(p => new PenaltyInfo()
{
OffenderId = p.OffenderId,
@ -28,8 +27,7 @@ namespace WebfrontCore.ViewComponents
Sensitive = p.Type == Penalty.PenaltyType.Flag
});
bool authorized = User.Identity.IsAuthenticated;
penaltiesDto = authorized ? penaltiesDto.ToList() : penaltiesDto.Where(p => !p.Sensitive).ToList();
penaltiesDto = User.Identity.IsAuthenticated ? penaltiesDto.ToList() : penaltiesDto.Where(p => !p.Sensitive).ToList();
return View("_List", penaltiesDto);
}