diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-12-24 13:59:11 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-12-24 13:59:11 -0500 |
commit | 2833ad9a621d82cfef5be3868f89c9b2db436cf6 (patch) | |
tree | 898c859cb645cb916bcc39a0fca80fb6ec8d64a8 /src/SMAPI.Web/Views | |
parent | d932a11f51392cd42ab501185982af971f954c8d (diff) | |
download | SMAPI-2833ad9a621d82cfef5be3868f89c9b2db436cf6.tar.gz SMAPI-2833ad9a621d82cfef5be3868f89c9b2db436cf6.tar.bz2 SMAPI-2833ad9a621d82cfef5be3868f89c9b2db436cf6.zip |
fix log parser & JSON validator showing relative share URL
Diffstat (limited to 'src/SMAPI.Web/Views')
-rw-r--r-- | src/SMAPI.Web/Views/JsonValidator/Index.cshtml | 2 | ||||
-rw-r--r-- | src/SMAPI.Web/Views/LogParser/Index.cshtml | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/SMAPI.Web/Views/JsonValidator/Index.cshtml b/src/SMAPI.Web/Views/JsonValidator/Index.cshtml index fb43823a..f3696578 100644 --- a/src/SMAPI.Web/Views/JsonValidator/Index.cshtml +++ b/src/SMAPI.Web/Views/JsonValidator/Index.cshtml @@ -5,7 +5,7 @@ @{ // get view data - string curPageUrl = this.Url.PlainAction("Index", "JsonValidator", new { schemaName = Model.SchemaName, id = Model.PasteID }); + string curPageUrl = this.Url.PlainAction("Index", "JsonValidator", new { schemaName = Model.SchemaName, id = Model.PasteID }, absoluteUrl: true); 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?.ToLower() != "none"; diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index ac951564..87c7f918 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -13,6 +13,8 @@ .Cast<LogLevel>() .ToDictionary(level => level.ToString().ToLower(), level => level != LogLevel.Trace); JsonSerializerSettings noFormatting = new JsonSerializerSettings { Formatting = Formatting.None }; + + string curPageUrl = this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID }, absoluteUrl: true); } @section Head { @@ -50,7 +52,7 @@ else if (Model.ParseError != null) { <div class="banner error" v-pre> <strong>Oops, couldn't parse that log. (Make sure you upload the log file, not the console text.)</strong><br /> - Share this URL when asking for help: <code>https://@this.Context.Request.Host.ToUriComponent()@this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID }))</code><br /> + Share this URL when asking for help: <code>@curPageUrl</code><br /> (Or <a href="@this.Url.PlainAction("Index", "LogParser", values: null)">upload a new log</a>.)<br /> <br /> <small v-pre>Error details: @Model.ParseError</small> @@ -59,7 +61,7 @@ else if (Model.ParseError != null) else if (Model.ParsedLog?.IsValid == true) { <div class="banner success" v-pre> - <strong>Share this link to let someone else see the log:</strong> <code>https://@this.Context.Request.Host.ToUriComponent()@this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID })</code><br /> + <strong>Share this link to let someone else see the log:</strong> <code>@curPageUrl</code><br /> (Or <a href="@this.Url.PlainAction("Index", "LogParser", values: null)">upload a new log</a>.) </div> } |