IW4M-Admin/WebfrontCore/Views/Home/Help.cshtml
2022-07-05 12:02:43 -05:00

59 lines
3.1 KiB
Plaintext

@model IEnumerable<(string, IEnumerable<SharedLibraryCore.Interfaces.IManagerCommand>)>
@{
var loc = Utilities.CurrentLocalization.LocalizationIndex;
}
<div class="content mt-20">
@foreach (var (pluginName, commandList) in Model)
{
<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>
<!-- desktop -->
<tr class="bg-primary text-light d-none d-lg-table-row ">
<th>@loc["WEBFRONT_HELP_COMMAND_DESC_NAME"]</th>
<th>@loc["WEBFRONT_HELP_COMMAND_DESC_ALIAS"]</th>
<th>@loc["WEBFRONT_HELP_COMMAND_DESC_DESCRIPTION"]</th>
<th>@loc["WEBFRONT_HELP_COMMAND_DESC_REQUIRES_TARGET"]</th>
<th>@loc["WEBFRONT_HELP_COMMAND_DESC_SYNTAX"]</th>
<th class="text-right">@loc["WEBFRONT_HELP_COMMAND_DESC_REQUIRED_LEVEL"]</th>
</tr>
</thead>
<tbody>
@foreach (var command in commandList)
{
<!-- desktop -->
<tr class="d-none d-lg-table-row bg-dark-dm bg-light-lm">
<td>@command.Name</td>
<td>@command.Alias</td>
<td>@command.Description</td>
<td>@command.RequiresTarget</td>
<td>@ViewBag.CommandPrefix@command.Syntax.Split(ViewBag.CommandPrefix)[1]</td>
<td class="text-right level-color-@((int)command.Permission)">@command.Permission.ToLocalizedLevelName()</td>
</tr>
<!-- mobile -->
<tr class="d-table-row d-lg-none d-flex bg-dark-dm bg-light-lm">
<td class="bg-primary text-right" style="min-width: 124px;">
<div class="mt-5 mb-5">@loc["WEBFRONT_HELP_COMMAND_DESC_NAME"]</div>
<div class="mt-5 mb-5">@loc["WEBFRONT_HELP_COMMAND_DESC_ALIAS"]</div>
<div class="mt-5 mb-5">@loc["WEBFRONT_HELP_COMMAND_DESC_DESCRIPTION"]</div>
<div class="mt-5 mb-5">@loc["WEBFRONT_HELP_COMMAND_DESC_REQUIRES_TARGET"]</div>
<div class="mt-5 mb-5">@loc["WEBFRONT_HELP_COMMAND_DESC_SYNTAX"]</div>
<div class="mt-5 mb-5">@loc["WEBFRONT_HELP_COMMAND_DESC_REQUIRED_LEVEL"]</div>
</td>
<td>
<div class="mt-5 mb-5">@command.Name</div>
<div class="mt-5 mb-5">@command.Alias</div>
<div class="mt-5 mb-5">@command.Description</div>
<div class="mt-5 mb-5">@command.RequiresTarget</div>
<div class="mt-5 mb-5">@ViewBag.CommandPrefix@command.Syntax.Split(ViewBag.CommandPrefix)[1]</div>
<div class="mt-5 mb-5 @($"level-color-{(int)command.Permission}")">@command.Permission.ToLocalizedLevelName()</div>
</td>
</tr>
}
</tbody>
</table>
}
</div>