add game name to dropdown list on web console

This commit is contained in:
RaidMax 2022-12-22 19:37:56 -06:00
parent d0f72390fb
commit ef5e36b224
2 changed files with 3 additions and 2 deletions

View File

@ -24,6 +24,7 @@ namespace WebfrontCore.Controllers
{
Name = s.Hostname,
ID = s.EndPoint,
Game = (Data.Models.Reference.Game)s.GameName
});
ViewBag.Description = Localization["WEFBRONT_DESCRIPTION_CONSOLE"];

View File

@ -39,9 +39,9 @@
<div class="card m-0 rounded">
<div class="input-group mb-10">
<div class="input-group-prepend">
<span class="input-group-text">@ViewBag.Localization["WEBFRONT_CONSOLE_FORM_SERVER"]</span>
<div class="input-group-text">@ViewBag.Localization["WEBFRONT_CONSOLE_FORM_SERVER"]</div>
</div>
@Html.DropDownList("Server", Model.Select(s => new SelectListItem { Text = s.Name.StripColors(), Value = s.ID.ToString() }).ToList(), new { @class = "form-control", id = "console_server_select" })
@Html.DropDownList("Server", Model.Select(server => new SelectListItem { Text = $"[{server.Game}] {server.Name.StripColors()}", Value = server.ID.ToString() }).ToList(), new { @class = "form-control", id = "console_server_select" })
</div>
<div class="input-group">
<input id="console_command_value" class="form-control" placeholder="@ViewBag.Localization["WEBFRONT_CONSOLE_FORM_PLACEHOLDER_COMMAND"]" type="text" required="required"/>