Fix bug with webfront spamming issues when running
Remove IW5 parser Begin implementation of dynamic parsers
This commit is contained in:
@ -35,7 +35,7 @@ namespace WebfrontCore.Controllers
|
||||
Level = p.Level.ToLocalizedLevelName(),
|
||||
LevelInt = (int)p.Level
|
||||
}).ToList(),
|
||||
ChatHistory = s.ChatHistory,
|
||||
ChatHistory = s.ChatHistory.ToList(),
|
||||
PlayerHistory = s.ClientHistory.ToArray(),
|
||||
};
|
||||
return PartialView("_ClientActivity", serverInfo);
|
||||
|
@ -6,9 +6,6 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SharedLibraryCore.Database;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace WebfrontCore
|
||||
{
|
||||
@ -62,6 +59,7 @@ namespace WebfrontCore
|
||||
loggerFactory.AddDebug();
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
app.UseExceptionHandler("/Home/Error");
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
int half = (int)Math.Ceiling(Model.ClientCount / 2.0);
|
||||
int half = Model.ClientCount == 0 || Model.Players.Count == 0 ? 0 : (int)Math.Ceiling(Model.ClientCount / 2.0);
|
||||
}
|
||||
<div class="col-12 col-md-8 d-none d-md-block">
|
||||
@{
|
||||
@ -43,7 +43,7 @@
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
@{
|
||||
for (int i = half; i < Model.ClientCount; i++)
|
||||
for (int i = half; i < Math.Min(Model.ClientCount, Model.Players.Count); i++)
|
||||
{
|
||||
string levelColorClass = !ViewBag.Authorized ? "" : $"level-color-{Model.Players[i].LevelInt}";
|
||||
<span>@Html.ActionLink(Model.Players[i].Name, "ProfileAsync", "Client", new { id = Model.Players[i].ClientId }, new { @class = levelColorClass })</span><br />
|
||||
|
Reference in New Issue
Block a user