diff options
Diffstat (limited to 'src/SMAPI.Web/Views/LogParser/Index.cshtml')
-rw-r--r-- | src/SMAPI.Web/Views/LogParser/Index.cshtml | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index 439167bc..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> } @@ -67,12 +69,16 @@ else if (Model.ParsedLog?.IsValid == true) @* save warnings *@ @if (Model.UploadWarning != null || Model.Expiry != null) { + @if (Model.UploadWarning != null) + { + <text>⚠️ @Model.UploadWarning<br /></text> + } + <div class="save-metadata" v-pre> @if (Model.Expiry != null) { - <text>This log will expire in @((DateTime.UtcNow - Model.Expiry.Value).Humanize()). </text> + <text>This log will expire in @((DateTime.UtcNow - Model.Expiry.Value).Humanize()).</text> } - <!--@Model.UploadWarning--> </div> } @@ -294,10 +300,7 @@ else if (Model.ParsedLog?.IsValid == true) string sectionFilter = message.Section != null && !message.IsStartOfSection ? $"&& sectionsAllow('{message.Section}')" : null; // filter the message by section if applicable <tr class="mod @levelStr @sectionStartClass" - @if (message.IsStartOfSection) - { - <text>v-on:click="toggleSection('@message.Section')"</text> - } + @if (message.IsStartOfSection) { <text> v-on:click="toggleSection('@message.Section')" </text> } v-show="filtersAllow('@Model.GetSlug(message.Mod)', '@levelStr') @sectionFilter"> <td v-pre>@message.Time</td> <td v-pre>@message.Level.ToString().ToUpper()</td> @@ -307,8 +310,12 @@ else if (Model.ParsedLog?.IsValid == true) @if (message.IsStartOfSection) { <span class="section-toggle-message"> - <template v-if="sectionsAllow('@message.Section')">This section is shown. Click here to hide it.</template> - <template v-else>This section is hidden. Click here to show it.</template> + <template v-if="sectionsAllow('@message.Section')"> + This section is shown. Click here to hide it. + </template> + <template v-else> + This section is hidden. Click here to show it. + </template> </span> } </td> |