add localized level names
intellisense suggestion junk
This commit is contained in:
@ -37,9 +37,9 @@ namespace WebfrontCore.Controllers.API
|
||||
player.Name,
|
||||
player.Score,
|
||||
player.Ping,
|
||||
player.State,
|
||||
State = player.State.ToString(),
|
||||
player.ClientNumber,
|
||||
player.ConnectionTime,
|
||||
ConnectionTime = (DateTime.UtcNow - player.ConnectionTime).TotalSeconds,
|
||||
player.Level,
|
||||
})
|
||||
});
|
||||
|
@ -27,7 +27,7 @@ namespace WebfrontCore.Controllers
|
||||
var clientDto = new PlayerInfo()
|
||||
{
|
||||
Name = client.Name,
|
||||
Level = client.Level.ToString(),
|
||||
Level = client.Level.ToLocalizedLevelName(),
|
||||
LevelInt = (int)client.Level,
|
||||
ClientId = client.ClientId,
|
||||
IPAddress = client.IPAddressString,
|
||||
@ -148,7 +148,7 @@ namespace WebfrontCore.Controllers
|
||||
var clientsDto = clients.Select(c => new PlayerInfo()
|
||||
{
|
||||
Name = c.Name,
|
||||
Level = c.Level.ToString(),
|
||||
Level = c.Level.ToLocalizedLevelName(),
|
||||
LevelInt = (int)c.Level,
|
||||
ClientId = c.ClientId,
|
||||
LastSeen = Utilities.GetTimePassed(c.LastConnection, false)
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -31,7 +32,7 @@ namespace WebfrontCore.Controllers
|
||||
{
|
||||
Name = p.Name,
|
||||
ClientId = p.ClientId,
|
||||
Level = p.Level.ToString(),
|
||||
Level = p.Level.ToLocalizedLevelName(),
|
||||
LevelInt = (int)p.Level
|
||||
}).ToList(),
|
||||
ChatHistory = s.ChatHistory,
|
||||
|
@ -14,7 +14,7 @@ namespace WebfrontCore
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
private IHostingEnvironment _appHost;
|
||||
private readonly IHostingEnvironment _appHost;
|
||||
public static IConfigurationRoot Configuration { get; private set; }
|
||||
|
||||
public Startup(IHostingEnvironment env)
|
||||
|
@ -20,7 +20,7 @@ namespace WebfrontCore.ViewComponents
|
||||
OffenderName = p.Offender.Name,
|
||||
PunisherId = p.PunisherId,
|
||||
PunisherName = p.Punisher.Name,
|
||||
PunisherLevel = p.Punisher.Level.ToString(),
|
||||
PunisherLevel = p.Punisher.Level.ToLocalizedLevelName(),
|
||||
#if DEBUG
|
||||
Offense = !string.IsNullOrEmpty(p.AutomatedOffense) ? p.AutomatedOffense : p.Offense,
|
||||
#else
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using System.Linq;
|
||||
|
||||
@ -24,7 +25,7 @@ namespace WebfrontCore.ViewComponents
|
||||
{
|
||||
Name = p.Name,
|
||||
ClientId = p.ClientId,
|
||||
Level = p.Level.ToString(),
|
||||
Level = p.Level.ToLocalizedLevelName(),
|
||||
LevelInt = (int)p.Level
|
||||
}).ToList(),
|
||||
ChatHistory = s.ChatHistory,
|
||||
|
Reference in New Issue
Block a user