set team properly/tint scoreboard background for team

This commit is contained in:
RaidMax 2022-03-25 13:16:41 -05:00
parent 557cc1614f
commit 724992ef33
6 changed files with 15 additions and 3 deletions

View File

@ -359,7 +359,7 @@ namespace IW4MAdmin.Application.EventParsers
State = EFClient.ClientState.Connected, State = EFClient.ClientState.Connected,
}, },
Extra = team, Extra = team,
RequiredEntity = GameEvent.EventRequiredEntity.None, RequiredEntity = GameEvent.EventRequiredEntity.Origin,
GameTime = gameTime, GameTime = gameTime,
Source = GameEvent.EventSource.Log Source = GameEvent.EventSource.Log
}; };

View File

@ -96,6 +96,7 @@ namespace IW4MAdmin
client.ClientNumber = clientFromLog.ClientNumber; client.ClientNumber = clientFromLog.ClientNumber;
client.Score = clientFromLog.Score; client.Score = clientFromLog.Score;
client.Ping = clientFromLog.Ping; client.Ping = clientFromLog.Ping;
client.Team = clientFromLog.Team;
client.CurrentServer = this; client.CurrentServer = this;
client.State = ClientState.Connecting; client.State = ClientState.Connecting;

View File

@ -101,7 +101,8 @@ namespace WebfrontCore.Controllers
Deaths = clientData.stats?.MatchData?.Deaths, Deaths = clientData.stats?.MatchData?.Deaths,
ScorePerMinute = clientData.stats?.SessionSPM, ScorePerMinute = clientData.stats?.SessionSPM,
Kdr = clientData.stats?.MatchData?.Kdr, Kdr = clientData.stats?.MatchData?.Kdr,
ZScore = clientData.stats?.ZScore ZScore = clientData.stats?.ZScore,
Team = clientData.client.Team
}) })
.ToList() .ToList()
}).ToList(); }).ToList();

View File

@ -1,4 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using SharedLibraryCore.Database.Models;
namespace WebfrontCore.ViewModels namespace WebfrontCore.ViewModels
{ {
@ -24,5 +25,6 @@ namespace WebfrontCore.ViewModels
public double? ScorePerMinute { get; set; } public double? ScorePerMinute { get; set; }
public double? Kdr { get; set; } public double? Kdr { get; set; }
public double? ZScore { get; set; } public double? ZScore { get; set; }
public EFClient.TeamType Team { get; set; }
} }
} }

View File

@ -38,7 +38,7 @@
</tr> </tr>
@foreach (var client in Model.ShouldOrderDescending ? Model.ClientInfo.OrderByDescending(OrderByFunc) : Model.ClientInfo.OrderBy(OrderByFunc)) @foreach (var client in Model.ShouldOrderDescending ? Model.ClientInfo.OrderByDescending(OrderByFunc) : Model.ClientInfo.OrderBy(OrderByFunc))
{ {
<tr> <tr class="team-@client.Team.ToString().ToLower()-bg">
<td> <td>
<a asp-controller="Client" asp-action="ProfileAsync" asp-route-id="@client.ClientId"> <a asp-controller="Client" asp-action="ProfileAsync" asp-route-id="@client.ClientId">
<color-code value="@client.ClientName"></color-code> <color-code value="@client.ClientName"></color-code>

View File

@ -455,3 +455,11 @@ div.card {
padding-right: 1rem !important; padding-right: 1rem !important;
line-height: 1.45rem !important; line-height: 1.45rem !important;
} }
.team-allies-bg {
background-color: rgba(0, 0, 139, 0.1);
}
.team-axis-bg {
background-color: rgba(139, 0, 0, 0.1);
}