diff options
Diffstat (limited to 'src/SMAPI.Web/Views/LogParser/Index.cshtml')
-rw-r--r-- | src/SMAPI.Web/Views/LogParser/Index.cshtml | 64 |
1 files changed, 58 insertions, 6 deletions
diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index 58830d64..21adf35b 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -17,10 +17,10 @@ { <meta name="robots" content="noindex" /> } - <link rel="stylesheet" href="~/Content/css/log-parser.css?r=20180627" /> + <link rel="stylesheet" href="~/Content/css/log-parser.css?r=20190221" /> <script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.min.js" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js" crossorigin="anonymous"></script> - <script src="~/Content/js/log-parser.js?r=20180627"></script> + <script src="~/Content/js/log-parser.js?r=20190221"></script> <script> $(function() { smapi.logParser({ @@ -117,9 +117,61 @@ 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> + <ul id="fix-list"> + <li> + Consider updating these mods to fix problems: + + <table id="updates" class="table"> + @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 + { + <text> </text> + } + + @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> + </li> + </ul> + } + + <h2>Log info</h2> + <table id="metadata" class="table"> <caption>Game info:</caption> <tr> <th>Stardew Valley:</th> @@ -139,7 +191,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 +201,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> |