update webfront translation strings
This commit is contained in:
parent
a6c0a94f6c
commit
2fca68a7ea
@ -24,7 +24,7 @@ namespace WebfrontCore.Controllers
|
||||
{
|
||||
if (clientId == 0 || string.IsNullOrEmpty(password))
|
||||
{
|
||||
return Unauthorized("Invalid credentials");
|
||||
return Unauthorized(Localization["WEBFRONT_ACTION_LOGIN_ERROR"]);
|
||||
}
|
||||
|
||||
try
|
||||
@ -73,16 +73,16 @@ namespace WebfrontCore.Controllers
|
||||
: HttpContext.Connection.RemoteIpAddress?.ToString()
|
||||
});
|
||||
|
||||
return Ok($"Welcome {privilegedClient.Name}. You are now logged in");
|
||||
return Ok(Localization["WEBFRONT_ACTION_LOGIN_SUCCESS"].FormatExt(privilegedClient.CleanedName));
|
||||
}
|
||||
}
|
||||
|
||||
catch (Exception)
|
||||
{
|
||||
return Unauthorized("Could not validate credentials");
|
||||
return Unauthorized(Localization["WEBFRONT_ACTION_LOGIN_ERROR"]);
|
||||
}
|
||||
|
||||
return Unauthorized("Invalid credentials");
|
||||
return Unauthorized(Localization["WEBFRONT_ACTION_LOGIN_ERROR"]);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
|
@ -78,7 +78,7 @@ namespace WebfrontCore.Controllers
|
||||
var info = new ActionInfo
|
||||
{
|
||||
ActionButtonLabel = Localization["WEBFRONT_ACTION_BAN_NAME"],
|
||||
Name = "Ban",
|
||||
Name = Localization["WEBFRONT_ACTION_BAN_NAME"],
|
||||
Inputs = new List<InputInfo>
|
||||
{
|
||||
new()
|
||||
@ -152,7 +152,7 @@ namespace WebfrontCore.Controllers
|
||||
var info = new ActionInfo
|
||||
{
|
||||
ActionButtonLabel = Localization["WEBFRONT_ACTION_UNBAN_NAME"],
|
||||
Name = "Unban",
|
||||
Name = Localization["WEBFRONT_ACTION_UNBAN_NAME"],
|
||||
Inputs = new List<InputInfo>
|
||||
{
|
||||
new()
|
||||
@ -193,7 +193,7 @@ namespace WebfrontCore.Controllers
|
||||
var login = new ActionInfo
|
||||
{
|
||||
ActionButtonLabel = Localization["WEBFRONT_ACTION_LOGIN_NAME"],
|
||||
Name = "Login",
|
||||
Name = Localization["WEBFRONT_ACTION_LOGIN_NAME"],
|
||||
Inputs = new List<InputInfo>
|
||||
{
|
||||
new()
|
||||
@ -226,7 +226,7 @@ namespace WebfrontCore.Controllers
|
||||
var info = new ActionInfo
|
||||
{
|
||||
ActionButtonLabel = Localization["WEBFRONT_ACTION_LABEL_EDIT"],
|
||||
Name = "Edit",
|
||||
Name = Localization["WEBFRONT_ACTION_LABEL_EDIT"],
|
||||
Inputs = new List<InputInfo>
|
||||
{
|
||||
new()
|
||||
@ -291,7 +291,7 @@ namespace WebfrontCore.Controllers
|
||||
var info = new ActionInfo
|
||||
{
|
||||
ActionButtonLabel = Localization["WEBFRONT_ACTION_LABEL_SUBMIT_MESSAGE"],
|
||||
Name = "Chat",
|
||||
Name = Localization["WEBFRONT_ACTION_LABEL_SUBMIT_MESSAGE"],
|
||||
Inputs = new List<InputInfo>
|
||||
{
|
||||
new()
|
||||
@ -367,7 +367,7 @@ namespace WebfrontCore.Controllers
|
||||
var info = new ActionInfo
|
||||
{
|
||||
ActionButtonLabel = Localization["WEBFRONT_ACTION_FLAG_NAME"],
|
||||
Name = "Flag",
|
||||
Name = Localization["WEBFRONT_ACTION_FLAG_NAME"],
|
||||
Inputs = new List<InputInfo>
|
||||
{
|
||||
new()
|
||||
@ -406,7 +406,7 @@ namespace WebfrontCore.Controllers
|
||||
var info = new ActionInfo
|
||||
{
|
||||
ActionButtonLabel = Localization["WEBFRONT_ACTION_UNFLAG_NAME"],
|
||||
Name = "Unflag",
|
||||
Name = Localization["WEBFRONT_ACTION_UNFLAG_NAME"],
|
||||
Inputs = new List<InputInfo>
|
||||
{
|
||||
new()
|
||||
@ -438,7 +438,7 @@ namespace WebfrontCore.Controllers
|
||||
var info = new ActionInfo
|
||||
{
|
||||
ActionButtonLabel = Localization["WEBFRONT_ACTION_KICK_NAME"],
|
||||
Name = "Kick",
|
||||
Name = Localization["WEBFRONT_ACTION_KICK_NAME"],
|
||||
Inputs = new List<InputInfo>
|
||||
{
|
||||
new()
|
||||
@ -488,7 +488,7 @@ namespace WebfrontCore.Controllers
|
||||
var info = new ActionInfo
|
||||
{
|
||||
ActionButtonLabel = "Dismiss",
|
||||
Name = "Dismiss Alert?",
|
||||
Name = Localization["WEBFRONT_ACTION_DISMISS_ALERT_SINGLE"],
|
||||
Inputs = new List<InputInfo>
|
||||
{
|
||||
new()
|
||||
@ -512,7 +512,7 @@ namespace WebfrontCore.Controllers
|
||||
{
|
||||
new CommandResponseInfo
|
||||
{
|
||||
Response = "Alert dismissed"
|
||||
Response = Localization["WEBFRONT_ACTION_DISMISS_ALERT_SINGLE_RESPONSE"]
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -522,7 +522,7 @@ namespace WebfrontCore.Controllers
|
||||
var info = new ActionInfo
|
||||
{
|
||||
ActionButtonLabel = "Dismiss",
|
||||
Name = "Dismiss All Alerts?",
|
||||
Name = Localization["WEBFRONT_ACTION_DISMISS_ALERT_MANY"],
|
||||
Inputs = new List<InputInfo>
|
||||
{
|
||||
new()
|
||||
@ -546,7 +546,7 @@ namespace WebfrontCore.Controllers
|
||||
{
|
||||
new CommandResponseInfo
|
||||
{
|
||||
Response = "Alerts dismissed"
|
||||
Response = Localization["WEBFRONT_ACTION_DISMISS_ALERT_MANY_RESPONSE"]
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -556,7 +556,7 @@ namespace WebfrontCore.Controllers
|
||||
var info = new ActionInfo
|
||||
{
|
||||
ActionButtonLabel = "Send",
|
||||
Name = "Compose Message",
|
||||
Name = Localization["WEBFRONT_ACTION_OFFLINE_MESSAGE_BUTTON_COMPOSE"],
|
||||
Inputs = new List<InputInfo>
|
||||
{
|
||||
new()
|
||||
|
@ -56,7 +56,7 @@ namespace WebfrontCore.Controllers
|
||||
ViewBag.ClientIP = request.ClientIP;
|
||||
ViewBag.ClientGuid = request.ClientGuid;
|
||||
|
||||
ViewBag.Title = "Ban Management";
|
||||
ViewBag.Title = Localization["WEBFRONT_NAV_TITLE_BAN_MANAGEMENT"];
|
||||
|
||||
return View(results.Results);
|
||||
}
|
||||
|
@ -146,12 +146,8 @@ namespace WebfrontCore.Controllers
|
||||
clientDto.Meta.AddRange(Authorized ? meta : meta.Where(m => !m.IsSensitive));
|
||||
|
||||
var strippedName = clientDto.Name.StripColors();
|
||||
ViewBag.Title = strippedName.Substring(strippedName.Length - 1).ToLower()[0] == 's'
|
||||
? strippedName + "'"
|
||||
: strippedName + "'s";
|
||||
ViewBag.Title += " " + Localization["WEBFRONT_CLIENT_PROFILE_TITLE"];
|
||||
ViewBag.Description = $"Client information for {strippedName}";
|
||||
ViewBag.Keywords = $"IW4MAdmin, client, profile, {strippedName}";
|
||||
ViewBag.Title = $"{strippedName} | {Localization["WEBFRONT_CLIENT_PROFILE_TITLE"]}";
|
||||
ViewBag.Description = Localization["WEBFRONT_PROFILE_DESCRIPTION"].FormatExt(strippedName);
|
||||
ViewBag.UseNewStats = _config?.EnableAdvancedMetrics ?? true;
|
||||
|
||||
return View("Profile/Index", clientDto);
|
||||
|
@ -100,7 +100,7 @@ namespace WebfrontCore.Controllers
|
||||
new CommandResponseInfo
|
||||
{
|
||||
ClientId = client.ClientId,
|
||||
Response = Utilities.CurrentLocalization.LocalizationIndex["COMMADS_RESTART_SUCCESS"]
|
||||
Response = Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_RESTART_SUCCESS"]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ public class BanInfoResourceQueryHelper : IResourceQueryHelper<BanInfoRequest, B
|
||||
OffenderName = penalty.Penalty.Offender.CurrentAlias.Name,
|
||||
Offense = string.IsNullOrEmpty(penalty.Penalty.AutomatedOffense)
|
||||
? penalty.Penalty.Offense
|
||||
: "Anticheat Detection",
|
||||
: Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_BAN_INFO_AC_DETECTION"],
|
||||
LinkId = penalty.Penalty.Offender.AliasLinkId,
|
||||
penalty.Penalty.OffenderId,
|
||||
penalty.Penalty.PunisherId,
|
||||
@ -113,7 +113,7 @@ public class BanInfoResourceQueryHelper : IResourceQueryHelper<BanInfoRequest, B
|
||||
OffenderName = penalty.Offender.CurrentAlias.Name,
|
||||
Offense = string.IsNullOrEmpty(penalty.AutomatedOffense)
|
||||
? penalty.Offense
|
||||
: "Anticheat Detection",
|
||||
: Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_BAN_INFO_AC_DETECTION"],
|
||||
LinkId = penalty.Offender.AliasLinkId,
|
||||
penalty.OffenderId,
|
||||
penalty.PunisherId,
|
||||
|
@ -61,6 +61,6 @@
|
||||
}
|
||||
<div class="ml-auto">
|
||||
<button type="submit" class="btn btn-primary">@Model.ActionButtonLabel</button>
|
||||
<a href="#" class="btn mr-5 ml-5" role="button" onclick="halfmoon.toggleModal('actionModal');">Close</a>
|
||||
<a href="#" class="btn mr-5 ml-5" role="button" onclick="halfmoon.toggleModal('actionModal');">@ViewBag.Localization["WEBFRONT_ACTION_MODAL_BUTTON_CLOSE"]</a>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<form method="get" class="mt-10">
|
||||
<div class="d-flex flex-column flex-md-row">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control bg-dark-dm bg-light-ex-lm" id="clientNameInput" name="clientName" value="@ViewBag.ClientName" placeholder="Client Name">
|
||||
<input type="text" class="form-control bg-dark-dm bg-light-ex-lm" id="clientNameInput" name="clientName" value="@ViewBag.ClientName" placeholder="@ViewBag.Localization["WEBFRONT_BAN_MGMT_FORM_NAME"]">
|
||||
<div class="input-group-append">
|
||||
<button class="btn bg-dark-dm bg-light-ex-lm" type="submit">
|
||||
<i class="oi oi-magnifying-glass"></i>
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
</div>
|
||||
<div class="input-group mr-md-5 ml-md-10 mt-10 mb-5 mt-md-0 mb-md-0">
|
||||
<input type="text" class="form-control bg-dark-dm bg-light-ex-lm" id="clientGuidInput" name="clientGuid" value="@ViewBag.ClientGuid" placeholder="Client GUID">
|
||||
<input type="text" class="form-control bg-dark-dm bg-light-ex-lm" id="clientGuidInput" name="clientGuid" value="@ViewBag.ClientGuid" placeholder="@ViewBag.Localization["WEBFRONT_BAN_MGMT_FORM_GUID"]">
|
||||
<div class="input-group-append">
|
||||
<button class="btn bg-dark-dm bg-light-ex-lm" type="submit">
|
||||
<i class="oi oi-magnifying-glass"></i>
|
||||
@ -26,7 +26,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mr-md-10 ml-md-5 mb-10 mt-5 mt-md-0 mb-md-0">
|
||||
<input type="text" class="form-control bg-dark-dm bg-light-ex-lm" id="clientIPInput" name="clientIP" value="@ViewBag.ClientIP" placeholder="Client IP">
|
||||
<input type="text" class="form-control bg-dark-dm bg-light-ex-lm" id="clientIPInput" name="clientIP" value="@ViewBag.ClientIP" placeholder="@ViewBag.Localization["WEBFRONT_BAN_MGMT_FORM_IP"]">
|
||||
<div class="input-group-append">
|
||||
<button class="btn bg-dark-dm bg-light-ex-lm" type="submit">
|
||||
<i class="oi oi-magnifying-glass"></i>
|
||||
@ -34,7 +34,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control bg-dark-dm bg-light-ex-lm" id="clientIdInput" name="clientId" value="@ViewBag.ClientId" placeholder="Client Id">
|
||||
<input type="number" class="form-control bg-dark-dm bg-light-ex-lm" id="clientIdInput" name="clientId" value="@ViewBag.ClientId" placeholder="@ViewBag.Localization["WEBFRONT_BAN_MGMT_FORM_ID"]">
|
||||
<div class="input-group-append">
|
||||
<button class="btn bg-dark-dm bg-light-ex-lm" type="submit">
|
||||
<i class="oi oi-magnifying-glass"></i>
|
||||
|
@ -27,13 +27,13 @@
|
||||
{
|
||||
<div class="text-muted font-weight-light">@ban.AttachedPenalty.Offense.CapClientName(30)</div>
|
||||
<div class="text-danger font-weight-light">@ban.AttachedPenalty.DateTime.ToStandardFormat()</div>
|
||||
<div class="btn profile-action w-100" data-action="unban" data-action-id="@ban.ClientId">Unban</div>
|
||||
<div class="btn profile-action w-100" data-action="unban" data-action-id="@ban.ClientId">@ViewBag.Localization["WEBFRONT_BAN_MGMT_ACTION_UNBAN"]</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="align-self-end text-muted font-weight-light">
|
||||
<span class="oi oi-warning font-size-12"></span>
|
||||
<span>Link-Only Ban</span>
|
||||
<span>@ViewBag.Localization["WEBFRONT_BAN_MGMT_LINK_ONLY"]</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@ -43,7 +43,7 @@
|
||||
@foreach (var associatedEntity in ban.AssociatedPenalties)
|
||||
{
|
||||
<div class="d-flex flex-wrap flex-column w-full w-md-200 p-10">
|
||||
<div data-toggle="tooltip" data-title="Linked via shared IP" class="d-flex">
|
||||
<div data-toggle="tooltip" data-title="@ViewBag.Localization["WEBFRONT_BAN_MGMT_TOOLTIP_LINKED"]" class="d-flex">
|
||||
<i class="oi oi-link-intact align-self-center"></i>
|
||||
<div class="text-truncate ml-5 mr-5">
|
||||
<a asp-controller="Client" asp-action="Profile" asp-route-id="@associatedEntity.OffenderInfo.ClientId" class="font-size-18 no-decoration">@associatedEntity.OffenderInfo.ClientName</a>
|
||||
@ -62,7 +62,7 @@
|
||||
<br/>
|
||||
<div class="text-muted font-weight-light">@associatedEntity.Offense.CapClientName(30)</div>
|
||||
<div class="text-danger font-weight-light">@associatedEntity.DateTime.ToStandardFormat()</div>
|
||||
<div class="btn profile-action mt-10 w-100" data-action="unban" data-action-id="@associatedEntity.OffenderInfo.ClientId">Unban</div>
|
||||
<div class="btn profile-action mt-10 w-100" data-action="unban" data-action-id="@associatedEntity.OffenderInfo.ClientId">@ViewBag.Localization["WEBFRONT_BAN_MGMT_ACTION_UNBAN"]</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
@ -34,7 +34,7 @@
|
||||
@info.NewValue
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@info.When.ToString()
|
||||
@info.When.ToStandardFormat()
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
}
|
||||
<div class="mt-5 mb-5"> @info.Data</div>
|
||||
<div class="mt-5 mb-5">@info.NewValue</div>
|
||||
<div class="mt-5 mb-5">@info.When.ToString()</div>
|
||||
<div class="mt-5 mb-5">@info.When</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
@ -5,8 +5,31 @@
|
||||
|
||||
<!-- desktop -->
|
||||
<div class="content mt-0">
|
||||
<h2 class="content-title mt-20 mb-0">Search Results</h2>
|
||||
<div class="text-muted mb-15"><span class="badge">@ViewBag.SearchTerm</span> returned <span class="text-primary">@ViewBag.ResultCount</span> matche(s)</div>
|
||||
<h2 class="content-title mt-20 mb-0">@ViewBag.Localization["WEBFRONT_SEARCH_RESULTS_TITLE"]</h2>
|
||||
<div class="text-muted mb-15">
|
||||
|
||||
@foreach (var match in Utilities.SplitTranslationTokens("WEBFRONT_SEARCH_RESULTS_SUBTITLE_FORMAT"))
|
||||
{
|
||||
if (match.IsInterpolation)
|
||||
{
|
||||
if (match.MatchValue == "searchTerm")
|
||||
{
|
||||
<span class="badge">
|
||||
@ViewBag.SearchTerm
|
||||
</span>
|
||||
}
|
||||
|
||||
else if (match.MatchValue == "searchCount")
|
||||
{
|
||||
<span class="text-primary">@ViewBag.ResultCount</span>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@match.MatchValue</span>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
<table class="table d-none d-md-table">
|
||||
<thead>
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
else
|
||||
{
|
||||
<h2 class="content-title mt-20 mb-0">Search Results</h2>
|
||||
<h2 class="content-title mt-20 mb-0">@ViewBag.Localization["WEBFRONT_SEARCH_RESULTS_TITLE"]</h2>
|
||||
<div class="text-muted mb-15">@Html.Raw(Utilities.FormatExt(ViewBag.Localization["WEBFRONT_STATS_MESSAGES_FOUND"], $"<span class=\"badge\">{Model.TotalResultCount.ToString("N0")}</span>"))</div>
|
||||
|
||||
<table class="table bg-dark-dm bg-light-lm rounded" style="table-layout: fixed">
|
||||
|
@ -53,8 +53,7 @@
|
||||
<div>
|
||||
<color-code value="@(message.ServerName ?? "--")"></color-code>
|
||||
</div>
|
||||
<div> @message.When</div>
|
||||
|
||||
<div>@message.When</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
<tr class="level-bgcolor-@((int)key)">
|
||||
<th class="text-light">@key.ToLocalizedLevelName()</th>
|
||||
<th>Game</th>
|
||||
<th class="text-right font-weight-bold">Last Connected</th>
|
||||
<th class="text-right font-weight-bold">@ViewBag.Localization["WEBFRONT_SEARCH_LAST_CONNECTED"]</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -25,11 +25,11 @@
|
||||
<td>
|
||||
@if (client.IsMasked)
|
||||
{
|
||||
<span data-toggle="tooltip" data-title="Client is masked">
|
||||
<span data-toggle="tooltip" data-title="@ViewBag.Localization["WEBFRONT_PRIVILEGED_TOOLTIP_MASKED"]">
|
||||
<span class="oi oi-shield mr-5 font-size-12"></span>
|
||||
</span>
|
||||
}
|
||||
|
||||
|
||||
<a asp-controller="Client" asp-action="Profile" asp-route-id="@client.ClientId">
|
||||
<color-code value="@client.Name"></color-code>
|
||||
</a>
|
||||
@ -46,5 +46,4 @@
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
@ -58,7 +58,7 @@
|
||||
</has-permission>
|
||||
}
|
||||
|
||||
<h2 class="content-title mb-0">Player Profile</h2>
|
||||
<h2 class="content-title mb-0">@ViewBag.Localization["WEBFRONT_PROFILE_TITLE"]</h2>
|
||||
<div class="font-size-12 text-muted">@ViewBag.Localization[$"GAME_{Model.Game}"]</div>
|
||||
|
||||
<div id="profile_wrapper" class="mb-10 mt-10">
|
||||
@ -66,7 +66,7 @@
|
||||
<!-- online status indicator -->
|
||||
@if (Model.Online)
|
||||
{
|
||||
<div class="bg-success rounded-circle position-absolute status-indicator z-20 mt-10 ml-10" data-toggle="tooltip" data-placement="bottom" data-title="Client is online"></div>
|
||||
<div class="bg-success rounded-circle position-absolute status-indicator z-20 mt-10 ml-10" data-toggle="tooltip" data-placement="bottom" data-title="@ViewBag.Localization["WEBFRONT_PROFILE_TOOLTIP_ONLINE"]"></div>
|
||||
<div class="bg-success rounded-circle position-absolute status-indicator with-ripple z-10 mt-10 ml-10"></div>
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@
|
||||
@if (Model.Aliases.Count > 15)
|
||||
{
|
||||
<div class="dropdown-divider"></div>
|
||||
<span class="dropdown-item bg-dark-dm bg-light-lm">...and @(Model.Aliases.Count - 15) more</span>
|
||||
<span class="dropdown-item bg-dark-dm bg-light-lm">@((ViewBag.Localization["WEBFRONT_PROFILE_ALIAS_COUNT_MORE_FORMAT"] as string).FormatExt(Model.Aliases.Count - 15))</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@ -126,7 +126,7 @@
|
||||
<div class="text-muted" data-toggle="dropdown" id="altGuidFormatsDropdown" aria-haspopup="true" aria-expanded="false">@Model.NetworkId.ToString("X")</div>
|
||||
<div class="dropdown-menu" aria-labelledby="altGuidFormatsDropdown">
|
||||
<div class="p-10 font-size-12">
|
||||
<div class="">Alternative Formats</div>
|
||||
<div class="">@ViewBag.Localization["WEBFRONT_PROFILE_POPOVER_ALTERNATIVE_GUID"]</div>
|
||||
<div class="dropdown-divider mt-5 mb-5"></div>
|
||||
<div class="text-muted font-weight-lighter">@((ulong)Model.NetworkId)</div>
|
||||
</div>
|
||||
@ -164,7 +164,7 @@
|
||||
@if (Model.IPs.Count > 15)
|
||||
{
|
||||
<div class="dropdown-divider"></div>
|
||||
<span class="dropdown-item bg-dark-dm bg-light-lm">...and @(Model.IPs.Count - 15) more</span>
|
||||
<span class="dropdown-item bg-dark-dm bg-light-lm">@((ViewBag.Localization["WEBFRONT_PROFILE_ALIAS_COUNT_MORE_FORMAT"] as string).FormatExt(Model.Aliases.Count - 15))</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@ -252,18 +252,18 @@
|
||||
@{
|
||||
var menuItems = new SideContextMenuItems
|
||||
{
|
||||
MenuTitle = "Actions",
|
||||
MenuTitle = ViewBag.Localization["WEBFRONT_PROFILE_CONTEXT_MENU_TITLE"]
|
||||
};
|
||||
|
||||
if (Model.Online)
|
||||
{
|
||||
menuItems.Items.Add(new SideContextMenuItem
|
||||
{
|
||||
Title = "Join Game",
|
||||
Title = ViewBag.Localization["WEBFRONT_PROFILE_CONTEXT_MENU_ACTION_JOIN"],
|
||||
IsLink = true,
|
||||
IsButton = true,
|
||||
Reference = Model.ConnectProtocolUrl,
|
||||
Tooltip = $"Playing on {Model.CurrentServerName.StripColors()}",
|
||||
Tooltip = (ViewBag.Localization["WEBFRONT_PROFILE_CONTEXT_MENU_TOOLTIP_JOIN"] as string).FormatExt(Model.CurrentServerName.StripColors()),
|
||||
Icon = "oi-play-circle"
|
||||
});
|
||||
}
|
||||
@ -272,7 +272,7 @@
|
||||
{
|
||||
menuItems.Items.Add(new SideContextMenuItem
|
||||
{
|
||||
Title = "Change Level",
|
||||
Title = ViewBag.Localization["WEBFRONT_PROFILE_CONTEXT_MENU_ACTION_LEVEL"],
|
||||
IsButton = true,
|
||||
Reference = "edit",
|
||||
Icon = "oi-cog",
|
||||
@ -284,7 +284,7 @@
|
||||
{
|
||||
menuItems.Items.Add(new SideContextMenuItem
|
||||
{
|
||||
Title = "Message",
|
||||
Title = ViewBag.Localization["WEBFRONT_PROFILE_CONTEXT_MENU_ACTION_MESSAGE"],
|
||||
IsButton = true,
|
||||
Reference = "OfflineMessage",
|
||||
Icon = "oi oi-envelope-closed",
|
||||
@ -294,7 +294,7 @@
|
||||
|
||||
menuItems.Items.Add(new SideContextMenuItem
|
||||
{
|
||||
Title = "View Stats",
|
||||
Title = ViewBag.Localization["WEBFRONT_PROFILE_CONTEXT_MENU_ACTION_STATS"],
|
||||
IsButton = true,
|
||||
IsLink = true,
|
||||
Reference = Url.Action("Advanced", "ClientStatistics", new { id = Model.ClientId }),
|
||||
@ -305,7 +305,7 @@
|
||||
{
|
||||
menuItems.Items.Add(new SideContextMenuItem
|
||||
{
|
||||
Title = isFlagged ? "Unflag" : "Flag",
|
||||
Title = isFlagged ? ViewBag.Localization["WEBFRONT_ACTION_UNFLAG_NAME"] : ViewBag.Localization["WEBFRONT_ACTION_FLAG_NAME"],
|
||||
IsButton = true,
|
||||
Reference = isFlagged ? "unflag" : "flag",
|
||||
Icon = "oi-flag",
|
||||
@ -317,7 +317,7 @@
|
||||
{
|
||||
menuItems.Items.Add(new SideContextMenuItem
|
||||
{
|
||||
Title = "Kick",
|
||||
Title = ViewBag.Localization["WEBFRONT_ACTION_KICK_NAME"],
|
||||
IsButton = true,
|
||||
Reference = "kick",
|
||||
Icon = "oi-circle-x",
|
||||
@ -329,7 +329,7 @@
|
||||
{
|
||||
menuItems.Items.Add(new SideContextMenuItem
|
||||
{
|
||||
Title = "Ban",
|
||||
Title = ViewBag.Localization["WEBFRONT_ACTION_BAN_NAME"],
|
||||
IsButton = true,
|
||||
Reference = "ban",
|
||||
Icon = "oi-lock-unlocked",
|
||||
@ -341,7 +341,7 @@
|
||||
{
|
||||
menuItems.Items.Add(new SideContextMenuItem
|
||||
{
|
||||
Title = "Unban",
|
||||
Title = ViewBag.Localization["WEBFRONT_ACTION_UNBAN_NAME"],
|
||||
IsButton = true,
|
||||
Reference = "unban",
|
||||
Icon = "oi-lock-locked",
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
@{var results = Utilities.SplitTranslationTokens(meta.meta.Key);}
|
||||
|
||||
@if (results.Any(_result => _result.IsInterpolation))
|
||||
@if (results.Any(result => result.IsInterpolation))
|
||||
{
|
||||
foreach (var result in results)
|
||||
{
|
||||
|
@ -7,7 +7,7 @@
|
||||
}
|
||||
|
||||
<span class="client-message" data-serverid="@Model.ServerId" data-when="@Model.When.ToFileTimeUtc()">
|
||||
<span data-title="View Context" data-toggle="tooltip" data-placement="right">
|
||||
<span data-title="@ViewBag.Localization["WEBFRONT_META_TOOLTIP_CONTEXT"]" data-toggle="tooltip" data-placement="right">
|
||||
<span class="oi oi-chevron-right align-middle client-message-prefix" style="font-size: 0.75rem; margin-top: -0.256rem"></span>
|
||||
</span>
|
||||
<span class="text-muted @(Model.IsQuickMessage ? "font-weight-bold" : "")">
|
||||
|
@ -10,7 +10,7 @@
|
||||
@model Stats.Dtos.AdvancedStatsInfo
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Advanced Client Statistics";
|
||||
ViewBag.Title = ViewBag.Localization["WEBFRONT_ADV_STATS_TITLE"];
|
||||
ViewBag.Description = Model.ClientName.StripColors();
|
||||
|
||||
const string headshotKey = "MOD_HEAD_SHOT";
|
||||
@ -233,7 +233,7 @@
|
||||
<div class="content row mt-20">
|
||||
<!-- main content -->
|
||||
<div class="col-12 col-lg-9 mt-0">
|
||||
<h2 class="content-title mb-0">Player Stats</h2>
|
||||
<h2 class="content-title mb-0">@ViewBag.Title</h2>
|
||||
<span class="text-muted">
|
||||
<color-code value="@(Model.Servers.FirstOrDefault(server => server.Endpoint == Model.ServerEndpoint)?.Name ?? ViewBag.Localization["WEBFRONT_STATS_INDEX_ALL_SERVERS"])"></color-code>
|
||||
</span>
|
||||
@ -263,6 +263,7 @@
|
||||
{
|
||||
<div class="h5 mb-0">@ViewBag.Localization["WEBFRONT_ADV_STATS_EXPIRED"]</div>
|
||||
}
|
||||
|
||||
if (Model.ServerId != null)
|
||||
{
|
||||
<div class="h5 mb-0">@Html.Raw((ViewBag.Localization["WEBFRONT_ADV_STATS_PERFORMANCE"] as string).FormatExt($"<span class=\"text-primary\">{performance.ToNumericalString()}</span>"))</div>
|
||||
@ -375,7 +376,8 @@
|
||||
@{
|
||||
var menuItems = new SideContextMenuItems
|
||||
{
|
||||
MenuTitle = "Game", Items = Model.Servers.Select(server => new SideContextMenuItem
|
||||
MenuTitle = ViewBag.Localization["WEBFRONT_CONTEXT_MENU_GLOBAL_GAME"],
|
||||
Items = Model.Servers.Select(server => new SideContextMenuItem
|
||||
{
|
||||
IsLink = true,
|
||||
Reference = Url.Action("Advanced", "ClientStatistics", new { serverId = server.Endpoint }),
|
||||
|
@ -12,7 +12,7 @@
|
||||
<i class="oi oi-timer align-self-center mb-10" style="font-size: 6rem;"></i>
|
||||
<div class="p-15">
|
||||
<h2 class="content-title mb-0">@Utilities.CurrentLocalization.LocalizationIndex["PLUGINS_STATS_TEXT_NOQUALIFY"]</h2>
|
||||
<span class="text-muted">Check back after some more time has passed</span>
|
||||
<span class="text-muted">@ViewBag.Localization["WEBFRONT_TOP_PLAYERS_NOQUALIFY_SUBTITLE"]</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -3,12 +3,12 @@
|
||||
|
||||
<div class="content mt-20 row">
|
||||
<div class="col-12 col-lg-9 mt-0">
|
||||
<h2 class="content-title mb-0">Top Players</h2>
|
||||
<h2 class="content-title mb-0">@ViewBag.Localization["WEBFRONT_TOP_PLAYERS_TITLE"]</h2>
|
||||
<span class="text-muted">
|
||||
<color-code value="@(Model.FirstOrDefault(m => m.Endpoint == ViewBag.SelectedServerId)?.Name ?? ViewBag.Localization["WEBFRONT_STATS_INDEX_ALL_SERVERS"])"></color-code>
|
||||
— <span class="text-primary">@ViewBag.TotalRankedClients.ToString("#,##0")</span> Ranked Players
|
||||
</span>
|
||||
|
||||
|
||||
<div id="topPlayersContainer">
|
||||
@await Component.InvokeAsync("TopPlayers", new { count = 25, offset = 0, serverEndpoint = ViewBag.SelectedServerId })
|
||||
</div>
|
||||
@ -21,7 +21,8 @@
|
||||
@{
|
||||
var menuItems = new SideContextMenuItems
|
||||
{
|
||||
MenuTitle = "Game", Items = Model.Select(server => new SideContextMenuItem
|
||||
MenuTitle = ViewBag.Localization["WEBFRONT_CONTEXT_MENU_GLOBAL_GAME"],
|
||||
Items = Model.Select(server => new SideContextMenuItem
|
||||
{
|
||||
IsLink = true,
|
||||
Reference = Url.Action("TopPlayers", "Stats", new { serverId = server.Endpoint }),
|
||||
|
@ -25,7 +25,7 @@
|
||||
</div>
|
||||
<div class="edit-file d-none flex-column" id="edit_file_@FormatHtmlId(file.FileName)" data-file-name="@file.FileName">
|
||||
<pre class="mt-0 font-size-12 flex-fill border-bottom" spellcheck="false"><code class="code language-json editable" contenteditable="true" id="edit_file_code_@FormatHtmlId(file.FileName)">@file.FileContent</code></pre>
|
||||
<button type="button" class="btn btn-primary m-15 mt-0 align-self-start file-save-button" data-file-name="@file.FileName">Save</button>
|
||||
<button type="button" class="btn btn-primary m-15 mt-0 align-self-start file-save-button" data-file-name="@file.FileName">@ViewBag.Localization["WEBFRONT_CONFIGURATION_BUTTON_SAVE"]</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
@ -39,12 +39,12 @@
|
||||
<div class="card m-0 rounded">
|
||||
<div class="input-group mb-10">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">Server</span>
|
||||
<span class="input-group-text">@ViewBag.Localization["WEBFRONT_CONSOLE_FORM_SERVER"]</span>
|
||||
</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" })
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input id="console_command_value" class="form-control" placeholder="Enter command..." type="text" required="required"/>
|
||||
<input id="console_command_value" class="form-control" placeholder="@ViewBag.Localization["WEBFRONT_CONSOLE_FORM_PLACEHOLDER_COMMAND"]" type="text" required="required"/>
|
||||
<div class="input-group-append">
|
||||
<button id="console_command_button" class="btn btn-primary">
|
||||
@Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_CONSOLE_EXECUTE"]
|
||||
|
@ -5,7 +5,7 @@
|
||||
<div class="content mt-20">
|
||||
@foreach (var (pluginName, commandList) in Model)
|
||||
{
|
||||
<h2 class="content-title mb-lg-20 mt-20 ">@(pluginName == "Native" ? "Command List" : pluginName)</h2>
|
||||
<h2 class="content-title mb-lg-20 mt-20 ">@(pluginName == "Native" ? ViewBag.Localization["WEBFRONT_HELP_COMMANDS_NATIVE_TITLE"] : pluginName)</h2>
|
||||
|
||||
<table class="table rounded">
|
||||
<thead>
|
||||
|
@ -12,7 +12,7 @@
|
||||
}
|
||||
<div class="content mt-20 row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<h2 class="content-title mb-0">Server Overview</h2>
|
||||
<h2 class="content-title mb-0">@ViewBag.Localization["WEBFRONT_SERVERS_TITLE"]</h2>
|
||||
@if (Model.Game.HasValue)
|
||||
{
|
||||
<span class="text-muted">@loc[$"GAME_{Model.Game.Value}"]</span>
|
||||
@ -31,11 +31,12 @@
|
||||
</div>
|
||||
@await Component.InvokeAsync("ServerList", Model.Game)
|
||||
</div>
|
||||
|
||||
|
||||
@{
|
||||
var menuItems = new SideContextMenuItems
|
||||
{
|
||||
MenuTitle = "Game", Items = Model.ActiveServerGames.Select(game => new SideContextMenuItem
|
||||
MenuTitle = ViewBag.Localization["WEBFRONT_CONTEXT_MENU_GLOBAL_GAME"],
|
||||
Items = Model.ActiveServerGames.Select(game => new SideContextMenuItem
|
||||
{
|
||||
IsLink = true,
|
||||
Reference = Url.Action("Index", "Home", new { game }),
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<div class="content mt-20 row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<h2 class="content-title mb-0">Live Radar</h2>
|
||||
<h2 class="content-title mb-0">@ViewBag.Localization["WEBFRONT_LIVE_RADAR_TITLE"]</h2>
|
||||
<div class="text-muted mb-15">
|
||||
<color-code value="@((Model.FirstOrDefault(server => server.Endpoint == ViewBag.SelectedServerId) ?? Model.First()).Name)"></color-code>
|
||||
</div>
|
||||
@ -36,7 +36,8 @@
|
||||
@{
|
||||
var menuItems = new SideContextMenuItems
|
||||
{
|
||||
MenuTitle = "Game", Items = Model.Select(server => new SideContextMenuItem
|
||||
MenuTitle = ViewBag.Localization["WEBFRONT_CONTEXT_MENU_GLOBAL_GAME"],
|
||||
Items = Model.Select(server => new SideContextMenuItem
|
||||
{
|
||||
IsLink = true,
|
||||
// ReSharper disable Mvc.ActionNotResolved
|
||||
|
@ -16,7 +16,8 @@
|
||||
@{
|
||||
var menuItems = new SideContextMenuItems
|
||||
{
|
||||
MenuTitle = "Server", Items = Model.Select(server => new SideContextMenuItem
|
||||
MenuTitle = ViewBag.Localization["WEBFRONT_CONTEXT_MENU_GLOBAL_SERVER"],
|
||||
Items = Model.Select(server => new SideContextMenuItem
|
||||
{
|
||||
IsLink = true,
|
||||
Reference = Url.Action("Scoreboard", "Server", new { serverId = server.ServerId }),
|
||||
|
@ -3,7 +3,20 @@
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<div class="mb-15 text-center font-weight-lighter">New clients connected in the last <span class="text-primary">24</span> hours</div>
|
||||
<div class="mb-15 text-center font-weight-lighter">
|
||||
@foreach (var match in Utilities.SplitTranslationTokens("WEBFRONT_MODAL_RECENT_CLIENTS_SUBTITLE"))
|
||||
{
|
||||
if (match.IsInterpolation && match.MatchValue == "time")
|
||||
{
|
||||
<span class="text-primary">24</span>
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
<span>@match.MatchValue</span>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
<div id="recentClientContainer">
|
||||
<partial name="~/Views/Shared/Components/Client/_RecentClients.cshtml" for="@Model"/>
|
||||
|
@ -58,7 +58,18 @@
|
||||
<div class="profile-meta-entry loader-data-time" data-time="@meta.When.ToFileTimeUtc()" onclick="$('#metaContextDateToggle@(meta.When.ToFileTimeUtc())').show()">
|
||||
<partial name="~/Views/Client/Profile/Meta/_@(meta.GetType().Name).cshtml" model="meta"/>
|
||||
<div style="display:none" id="metaContextDateToggle@(meta.When.ToFileTimeUtc())">
|
||||
Event occured at <span class="text-light">@meta.When.ToStandardFormat()</span>
|
||||
@foreach (var match in Utilities.SplitTranslationTokens("WEBFRONT_META_TIME_CONTEXT"))
|
||||
{
|
||||
if (match.IsInterpolation && match.MatchValue == "event")
|
||||
{
|
||||
<span class="text-light">@meta.When.ToStandardFormat()</span>
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
<span>@match.MatchValue</span>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
Layout = null;
|
||||
}
|
||||
<div class="dropdown with-arrow" data-toggle="dropdown" id="alert-toggle" aria-haspopup="true" aria-expanded="false">
|
||||
<div data-toggle="tooltip" data-title="@(Model.Any() ? "View Alerts" : "No Alerts")" data-placement="bottom">
|
||||
<div data-toggle="tooltip" data-title="@(Model.Any() ? ViewBag.Localization["WEBFRONT_ALERTS_SOME_TOOLTIP"] : ViewBag.Localization["WEBFRONT_ALERTS_NONE_TOOLTIP"])" data-placement="bottom">
|
||||
<i class="oi oi-bell mt-5"></i>
|
||||
</div>
|
||||
@if (Model.Any())
|
||||
|
@ -4,8 +4,8 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
<div class="content-title">Recent Reports</div>
|
||||
<div class="text-muted">Last 24 hours</div>
|
||||
<div class="content-title">@ViewBag.Localization["WEBFRONT_MODAL_REPORTS_TITLE"]</div>
|
||||
<div class="text-muted">@ViewBag.Localization["WEBFRONT_MODAL_REPORTS_SUBTITLE"]</div>
|
||||
|
||||
@foreach (var server in Model.Where(server => server.Reports.Any()).OrderByDescending(server => server.Reports.Max(report => report.ReportedOn)))
|
||||
{
|
||||
@ -27,13 +27,12 @@
|
||||
};
|
||||
<div class="font-weight-bold">@report.ReportedOn.HumanizeForCurrentCulture()</div>
|
||||
<div class="font-size-12">
|
||||
<a asp-action="Profile" asp-controller="Client" asp-route-id="@report.Target.ClientId">
|
||||
<color-code value="@report.Target.Name"></color-code>
|
||||
</a>
|
||||
<a asp-action="Profile" asp-controller="Client" asp-route-id="@report.Target.ClientId">
|
||||
<color-code value="@report.Target.Name"></color-code>
|
||||
</a>
|
||||
<partial name="~/Views/Client/Profile/Meta/_ReceivedPenaltyResponse.cshtml" for="@penalty"/>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
@ -23,14 +23,14 @@
|
||||
{
|
||||
<!-- desktop -->
|
||||
<tr class="bg-dark-dm bg-light-lm d-none d-lg-table-row">
|
||||
<td colspan="@Model.Columns.Count">No data...</td>
|
||||
<td colspan="@Model.Columns.Count">@ViewBag.Localization["WEBFRONT_DATATABLE_NO_DATA"]</td>
|
||||
</tr>
|
||||
<!-- mobile -->
|
||||
<tr class="d-flex d-table-row d-lg-none">
|
||||
<td class="bg-primary text-light text-right w-125">
|
||||
—
|
||||
</td>
|
||||
<td class="bg-dark-dm bg-light-lm flex-fill w-200">No data...</td>
|
||||
<td class="bg-dark-dm bg-light-lm flex-fill w-200">@ViewBag.Localization["WEBFRONT_DATATABLE_NO_DATA"]</td>
|
||||
</tr>
|
||||
}
|
||||
@foreach (var row in Model.Rows)
|
||||
@ -103,7 +103,7 @@
|
||||
</table>
|
||||
@if (Model.InitialRowCount > 0 && Model.Rows.Count > 0)
|
||||
{
|
||||
<button class="btn btn-block table-slide" data-toggle="tooltip" data-title="Show @(Model.Rows.Count - Model.InitialRowCount) more rows">
|
||||
<button class="btn btn-block table-slide" data-toggle="tooltip" data-title="@((ViewBag.Localization["WEBFRONT_DATATABLE_LOAD_MORE_FORMAT"] as string).FormatExt(Model.Rows.Count - Model.InitialRowCount))">
|
||||
<span class="oi oi-chevron-bottom"></span>
|
||||
</button>
|
||||
}
|
||||
|
@ -52,7 +52,7 @@
|
||||
<span aria-hidden="true">×</span>
|
||||
</a>
|
||||
<div id="actionModalContent">
|
||||
<h4 class="mt-20">No content available yet...</h4>
|
||||
<h4 class="mt-20">@ViewBag.Localization["WEBFRONT_GLOBAL_MODAL_EMPTY"]</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -98,21 +98,21 @@
|
||||
<div class="d-none d-md-block">
|
||||
<div class="badge-group ml-20" role="group" aria-label="...">
|
||||
<span class="badge badge-primary">@(ViewBag.ClientCount ?? "-")</span>
|
||||
<span class="badge bg-dark-dm bg-light-lm">Clients</span>
|
||||
<span class="badge bg-dark-dm bg-light-lm">@ViewBag.Localization["WEBFRONT_LAYOUT_CLIENTS_ONLINE"]</span>
|
||||
</div>
|
||||
|
||||
<has-permission entity="PrivilegedClientsPage" required-permission="Read">
|
||||
<div class="badge-group ml-10" role="group" aria-label="...">
|
||||
<span class="badge badge-success">@(ViewBag.AdminCount ?? "-")</span>
|
||||
<span class="badge bg-dark-dm bg-light-lm">Admins</span>
|
||||
<span class="badge bg-dark-dm bg-light-lm">@ViewBag.Localization["WEBFRONT_LAYOUT_ADMINS_ONLINE"]</span>
|
||||
</div>
|
||||
</has-permission>
|
||||
|
||||
<has-permission entity="AdminMenu" required-permission="Read">
|
||||
<a href="#actionModal" class="profile-action no-decoration" data-action="RecentReports" data-toggle="tooltip" data-title="View recent reports" data-placement="bottom">
|
||||
<a href="#actionModal" class="profile-action no-decoration" data-action="RecentReports" data-toggle="tooltip" data-title="@ViewBag.Localization["WEBFRONT_MODAL_REPORTS_TOOLTIP_TITLE"]" data-placement="bottom">
|
||||
<div class="badge-group ml-10" role="group">
|
||||
<span class="badge badge-danger">@(ViewBag.ReportCount ?? "-")</span>
|
||||
<span class="badge bg-dark-dm bg-light-lm">Reports</span>
|
||||
<span class="badge bg-dark-dm bg-light-lm">@ViewBag.Localization["WEBFRONT_LAYOUT_REPORTS"]</span>
|
||||
</div>
|
||||
</a>
|
||||
</has-permission>
|
||||
@ -122,7 +122,7 @@
|
||||
<div class="align-self-center">
|
||||
@await Html.PartialAsync("Partials/_Notifications", (object)ViewBag.Alerts)
|
||||
</div>
|
||||
<div class="btn btn-action mr-10 ml-10" onclick="halfmoon.toggleDarkMode()" data-toggle="tooltip" data-title="Toggle display mode" data-placement="bottom">
|
||||
<div class="btn btn-action mr-10 ml-10" onclick="halfmoon.toggleDarkMode()" data-toggle="tooltip" data-title="@ViewBag.Localization["WEBFRONT_LAYOUT_TOGGLE_DISPLAY"]" data-placement="bottom">
|
||||
<i class="oi oi-moon"></i>
|
||||
</div>
|
||||
<div class="d-none d-md-block ">
|
||||
@ -149,12 +149,7 @@
|
||||
<div id="mainLoadingBar" class="progress-bar position-absolute flex-fill position-fixed z-30" style="display: none">
|
||||
<div class="progress-bar-value"></div>
|
||||
</div>
|
||||
|
||||
@RenderBody()
|
||||
|
||||
<div class="content">
|
||||
<div class="badge text-muted">threadsafe.pw</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -10,7 +10,7 @@
|
||||
<div class="pr-20 pl-20 mb-20 d-block d-lg-none">
|
||||
<partial name="_SearchResourceForm"/>
|
||||
</div>
|
||||
<span class="sidebar-title ">Main</span>
|
||||
<span class="sidebar-title">@ViewBag.Localization["WEBFRONT_NAV_TITLE_MAIN"]</span>
|
||||
<div class="sidebar-divider"></div>
|
||||
<!-- servers -->
|
||||
<a asp-controller="Home" asp-action="Index" class="sidebar-link">
|
||||
@ -47,7 +47,7 @@
|
||||
<has-permission entity="ProfilePage" required-permission="Read">
|
||||
<a asp-controller="Client" asp-action="Profile" asp-route-id="@ViewBag.User.ClientId" class="sidebar-link">
|
||||
<i class="oi oi-person mr-5"></i>
|
||||
<span class="name">Profile</span>
|
||||
<span class="name">@ViewBag.Localization["WEBFRONT_NAV_TITLE_PROFILE"]</span>
|
||||
</a>
|
||||
</has-permission>
|
||||
|
||||
@ -55,13 +55,13 @@
|
||||
{
|
||||
<a href="#actionModal" class="profile-action sidebar-link" data-action="login">
|
||||
<i class="oi oi-key mr-5"></i>
|
||||
<span class="name">Login</span>
|
||||
<span class="name">@ViewBag.Localization["WEBFRONT_NAV_TITLE_LOGIN"]</span>
|
||||
</a>
|
||||
}
|
||||
|
||||
<br/>
|
||||
<!-- stats -->
|
||||
<div class="sidebar-title ">Stats</div>
|
||||
<div class="sidebar-title ">@ViewBag.Localization["WEBFRONT_NAV_TITLE_STATS"]</div>
|
||||
<div class="sidebar-divider"></div>
|
||||
|
||||
@foreach (Page pageLink in ViewBag.Pages)
|
||||
@ -74,14 +74,14 @@
|
||||
<!-- scoreboard -->
|
||||
<a asp-controller="Server" asp-action="Scoreboard" class="sidebar-link">
|
||||
<i class="oi oi-spreadsheet mr-5"></i>
|
||||
<span class="name">Scoreboard</span>
|
||||
<span class="name">@ViewBag.Localization["WEBFRONT_NAV_TITLE_SCOREBOARD"]</span>
|
||||
</a>
|
||||
<br/>
|
||||
|
||||
<!-- socials -->
|
||||
@if (ViewBag.CommunityInformation?.IsEnabled && ViewBag.CommunityInformation.SocialAccounts.Length > 0)
|
||||
{
|
||||
<span class="sidebar-title ">Socials</span>
|
||||
<span class="sidebar-title">@ViewBag.Localization["WEBFRONT_NAV_TITLE_SOCIALS"]</span>
|
||||
<div class="sidebar-divider"></div>
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@
|
||||
|
||||
<!-- admin -->
|
||||
<has-permission entity="AdminMenu" required-permission="Read">
|
||||
<div class="sidebar-title ">Admin</div>
|
||||
<div class="sidebar-title">@ViewBag.Localization["WEBFRONT_NAV_TITLE_ADMIN"]</div>
|
||||
<div class="sidebar-divider"></div>
|
||||
|
||||
<has-permission entity="ConsolePage" required-permission="Read">
|
||||
@ -118,14 +118,14 @@
|
||||
<has-permission entity="Penalty" required-permission="Read"></has-permission>
|
||||
<a asp-controller="Admin" asp-action="BanManagement" class="sidebar-link">
|
||||
<i class="oi oi-ban mr-5"></i>
|
||||
<span class="name">Ban Management</span>
|
||||
<span class="name">@ViewBag.Localization["WEBFRONT_NAV_TITLE_BAN_MANAGEMENT"]</span>
|
||||
</a>
|
||||
</has-permission>
|
||||
@if (ViewBag.User.Level >= EFClient.Permission.Owner)
|
||||
{
|
||||
<a asp-controller="Configuration" asp-action="Edit" class="sidebar-link">
|
||||
<i class="oi oi-cog mr-5"></i>
|
||||
<span class="name">Configuration</span>
|
||||
<span class="name">@ViewBag.Localization["WEBFRONT_NAV_TITLE_CONFIGURATION"]</span>
|
||||
</a>
|
||||
}
|
||||
<has-permission entity="AuditPage" required-permission="Read">
|
||||
@ -140,7 +140,7 @@
|
||||
<span class="name">@ViewBag.Localization["WEBFRONT_ACTION_RECENT_CLIENTS"]</span>
|
||||
</a>
|
||||
</has-permission>
|
||||
|
||||
|
||||
@if (ViewBag.Authorized)
|
||||
{
|
||||
<a class="sidebar-link profile-action" href="#actionModal" data-action="GenerateLoginToken" data-response-duration="30000" title="@ViewBag.Localization["WEBFRONT_ACTION_TOKEN"]">
|
||||
@ -158,11 +158,21 @@
|
||||
<div class="sidebar-link font-size-12 font-weight-light">
|
||||
@if (ViewBag.Authorized)
|
||||
{
|
||||
<span>Logged in as <color-code value="@ViewBag.User.Name"></color-code></span>
|
||||
@foreach (var match in Utilities.SplitTranslationTokens(ViewBag.Localization["WEBFRONT_NAV_LOGIN_YES_FORMAT"]))
|
||||
{
|
||||
if (match.IsInterpolation && match.MatchValue == "username")
|
||||
{
|
||||
<color-code value="@ViewBag.User.Name"></color-code>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@match.MatchValue</span>
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>Not logged in</span>
|
||||
<span>@ViewBag.Localization["WEBFRONT_NAV_LOGIN_NO_FORMAT"]</span>
|
||||
}
|
||||
</div>
|
||||
<div class="sidebar-divider mt-0 mb-0"></div>
|
||||
|
@ -5,15 +5,15 @@
|
||||
<form class="action-form" asp-action="Login" asp-controller="Account">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon-clientId">Client ID</span>
|
||||
<span class="input-group-text" id="basic-addon-clientId">@ViewBag.Localization["WEBFRONT_LOGIN_MODAL_FORM_CLIENTID"]</span>
|
||||
</div>
|
||||
<input type="text" name="clientId" value="" class="form-control" aria-label="clientId" aria-describedby="basic-addon-clientId">
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon-Password">Token/Password</span>
|
||||
<span class="input-group-text" id="basic-addon-Password">@ViewBag.Localization["WEBFRONT_LOGIN_MODAL_FORM_PASSWORD"]</span>
|
||||
</div>
|
||||
<input type="password" name="Password" value="" class="form-control" aria-label="Password" aria-describedby="basic-addon-Password">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-block btn-primary">Login</button>
|
||||
<button type="submit" class="btn btn-block btn-primary">@ViewBag.Localization["WEBFRONT_LOGIN_BUTTON_SUBMIT"]</button>
|
||||
</form>
|
||||
|
@ -37,7 +37,7 @@
|
||||
</div>
|
||||
}
|
||||
<hr/>
|
||||
<a href="#" class="btn btn-lg btn-danger btn-block mt-15" role="button">Close</a>
|
||||
<a href="#" class="btn btn-lg btn-danger btn-block mt-15" role="button">@ViewBag.Localization["WEBFRONT_CONTEXT_MENU_BUTTON_CLOSE"]</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -79,7 +79,7 @@ $(document).ready(function () {
|
||||
clearQueryString();
|
||||
halfmoon.initStickyAlert({
|
||||
content: toastMessage,
|
||||
title: 'Success',
|
||||
title: _localization['WEBFRONT_SCRIPT_ACTION_SUCCESS'],
|
||||
alertType: 'alert-success',
|
||||
fillType: 'filled',
|
||||
timeShown: duration
|
||||
@ -107,7 +107,7 @@ $(document).ready(function () {
|
||||
.fail(function (jqxhr, textStatus, error) {
|
||||
halfmoon.initStickyAlert({
|
||||
content: jqxhr.responseText,
|
||||
title: 'Error',
|
||||
title: _localization['WEBFRONT_SCRIPT_ACTION_ERROR'],
|
||||
alertType: 'alert-danger',
|
||||
fillType: 'filled'
|
||||
});
|
||||
@ -145,7 +145,7 @@ $(document).ready(function () {
|
||||
modal.modal();
|
||||
halfmoon.initStickyAlert({
|
||||
content: escapeHtml(message),
|
||||
title: 'Executed',
|
||||
title: _localization['WEBFRONT_SCRIPT_ACTION_EXECUTED'],
|
||||
alertType: 'alert-primary',
|
||||
fillType: 'filled'
|
||||
});
|
||||
@ -174,7 +174,7 @@ $(document).ready(function () {
|
||||
|
||||
halfmoon.initStickyAlert({
|
||||
content: message,
|
||||
title: 'Error',
|
||||
title: _localization['WEBFRONT_SCRIPT_ACTION_ERROR'],
|
||||
alertType: 'alert-danger',
|
||||
fillType: 'filled'
|
||||
});
|
||||
|
@ -73,7 +73,7 @@ function loadMoreItems() {
|
||||
.fail(function () {
|
||||
errorLoader();
|
||||
halfmoon.initStickyAlert({
|
||||
content: 'Could not load more items...',
|
||||
content: _localization['WEBFRONT_SCRIPT_LOADER_ERROR'],
|
||||
title: 'Error',
|
||||
alertType: 'alert-danger',
|
||||
fillType: 'filled'
|
||||
|
@ -88,7 +88,7 @@ function getPlayerHistoryChart(playerHistory, i, width, maxClients) {
|
||||
callbacks: {
|
||||
// todo: localization at some point
|
||||
title: context => moment(context[0].label).local().calendar(),
|
||||
label: context => context.datasetIndex !== 1 ? `${context.value} players on ${playerHistory[context.index].mapAlias}` : context.value === '0' ? '' : 'Server Unreachable!',
|
||||
label: context => context.datasetIndex !== 1 ? `${context.value} ${_localization['WEBFRONT_SCRIPT_SERVER_PLAYERS']} | ${playerHistory[context.index].mapAlias}` : context.value === '0' ? '' : _localization['WEBFRONT_SCRIPT_SERVER_UNREACHABLE'],
|
||||
},
|
||||
mode: 'nearest',
|
||||
intersect: false,
|
||||
|
Loading…
Reference in New Issue
Block a user