@using StardewModdingAPI.Web.Framework @using StardewModdingAPI.Web.ViewModels.JsonValidator @model JsonValidatorModel @{ // get view data string curPageUrl = this.Url.PlainAction("Index", "JsonValidator", new { schemaName = Model.SchemaName, id = Model.PasteID }); string newUploadUrl = this.Url.PlainAction("Index", "JsonValidator", new { schemaName = Model.SchemaName }); string schemaDisplayName = null; bool isValidSchema = Model.SchemaName != null && Model.SchemaFormats.TryGetValue(Model.SchemaName, out schemaDisplayName) && schemaDisplayName != "None"; // build title ViewData["Title"] = "JSON validator"; @if (Model.PasteID != null) { ViewData["ViewTitle"] = ViewData["Title"]; ViewData["Title"] += " (" + string.Join(", ", new[] { isValidSchema ? schemaDisplayName : null, Model.PasteID }.Where(p => p != null)) + ")"; } } @section Head { @if (Model.PasteID != null) { } } @* upload result banner *@ @if (Model.UploadError != null) {
} else if (Model.ParseError != null) { } else if (Model.PasteID != null) { } @* upload new file *@ @if (Model.Content == null) {See format documentation.
} @if (Model.Errors.Any()) {Line | Field | Error |
---|---|---|
@error.Line | @error.Path | @error.Message |
No errors found.
} }@Model.Content@if (isValidSchema) { }