summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI.Web/Views/LogParser/Index.cshtml118
-rw-r--r--src/SMAPI.Web/wwwroot/Content/css/log-parser.css26
-rw-r--r--src/SMAPI.Web/wwwroot/Content/js/log-parser.js11
3 files changed, 89 insertions, 66 deletions
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 @@
{
<meta name="robots" content="noindex" />
}
- <link rel="stylesheet" href="~/Content/css/file-upload.css?r=202002" />
- <link rel="stylesheet" href="~/Content/css/log-parser.css?r=202002" />
+ <link rel="stylesheet" href="~/Content/css/file-upload.css" />
+ <link rel="stylesheet" href="~/Content/css/log-parser.css" />
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tabbyjs@12.0.3/dist/css/tabby-ui-vertical.min.css" />
+ <script src="https://cdn.jsdelivr.net/npm/tabbyjs@12.0.3" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.11" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1" crossorigin="anonymous"></script>
- <script src="~/Content/js/file-upload.js?r=202002"></script>
- <script src="~/Content/js/log-parser.js?r=202002"></script>
+ <script src="~/Content/js/file-upload.js"></script>
+ <script src="~/Content/js/log-parser.js"></script>
<script>
$(function() {
smapi.logParser({
@@ -41,6 +43,8 @@
enableFilters: @this.ForJson(!Model.ShowRaw),
screenIds: @this.ForJson(screenIds)
}, '@this.Url.PlainAction("Index", "LogParser", values: null)');
+
+ new Tabby('[data-tabs]');
});
</script>
}
@@ -91,51 +95,65 @@ else if (Model.ParsedLog?.IsValid == true)
@if (Model.ParsedLog == null)
{
<h2>Where do I find my SMAPI log?</h2>
- <div>What system do you use?</div>
- <ul id="os-list">
- @foreach (Platform platform in new[] { Platform.Android, Platform.Linux, Platform.Mac, Platform.Windows })
- {
- <li>
- <input type="radio" name="os" value="@platform" id="os-@platform" checked="@(Model.DetectedPlatform == platform)" />
- <label for="os-@platform">@platform</label>
- </li>
- }
- </ul>
- <div data-os="@Platform.Android">
- On Android:
- <ol>
- <li>Open a file app (like My Files or MT Manager).</li>
- <li>Find the <code>StardewValley</code> folder on your internal storage.</li>
- <li>Open the <code>ErrorLogs</code> subfolder.</li>
- <li>The log file is <code>SMAPI-crash.txt</code> if it exists, otherwise <code>SMAPI-latest.txt</code>.</li>
- </ol>
- </div>
- <div data-os="@Platform.Linux">
- On Linux:
- <ol>
- <li>Open the Files app.</li>
- <li>Click the options menu (might be labeled <em>Go</em> or <code>⋮</code>).</li>
- <li>Choose <em>Enter Location</em>.</li>
- <li>Enter this exact text: <pre>~/.config/StardewValley/ErrorLogs</pre></li>
- <li>The log file is <code>SMAPI-crash.txt</code> if it exists, otherwise <code>SMAPI-latest.txt</code>.</li>
- </ol>
- </div>
- <div data-os="@Platform.Mac">
- On macOS:
- <ol>
- <li>Open the Finder app.</li>
- <li>Click <em>Go</em> at the top, then <em>Go to Folder</em>.</li>
- <li>Enter this exact text: <pre>~/.config/StardewValley/ErrorLogs</pre></li>
- <li>The log file is <code>SMAPI-crash.txt</code> if it exists, otherwise <code>SMAPI-latest.txt</code>.</li>
- </ol>
- </div>
- <div data-os="@Platform.Windows">
- On Windows:
- <ol>
- <li>Press the <code>Windows</code> and <code>R</code> buttons at the same time.</li>
- <li>In the 'run' box that appears, enter this exact text: <pre>%appdata%\StardewValley\ErrorLogs</pre></li>
- <li>The log file is <code>SMAPI-crash.txt</code> if it exists, otherwise <code>SMAPI-latest.txt</code>.</li>
- </ol>
+ <div id="os-instructions">
+ <div>
+ <ul data-tabs>
+ @foreach (Platform platform in new[] {Platform.Android, Platform.Linux, Platform.Mac, Platform.Windows})
+ {
+ @if (platform == Platform.Windows)
+ {
+ <li><a data-tabby-default href="#@(platform)-steamgog">@platform (Steam or GOG)</a></li>
+ <li><a href="#@(platform)-xbox">@platform (Xbox app)</a></li>
+ }
+ else
+ {
+ <li><a href="#@platform">@platform</a></li>
+ }
+ }
+ </ul>
+ </div>
+ <div>
+ <div id="@Platform.Android">
+ <ol>
+ <li>Open a file app (like My Files or MT Manager).</li>
+ <li>Find the <code>StardewValley</code> folder on your internal storage.</li>
+ <li>Open the <code>ErrorLogs</code> subfolder.</li>
+ <li>The log file is <code>SMAPI-crash.txt</code> if it exists, otherwise <code>SMAPI-latest.txt</code>.</li>
+ </ol>
+ </div>
+ <div id="@Platform.Linux">
+ <ol>
+ <li>Open the Files app.</li>
+ <li>Click the options menu (might be labeled <em>Go</em> or <code>⋮</code>).</li>
+ <li>Choose <em>Enter Location</em>.</li>
+ <li>Enter this exact text: <pre>~/.config/StardewValley/ErrorLogs</pre></li>
+ <li>The log file is <code>SMAPI-crash.txt</code> if it exists, otherwise <code>SMAPI-latest.txt</code>.</li>
+ </ol>
+ </div>
+ <div id="@Platform.Mac">
+ <ol>
+ <li>Open the Finder app.</li>
+ <li>Click <em>Go</em> at the top, then <em>Go to Folder</em>.</li>
+ <li>Enter this exact text: <pre>~/.config/StardewValley/ErrorLogs</pre></li>
+ <li>The log file is <code>SMAPI-crash.txt</code> if it exists, otherwise <code>SMAPI-latest.txt</code>.</li>
+ </ol>
+ </div>
+ <div id="@(Platform.Windows)-steamgog">
+ <ol>
+ <li>Press the <kbd>Windows</kbd> and <kbd>R</kbd> buttons at the same time.</li>
+ <li>In the 'run' box that appears, enter this exact text: <pre>%appdata%\StardewValley\ErrorLogs</pre></li>
+ <li>The log file is <code>SMAPI-crash.txt</code> if it exists, otherwise <code>SMAPI-latest.txt</code>.</li>
+ </ol>
+ </div>
+ <div id="@(Platform.Windows)-xbox">
+ <ol>
+ <li>Press the <kbd>Windows</kbd> and <kbd>R</kbd> buttons at the same time.</li>
+ <li>In the 'run' box that appears, enter this exact text: <pre>%localappdata%\Packages\ConcernedApe.StardewValleyPC_0c8vynj4cqe4e\LocalCache\Roaming\StardewValley\ErrorLogs</pre></li>
+ <li>If you get an error with the title "Location is not available", try the "with Steam or GOG" instructions above.</li>
+ <li>Otherwise the log file is <code>SMAPI-crash.txt</code> if it exists, otherwise <code>SMAPI-latest.txt</code>.</li>
+ </ol>
+ </div>
+ </div>
</div>
<h2>How do I share my log?</h2>
@@ -354,7 +372,7 @@ else if (Model.ParsedLog?.IsValid == true)
{
<a href="@this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID, format = LogViewFormat.RawView })">view raw log</a>
}
-
+
| <a href="@this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID, format = LogViewFormat.RawDownload })" download>download</a>
</small>
</div>
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"),