IW4M-Admin/WebfrontCore/Views/Shared/EditorTemplates/ServerConfiguration.cshtml

60 lines
2.9 KiB
Plaintext
Raw Normal View History

@model SharedLibraryCore.Configuration.ServerConfiguration
@{
string labelClass = "mb-2 mt-1";
string editorClass = "form-control bg-dark text-white-50 text-box single-line mb-2 mt-0";
string addText = SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_CONFIGURATION_ADD"];
string optionalText = SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex["COMMAND_HELP_OPTIONAL"];
int i = 0;
}
<div class="server-configuration-header">
<div class="d-flex h4">
<div class="text-white mb-0">@Model.IPAddress:@Model.Port</div>
<!--span class="oi oi-trash link-inverse ml-auto delete-server-button"></!--span>-->
</div>
<div class="border-bottom mb-3">
<label asp-for="@Model.IPAddress" class="@labelClass"></label>
<input asp-for="@Model.IPAddress" class="@editorClass" />
<label asp-for="@Model.Port" class="@labelClass"></label>
<input asp-for="@Model.Port" class="@editorClass" />
<label asp-for="@Model.Password" class="@labelClass"></label>
<input asp-for="@Model.Password" class="@editorClass" />
<label asp-for="@Model.ManualLogPath" class="@labelClass"></label>
<input asp-for="@Model.ManualLogPath" class="@editorClass" placeholder="@optionalText" />
<label asp-for="@Model.GameLogServerUrl" class="@labelClass"></label>
<input asp-for="@Model.GameLogServerUrl" class="@editorClass" placeholder="@optionalText" />
<label asp-for="@Model.RConParserVersion" class="@labelClass"></label>
<input asp-for="@Model.RConParserVersion" class="@editorClass" />
<label asp-for="@Model.EventParserVersion" class="@labelClass"></label>
<input asp-for="@Model.EventParserVersion" class="@editorClass" />
<label asp-for="@Model.ReservedSlotNumber" class="@labelClass"></label>
<input asp-for="@Model.ReservedSlotNumber" class="@editorClass" />
<div>
<label asp-for="@Model.Rules" class="bg-primary pl-3 pr-3 p-2 w-100 mt-3"></label>
@for(i = 0; i < Model.Rules.Length; i++)
{
<input asp-for="@Model.Rules[i]" class="@editorClass" />
}
<a asp-controller="Configuration" asp-action="GetNewListItem" asp-route-propertyName="Servers.Rules" class="btn btn-primary configuration-add-new mt-2">@addText</a>
</div>
<div class="mb-3">
<label asp-for="@Model.AutoMessages" class="bg-primary pl-3 pr-3 p-2 w-100 mt-3"></label>
@for(i = 0; i < Model.AutoMessages.Length; i++)
{
<input asp-for="@Model.AutoMessages[i]" class="@editorClass" />
}
<a asp-controller="Configuration" asp-action="GetNewListItem" asp-route-propertyName="Servers.Automessages" class="btn btn-primary configuration-add-new mt-2">@addText</a>
</div>
</div>
</div>