From a23261106ea454ab2e264007f27ca11ddbb7e44b Mon Sep 17 00:00:00 2001 From: danvolchek Date: Sun, 17 Feb 2019 20:39:36 -0600 Subject: add update info in suggested fixes section --- src/SMAPI.Web/Views/LogParser/Index.cshtml | 61 +++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 5 deletions(-) (limited to 'src/SMAPI.Web/Views/LogParser') diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index 58830d64..07b413b1 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) { -

Log info

- + @if (Model.ParsedLog.Mods.Any(mod => mod.HasUpdate)) + { +

Suggested fixes

+ +

You have some mods that aren't fully up to date. Updating them can fix problems.

+
+ + @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)))) + { + + + + + } +
+ Updates Available: +
+ @mod.Name + @if (contentPacks != null && contentPacks.TryGetValue(mod.Name, out LogModInfo[] contentPackList)) + { +
+ @foreach (LogModInfo contentPack in contentPackList.Where(pack => pack.HasUpdate)) + { + + @contentPack.Name
+ } +
+ } +
+ @if (mod.HasUpdate) + { + + @(mod.Version == null ? @mod.UpdateVersion : $"{mod.Version} → {mod.UpdateVersion}") + + } + else + { + + } + + @if (contentPacks != null && contentPacks.TryGetValue(mod.Name, out contentPackList)) + { +
+ @foreach (LogModInfo contentPack in contentPackList.Where(pack => pack.HasUpdate)) + { + @contentPack.Version → @contentPack.UpdateVersion
+ } +
+ } +
+ } + +

Log info

+ @@ -138,8 +189,8 @@ else if (Model.ParsedLog?.IsValid == true)
Game info:
Stardew Valley:@Model.ParsedLog.Timestamp.UtcDateTime.ToString("yyyy-MM-dd HH:mm") UTC ({{localTimeStarted}} your time)
-
- +
+
- @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)) { -- cgit From f676e0fe6d04f31d1614a4f533e20e7d8d499495 Mon Sep 17 00:00:00 2001 From: danvolchek Date: Sun, 17 Feb 2019 21:14:00 -0600 Subject: add removed space --- src/SMAPI.Web/Views/LogParser/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SMAPI.Web/Views/LogParser') diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index 07b413b1..3c842aed 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -189,7 +189,7 @@ else if (Model.ParsedLog?.IsValid == true)
Installed mods: @if (!Model.ShowRaw) @@ -149,7 +200,7 @@ else if (Model.ParsedLog?.IsValid == true) hide all }
@Model.ParsedLog.Timestamp.UtcDateTime.ToString("yyyy-MM-dd HH:mm") UTC ({{localTimeStarted}} your time)
-
+
Installed mods: -- cgit From bbb33c96f1cf698eee1dd398526d9ea853c2fb2f Mon Sep 17 00:00:00 2001 From: danvolchek Date: Sun, 17 Feb 2019 21:31:07 -0600 Subject: fix availablity caption case --- src/SMAPI.Web/Views/LogParser/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SMAPI.Web/Views/LogParser') diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index 3c842aed..bf70f2d7 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -125,7 +125,7 @@ else if (Model.ParsedLog?.IsValid == true)

You have some mods that aren't fully up to date. Updating them can fix problems.

@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)))) { -- cgit From fa3fa400fff0b97cbdca267295f8fbebbab17b61 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 21 Feb 2019 20:13:05 -0500 Subject: minor tweaks to new log parser UI (#619) --- src/SMAPI.Web/Framework/LogParsing/LogParser.cs | 8 +-- src/SMAPI.Web/Views/LogParser/Index.cshtml | 89 ++++++++++++------------ src/SMAPI.Web/wwwroot/Content/css/log-parser.css | 8 +-- 3 files changed, 52 insertions(+), 53 deletions(-) (limited to 'src/SMAPI.Web/Views/LogParser') diff --git a/src/SMAPI.Web/Framework/LogParsing/LogParser.cs b/src/SMAPI.Web/Framework/LogParsing/LogParser.cs index 5cdc501f..fdc19404 100644 --- a/src/SMAPI.Web/Framework/LogParsing/LogParser.cs +++ b/src/SMAPI.Web/Framework/LogParsing/LogParser.cs @@ -78,7 +78,7 @@ namespace StardewModdingAPI.Web.Framework.LogParsing }; // parse log messages - LogModInfo smapiMod = new LogModInfo { Name = "SMAPI", Author = "Pathoschild", Description = "", Loaded = true}; + LogModInfo smapiMod = new LogModInfo { Name = "SMAPI", Author = "Pathoschild", Description = "", Loaded = true }; LogModInfo gameMod = new LogModInfo { Name = "game", Author = "", Description = "", Loaded = true }; IDictionary mods = new Dictionary(); bool inModList = false; @@ -100,11 +100,9 @@ namespace StardewModdingAPI.Web.Framework.LogParsing break; default: - { if (mods.ContainsKey(message.Mod)) mods[message.Mod].Errors++; break; - } } } @@ -162,11 +160,11 @@ namespace StardewModdingAPI.Web.Framework.LogParsing } else { - mods[name] = new LogModInfo {Name = name, UpdateVersion = version, UpdateLink = link, Loaded = false}; + mods[name] = new LogModInfo { Name = name, UpdateVersion = version, UpdateLink = link, Loaded = false }; } } - else if(message.Level == LogLevel.Alert && this.SMAPIUpdatePattern.IsMatch(message.Text)) + else if (message.Level == LogLevel.Alert && this.SMAPIUpdatePattern.IsMatch(message.Text)) { Match match = this.SMAPIUpdatePattern.Match(message.Text); string version = match.Groups["version"].Value; diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index bf70f2d7..21adf35b 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -17,10 +17,10 @@ { } - + - +
- Updates Available: + Updates available: