summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Views/LogParser/Index.cshtml
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-02-24 18:41:22 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-02-24 18:41:32 -0500
commit781074473a0f56488732b5dcb4c19f319f4da003 (patch)
tree3a0b9246cb02e8d053bbb138981ff9a93d690616 /src/SMAPI.Web/Views/LogParser/Index.cshtml
parent4baad0ec8d568217aa2708afc15ba9672b0a2daf (diff)
parentbbb33c96f1cf698eee1dd398526d9ea853c2fb2f (diff)
downloadSMAPI-781074473a0f56488732b5dcb4c19f319f4da003.tar.gz
SMAPI-781074473a0f56488732b5dcb4c19f319f4da003.tar.bz2
SMAPI-781074473a0f56488732b5dcb4c19f319f4da003.zip
Merge pull request #619 from danvolchek/parser_update_alerts
[Log Parser] Update info table in new suggested fixes section
Diffstat (limited to 'src/SMAPI.Web/Views/LogParser/Index.cshtml')
-rw-r--r--src/SMAPI.Web/Views/LogParser/Index.cshtml59
1 files changed, 55 insertions, 4 deletions
diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml
index 58830d64..bf70f2d7 100644
--- a/src/SMAPI.Web/Views/LogParser/Index.cshtml
+++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml
@@ -117,9 +117,60 @@ else if (Model.ParsedLog?.IsValid == true)
@* parsed log *@
@if (Model.ParsedLog?.IsValid == true)
{
- <h2>Log info</h2>
<div id="output">
- <table id="metadata">
+ @if (Model.ParsedLog.Mods.Any(mod => mod.HasUpdate))
+ {
+ <h2>Suggested fixes</h2>
+
+ <p>You have some mods that aren't fully up to date. Updating them can fix problems.</p>
+ <table id="updates" class="table">
+ <caption>
+ Updates available:
+ </caption>
+ @foreach (LogModInfo mod in Model.ParsedLog.Mods.Where(mod => (mod.HasUpdate && mod.ContentPackFor == null) || (contentPacks != null && contentPacks.TryGetValue(mod.Name, out LogModInfo[] contentPackList) && contentPackList.Any(pack => pack.HasUpdate))))
+ {
+ <tr class="mod-entry">
+ <td>
+ <strong class=@(!mod.HasUpdate ? "hidden": "")>@mod.Name</strong>
+ @if (contentPacks != null && contentPacks.TryGetValue(mod.Name, out LogModInfo[] contentPackList))
+ {
+ <div class="content-packs">
+ @foreach (LogModInfo contentPack in contentPackList.Where(pack => pack.HasUpdate))
+ {
+ <text>+ @contentPack.Name</text><br />
+ }
+ </div>
+ }
+ </td>
+ <td>
+ @if (mod.HasUpdate)
+ {
+ <a href="@mod.UpdateLink" target="_blank">
+ @(mod.Version == null ? @mod.UpdateVersion : $"{mod.Version} → {mod.UpdateVersion}")
+ </a>
+ }
+ else
+ {
+ <span class="invisible">Okay</span>
+ }
+
+ @if (contentPacks != null && contentPacks.TryGetValue(mod.Name, out contentPackList))
+ {
+ <div>
+ @foreach (LogModInfo contentPack in contentPackList.Where(pack => pack.HasUpdate))
+ {
+ <a href="@contentPack.UpdateLink" target="_blank">@contentPack.Version → @contentPack.UpdateVersion</a><br />
+ }
+ </div>
+ }
+ </td>
+ </tr>
+ }
+ </table>
+ }
+
+ <h2>Log info</h2>
+ <table id="metadata" class="table">
<caption>Game info:</caption>
<tr>
<th>Stardew Valley:</th>
@@ -139,7 +190,7 @@ else if (Model.ParsedLog?.IsValid == true)
</tr>
</table>
<br />
- <table id="mods" class="@(Model.ShowRaw ? "filters-disabled" : null)">
+ <table id="mods" class="@(Model.ShowRaw ? "filters-disabled" : null) table">
<caption>
Installed mods:
@if (!Model.ShowRaw)
@@ -149,7 +200,7 @@ else if (Model.ParsedLog?.IsValid == true)
<span class="notice btn txt" v-on:click="hideAllMods" v-bind:class="{ invisible: !anyModsShown || !anyModsHidden }">hide all</span>
}
</caption>
- @foreach (var mod in Model.ParsedLog.Mods.Where(p => p.ContentPackFor == null))
+ @foreach (var mod in Model.ParsedLog.Mods.Where(p => p.Loaded && p.ContentPackFor == null))
{
<tr v-on:click="toggleMod('@Model.GetSlug(mod.Name)')" class="mod-entry" v-bind:class="{ hidden: !showMods['@Model.GetSlug(mod.Name)'] }">
<td><input type="checkbox" v-bind:checked="showMods['@Model.GetSlug(mod.Name)']" v-bind:class="{ invisible: !anyModsHidden }" /></td>