summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Views/LogParser
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-04-11 20:32:00 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-04-11 20:32:00 -0400
commitb9bc1a6d17cafa0a97b46ffecda432cfc2f23b51 (patch)
tree319498e8724137a5680186645ca8324f2949eba3 /src/SMAPI.Web/Views/LogParser
parent46141a7af21a921284bc82d49d888da864887d6e (diff)
parent2d47e479a5e48a575db3ca9998653c0435419440 (diff)
downloadSMAPI-b9bc1a6d17cafa0a97b46ffecda432cfc2f23b51.tar.gz
SMAPI-b9bc1a6d17cafa0a97b46ffecda432cfc2f23b51.tar.bz2
SMAPI-b9bc1a6d17cafa0a97b46ffecda432cfc2f23b51.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Web/Views/LogParser')
-rw-r--r--src/SMAPI.Web/Views/LogParser/Index.cshtml57
1 files changed, 35 insertions, 22 deletions
diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml
index 7213e286..2d1c1b44 100644
--- a/src/SMAPI.Web/Views/LogParser/Index.cshtml
+++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml
@@ -44,32 +44,53 @@
** 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>
<tr>
- <td>SMAPI version:</td>
- <td v-pre>@Model.ParsedLog.ApiVersion</td>
- </tr>
- <tr>
- <td>Game version:</td>
- <td v-pre>@Model.ParsedLog.GameVersion</td>
+ <th>Stardew Valley:</th>
+ <td v-pre>@Model.ParsedLog.GameVersion on @Model.ParsedLog.OperatingSystem</td>
</tr>
<tr>
- <td>Platform:</td>
- <td v-pre>@Model.ParsedLog.OperatingSystem</td>
+ <th>SMAPI:</th>
+ <td v-pre>@Model.ParsedLog.ApiVersion</td>
</tr>
<tr>
- <td>Mods path:</td>
- <td v-pre>@Model.ParsedLog.ModPath</td>
+ <th>Folder:</th>
+ <td v-pre>@Model.ParsedLog.GamePath</td>
</tr>
<tr>
- <td>Log started:</td>
+ <th>Log started:</th>
<td>@Model.ParsedLog.Timestamp.UtcDateTime.ToString("yyyy-MM-dd HH:mm") UTC ({{localTimeStarted}} your time)</td>
</tr>
</table>
@@ -86,7 +107,7 @@
<tr v-on:click="toggleMod('@GetSlug(mod.Name)')" class="mod-entry" v-bind:class="{ hidden: !showMods['@GetSlug(mod.Name)'] }">
<td><input type="checkbox" v-bind:checked="showMods['@GetSlug(mod.Name)']" v-show="anyModsHidden" /></td>
<td v-pre>
- @mod.Name
+ <strong>@mod.Name</strong> @mod.Version
@if (contentPacks != null && contentPacks.TryGetValue(mod.Name, out LogModInfo[] contentPackList))
{
<div class="content-packs">
@@ -97,7 +118,6 @@
</div>
}
</td>
- <td v-pre>@mod.Version</td>
<td v-pre>@mod.Author</td>
@if (mod.Errors == 0)
{
@@ -148,12 +168,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 +180,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">