diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-02-24 18:41:22 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-02-24 18:41:32 -0500 |
commit | 781074473a0f56488732b5dcb4c19f319f4da003 (patch) | |
tree | 3a0b9246cb02e8d053bbb138981ff9a93d690616 /src/SMAPI.Web/Views/LogParser/Index.cshtml | |
parent | 4baad0ec8d568217aa2708afc15ba9672b0a2daf (diff) | |
parent | bbb33c96f1cf698eee1dd398526d9ea853c2fb2f (diff) | |
download | SMAPI-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.cshtml | 59 |
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> |