diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-03-29 00:39:25 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-03-29 00:39:25 -0400 |
commit | a9e3458a3b93649f62919566c3ffacf27f16332c (patch) | |
tree | 13ebe3a2bf83c296c7ba69690f1efe4265fb0041 /src/SMAPI.Web/Views | |
parent | 46141a7af21a921284bc82d49d888da864887d6e (diff) | |
download | SMAPI-a9e3458a3b93649f62919566c3ffacf27f16332c.tar.gz SMAPI-a9e3458a3b93649f62919566c3ffacf27f16332c.tar.bz2 SMAPI-a9e3458a3b93649f62919566c3ffacf27f16332c.zip |
add success/error banner to log parser page
Diffstat (limited to 'src/SMAPI.Web/Views')
-rw-r--r-- | src/SMAPI.Web/Views/LogParser/Index.cshtml | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index 7213e286..c909b203 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -44,11 +44,36 @@ ** Intro *********@ <p id="blurb">This page lets you upload, view, and share a SMAPI log to help troubleshoot mod issues.</p> -<input type="button" id="upload-button" value="Share a new log" /> @if (Model.ParsedLog?.IsValid == true) { - <h2>Parsed log</h2> + <div class="banner success" v-pre> + <strong>The log was uploaded successfully!</strong><br/> + Share this URL when asking for help: <code>@(new Uri(new Uri(Model.SectionUrl), Model.PasteID))</code><br/> + (Or <a id="upload-button" href="#">upload a new log</a>.) + </div> +} +else if (Model.ParsedLog?.IsValid == false) +{ + <div class="banner error" v-pre> + <strong>Oops, couldn't parse that file. (Make sure you upload the log file, not the console text.)</strong><br /> + Share this URL when asking for help: <code>@(new Uri(new Uri(Model.SectionUrl), Model.PasteID))</code><br /> + (Or <a id="upload-button" href="#">upload a new log</a>.)<br /> + <br /> + <small v-pre>Error details: @Model.ParsedLog.Error</small> + </div> +} +else +{ + <input type="button" id="upload-button" value="Share a new log" /> +} + +@********* +** Parsed log +*********@ +@if (Model.ParsedLog?.IsValid == true) +{ + <h2>Log info</h2> <div id="output"> <table id="metadata"> <caption>Game info:</caption> @@ -148,12 +173,6 @@ } else if (Model.ParsedLog?.IsValid == false) { - <h2>Parsed log</h2> - <div id="error" class="color-red"> - <p><strong>We couldn't parse that file, but you can still share the link.</strong></p> - <p v-pre>Error details: @Model.ParsedLog.Error</p> - </div> - <h3>Raw log</h3> <pre v-pre>@Model.ParsedLog.RawText</pre> } @@ -166,7 +185,6 @@ else if (Model.ParsedLog?.IsValid == false) <li><a href="https://stardewvalleywiki.com/Modding:Player_FAQs#SMAPI_log" target="_blank">Find your SMAPI log file</a> (not the console text).</li> <li>Drag the file onto the textbox below (or paste the text in).</li> <li>Click <em>Parse</em>.</li> - <li>Share the URL of the new page.</li> </ol> <textarea id="input" placeholder="Paste or drag the log here"></textarea> <div class="buttons"> |