summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Views/LogParser/Index.cshtml
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-16 12:59:21 -0400
committerGitHub <noreply@github.com>2022-04-16 12:59:21 -0400
commitc3f6983009c3570851541321a691d1d5e3735766 (patch)
treee621666bc95db2833de6a9be021b2caad47472a7 /src/SMAPI.Web/Views/LogParser/Index.cshtml
parent9ba06704077c32f84aa4c4aeff8b75e66e1c0486 (diff)
parent64b9da560fcde5696b27126adbc45e8331f1cc70 (diff)
downloadSMAPI-c3f6983009c3570851541321a691d1d5e3735766.tar.gz
SMAPI-c3f6983009c3570851541321a691d1d5e3735766.tar.bz2
SMAPI-c3f6983009c3570851541321a691d1d5e3735766.zip
Merge pull request #840 from KhloeLeclair/log-cleanup
[Website] Cleanup log filtering a bit more, save state to URL
Diffstat (limited to 'src/SMAPI.Web/Views/LogParser/Index.cshtml')
-rw-r--r--src/SMAPI.Web/Views/LogParser/Index.cshtml27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml
index 2cf7d1e7..dfb603f2 100644
--- a/src/SMAPI.Web/Views/LogParser/Index.cshtml
+++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml
@@ -77,18 +77,38 @@
logStarted: new Date(@this.ForJson(log?.Timestamp)),
dataElement: "script#serializedData",
showPopup: @this.ForJson(log == null),
- showMods: @this.ForJson(log?.Mods.Select(p => Model.GetSlug(p.Name)).Distinct().ToDictionary(slug => slug, _ => true)),
+ showMods: @this.ForJson(log?.Mods.Where(p => p.Loaded && !p.IsContentPack).Select(p => Model.GetSlug(p.Name)).Distinct().ToDictionary(slug => slug, _ => true)),
showSections: @this.ForJson(Enum.GetNames(typeof(LogSection)).ToDictionary(section => section, _ => false)),
showLevels: @this.ForJson(defaultFilters),
enableFilters: @this.ForJson(!Model.ShowRaw)
}
);
- new Tabby("[data-tabs]");
+ @if (log == null)
+ {
+ <text>
+ new Tabby("[data-tabs]");
+ </text>
+ }
});
</script>
}
+@* quick navigation links *@
+@section SidebarExtra {
+ @if (log != null)
+ {
+ <nav id="quickNav">
+ <h4>Scroll to...</h4>
+ <ul>
+ <li><a href="#content">Top</a></li>
+ <li><a href="#filterHolder">Log start</a></li>
+ <li><a href="#footer">Bottom</a></li>
+ </ul>
+ </nav>
+ }
+}
+
@* upload result banner *@
@if (Model.UploadError != null)
{
@@ -378,6 +398,7 @@ else if (log?.IsValid == true)
<input
type="text"
v-bind:class="{ active: !!filterText }"
+ v-model="filterText"
v-on:input="updateFilterText"
placeholder="search to filter log..."
/>
@@ -390,7 +411,7 @@ else if (log?.IsValid == true)
v-bind:start="start"
v-bind:end="end"
v-bind:pages="totalPages"
- v-bind:filtered="filteredMessages.length"
+ v-bind:filtered="filteredMessages.total"
v-bind:total="totalMessages"
/>
</div>