From e30e42762871af3900c47886b57e8c43287b290a Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 2 Jan 2022 19:59:38 -0500 Subject: add download option to log view --- src/SMAPI.Web/Views/LogParser/Index.cshtml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/SMAPI.Web/Views') diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index 06d46c9e..eeff776c 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -2,6 +2,7 @@ @using StardewModdingAPI.Toolkit.Utilities @using StardewModdingAPI.Web.Framework @using StardewModdingAPI.Web.Framework.LogParsing.Models +@using StardewModdingAPI.Web.ViewModels @model StardewModdingAPI.Web.ViewModels.LogParserModel @{ @@ -338,14 +339,24 @@ else if (Model.ParsedLog?.IsValid == true) } } - - view raw log } else {
@Model.ParsedLog.RawText
- view parsed log } + + + @if (Model.ShowRaw) + { + view parsed log + } + else + { + view raw log + } + + | download + } else if (Model.ParsedLog?.IsValid == false) -- cgit From 7e8d11ca3aff9a7e741127cd5fd35d073c381ec9 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 15 Jan 2022 23:41:01 -0500 Subject: add Xbox app log instructions, redesign UI to fit --- docs/release-notes.md | 2 + src/SMAPI.Web/Views/LogParser/Index.cshtml | 118 +++++++++++++---------- src/SMAPI.Web/wwwroot/Content/css/log-parser.css | 26 ++++- src/SMAPI.Web/wwwroot/Content/js/log-parser.js | 11 --- 4 files changed, 91 insertions(+), 66 deletions(-) (limited to 'src/SMAPI.Web/Views') diff --git a/docs/release-notes.md b/docs/release-notes.md index f37b35f5..50eb416b 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -17,7 +17,9 @@ * Improved translations. Thanks to ChulkyBow (added Ukrainian)! * For the web UI: + * Added log instructions for Xbox app on Windows. * Added log download option. + * Redesigned log instruction UI. * Fixed log parser not correctly handling multiple mods having the exact same name. * Fixed JSON validator not recognizing manifest [update subkeys](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Update_checks#Update_subkeys). diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index eeff776c..91fc3535 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -23,13 +23,15 @@ { } - - + + + + - - + + } @@ -91,51 +95,65 @@ else if (Model.ParsedLog?.IsValid == true) @if (Model.ParsedLog == null) {

Where do I find my SMAPI log?

-
What system do you use?
- -
- On Android: -
    -
  1. Open a file app (like My Files or MT Manager).
  2. -
  3. Find the StardewValley folder on your internal storage.
  4. -
  5. Open the ErrorLogs subfolder.
  6. -
  7. The log file is SMAPI-crash.txt if it exists, otherwise SMAPI-latest.txt.
  8. -
-
-
- On Linux: -
    -
  1. Open the Files app.
  2. -
  3. Click the options menu (might be labeled Go or ).
  4. -
  5. Choose Enter Location.
  6. -
  7. Enter this exact text:
    ~/.config/StardewValley/ErrorLogs
  8. -
  9. The log file is SMAPI-crash.txt if it exists, otherwise SMAPI-latest.txt.
  10. -
-
-
- On macOS: -
    -
  1. Open the Finder app.
  2. -
  3. Click Go at the top, then Go to Folder.
  4. -
  5. Enter this exact text:
    ~/.config/StardewValley/ErrorLogs
  6. -
  7. The log file is SMAPI-crash.txt if it exists, otherwise SMAPI-latest.txt.
  8. -
-
-
- On Windows: -
    -
  1. Press the Windows and R buttons at the same time.
  2. -
  3. In the 'run' box that appears, enter this exact text:
    %appdata%\StardewValley\ErrorLogs
  4. -
  5. The log file is SMAPI-crash.txt if it exists, otherwise SMAPI-latest.txt.
  6. -
+
+
+ +
+
+
+
    +
  1. Open a file app (like My Files or MT Manager).
  2. +
  3. Find the StardewValley folder on your internal storage.
  4. +
  5. Open the ErrorLogs subfolder.
  6. +
  7. The log file is SMAPI-crash.txt if it exists, otherwise SMAPI-latest.txt.
  8. +
+
+
+
    +
  1. Open the Files app.
  2. +
  3. Click the options menu (might be labeled Go or ).
  4. +
  5. Choose Enter Location.
  6. +
  7. Enter this exact text:
    ~/.config/StardewValley/ErrorLogs
  8. +
  9. The log file is SMAPI-crash.txt if it exists, otherwise SMAPI-latest.txt.
  10. +
+
+
+
    +
  1. Open the Finder app.
  2. +
  3. Click Go at the top, then Go to Folder.
  4. +
  5. Enter this exact text:
    ~/.config/StardewValley/ErrorLogs
  6. +
  7. The log file is SMAPI-crash.txt if it exists, otherwise SMAPI-latest.txt.
  8. +
+
+
+
    +
  1. Press the Windows and R buttons at the same time.
  2. +
  3. In the 'run' box that appears, enter this exact text:
    %appdata%\StardewValley\ErrorLogs
  4. +
  5. The log file is SMAPI-crash.txt if it exists, otherwise SMAPI-latest.txt.
  6. +
+
+
+
    +
  1. Press the Windows and R buttons at the same time.
  2. +
  3. In the 'run' box that appears, enter this exact text:
    %localappdata%\Packages\ConcernedApe.StardewValleyPC_0c8vynj4cqe4e\LocalCache\Roaming\StardewValley\ErrorLogs
  4. +
  5. If you get an error with the title "Location is not available", try the "with Steam or GOG" instructions above.
  6. +
  7. Otherwise the log file is SMAPI-crash.txt if it exists, otherwise SMAPI-latest.txt.
  8. +
+
+

How do I share my log?

@@ -354,7 +372,7 @@ else if (Model.ParsedLog?.IsValid == true) { view raw log } - + | download
diff --git a/src/SMAPI.Web/wwwroot/Content/css/log-parser.css b/src/SMAPI.Web/wwwroot/Content/css/log-parser.css index bfbc8982..8c3acceb 100644 --- a/src/SMAPI.Web/wwwroot/Content/css/log-parser.css +++ b/src/SMAPI.Web/wwwroot/Content/css/log-parser.css @@ -291,13 +291,29 @@ table caption { /********* -** Upload form +** OS instructions *********/ -#os-list { - list-style: none; +#os-instructions { + display: grid; + grid-template-columns: minmax(16em, auto) 30em; } -div[data-os] { - display: none; +#os-instructions [role="tablist"] { + border: 0; +} + +#os-instructions [role="tab"] { + display: block; + border: 0; + position: relative; } +#os-instructions [role="tab"][aria-selected="true"] { + font-weight: bold; + border-radius: 0 10px 10px 0; +} + +[role="tab"][aria-selected="true"]::after { + content: "▶"; + padding-left: 0.5em; +} diff --git a/src/SMAPI.Web/wwwroot/Content/js/log-parser.js b/src/SMAPI.Web/wwwroot/Content/js/log-parser.js index 6ae1707e..90715375 100644 --- a/src/SMAPI.Web/wwwroot/Content/js/log-parser.js +++ b/src/SMAPI.Web/wwwroot/Content/js/log-parser.js @@ -115,17 +115,6 @@ smapi.logParser = function (data, sectionUrl) { *********/ var input = $("#input"); if (input.length) { - // instructions per OS - var systemOptions = $("input[name='os']"); - var systemInstructions = $("div[data-os]"); - - var chooseSystem = function () { - systemInstructions.hide(); - systemInstructions.filter("[data-os='" + $("input[name='os']:checked").val() + "']").show(); - }; - systemOptions.on("click", chooseSystem); - chooseSystem(); - // file upload smapi.fileUpload({ chooseFileLink: $("#choose-file-link"), -- cgit