From a9e3458a3b93649f62919566c3ffacf27f16332c Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 29 Mar 2018 00:39:25 -0400 Subject: add success/error banner to log parser page --- src/SMAPI.Web/Views/LogParser/Index.cshtml | 36 ++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 9 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 7213e286..c909b203 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -44,11 +44,36 @@ ** Intro *********@

This page lets you upload, view, and share a SMAPI log to help troubleshoot mod issues.

- @if (Model.ParsedLog?.IsValid == true) { -

Parsed log

+ +} +else if (Model.ParsedLog?.IsValid == false) +{ + +} +else +{ + +} + +@********* +** Parsed log +*********@ +@if (Model.ParsedLog?.IsValid == true) +{ +

Log info

@@ -148,12 +173,6 @@ } else if (Model.ParsedLog?.IsValid == false) { -

Parsed log

-
-

We couldn't parse that file, but you can still share the link.

-

Error details: @Model.ParsedLog.Error

-
-

Raw log

@Model.ParsedLog.RawText
} @@ -166,7 +185,6 @@ else if (Model.ParsedLog?.IsValid == false)
  • Find your SMAPI log file (not the console text).
  • Drag the file onto the textbox below (or paste the text in).
  • Click Parse.
  • -
  • Share the URL of the new page.
  • -- cgit From d49eb880115fefae406edfdf38fbff54acf8ba44 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 29 Mar 2018 00:43:31 -0400 Subject: show game path on log parser page instead of mods path --- src/SMAPI.Web/Framework/LogParsing/LogParser.cs | 1 + src/SMAPI.Web/Framework/LogParsing/Models/ParsedLog.cs | 3 +++ src/SMAPI.Web/Views/LogParser/Index.cshtml | 4 ++-- 3 files changed, 6 insertions(+), 2 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 9e44f163..f49fb05c 100644 --- a/src/SMAPI.Web/Framework/LogParsing/LogParser.cs +++ b/src/SMAPI.Web/Framework/LogParsing/LogParser.cs @@ -135,6 +135,7 @@ namespace StardewModdingAPI.Web.Framework.LogParsing { Match match = this.ModPathPattern.Match(message.Text); log.ModPath = match.Groups["path"].Value; + log.GamePath = new FileInfo(log.ModPath).Directory.FullName; } // log UTC timestamp line diff --git a/src/SMAPI.Web/Framework/LogParsing/Models/ParsedLog.cs b/src/SMAPI.Web/Framework/LogParsing/Models/ParsedLog.cs index a82b6a1b..87b20eb0 100644 --- a/src/SMAPI.Web/Framework/LogParsing/Models/ParsedLog.cs +++ b/src/SMAPI.Web/Framework/LogParsing/Models/ParsedLog.cs @@ -32,6 +32,9 @@ namespace StardewModdingAPI.Web.Framework.LogParsing.Models /// The player's operating system. public string OperatingSystem { get; set; } + /// The game install path. + public string GamePath { get; set; } + /// The mod folder path. public string ModPath { get; set; } diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index c909b203..7103e9a1 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -90,8 +90,8 @@ else
    - - + + -- cgit From 4cd77225837b541bd6032539aa0895bade95181f Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 29 Mar 2018 00:51:23 -0400 Subject: tweak metadata formatting --- src/SMAPI.Web/Views/LogParser/Index.cshtml | 18 +++++++----------- src/SMAPI.Web/wwwroot/Content/css/log-parser.css | 20 +++++++++++++++----- 2 files changed, 22 insertions(+), 16 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 7103e9a1..b739ebbb 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -78,23 +78,19 @@ else
    Game info:
    @Model.ParsedLog.OperatingSystem
    Mods path:@Model.ParsedLog.ModPathGame path:@Model.ParsedLog.GamePath
    Log started:
    - - - - - - + + - - + + - + - +
    Game info:
    SMAPI version:@Model.ParsedLog.ApiVersion
    Game version:@Model.ParsedLog.GameVersionStardew Valley:@Model.ParsedLog.GameVersion on @Model.ParsedLog.OperatingSystem
    Platform:@Model.ParsedLog.OperatingSystemSMAPI:@Model.ParsedLog.ApiVersion
    Game path:Folder: @Model.ParsedLog.GamePath
    Log started:Log started: @Model.ParsedLog.Timestamp.UtcDateTime.ToString("yyyy-MM-dd HH:mm") UTC ({{localTimeStarted}} your time)
    @@ -111,7 +107,7 @@ else - @mod.Name + @mod.Name @if (contentPacks != null && contentPacks.TryGetValue(mod.Name, out LogModInfo[] contentPackList)) {
    diff --git a/src/SMAPI.Web/wwwroot/Content/css/log-parser.css b/src/SMAPI.Web/wwwroot/Content/css/log-parser.css index 9d604072..789274e2 100644 --- a/src/SMAPI.Web/wwwroot/Content/css/log-parser.css +++ b/src/SMAPI.Web/wwwroot/Content/css/log-parser.css @@ -29,8 +29,12 @@ input#upload-button { background: #eef; } +table caption { + font-weight: bold; +} + /********* -** Log metadata & filters +** Result banner *********/ .banner { border: 2px solid gray; @@ -48,15 +52,20 @@ input#upload-button { background: #FCC; } +/********* +** Log metadata & filters +*********/ #metadata, #mods, #filters { - font-weight: bold; border-bottom: 1px dashed #888888; - padding-bottom: 10px; margin-bottom: 5px; } -table#metadata, -table#mods { +#metadata th { + text-align: right; + padding-right: 0.7em; +} + +table#metadata, table#mods { border: 1px solid #000000; background: #ffffff; border-radius: 5px; @@ -131,6 +140,7 @@ table#mods { #filters { margin: 1em 0 0 0; padding: 0; + font-weight: bold; } #filters span { -- cgit From db0c88dbaf4af8622cb9b88fab7ea10d715fd7f6 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 29 Mar 2018 19:17:44 -0400 Subject: move version closer to mod name in log parser --- src/SMAPI.Web/Views/LogParser/Index.cshtml | 3 +-- 1 file changed, 1 insertion(+), 2 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 b739ebbb..2d1c1b44 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -107,7 +107,7 @@ else - @mod.Name + @mod.Name @mod.Version @if (contentPacks != null && contentPacks.TryGetValue(mod.Name, out LogModInfo[] contentPackList)) {
    @@ -118,7 +118,6 @@ else
    } - @mod.Version @mod.Author @if (mod.Errors == 0) { -- cgit