diff options
author | Khloe Leclair <xivkhloeleclair@gmail.com> | 2022-04-11 14:29:33 -0400 |
---|---|---|
committer | Khloe Leclair <xivkhloeleclair@gmail.com> | 2022-04-11 14:29:33 -0400 |
commit | 0babc3e4461db10b05a60c138de017ff032dc884 (patch) | |
tree | b2f6e7200dbc6af2166c332e52af674e0f4eacce /src/SMAPI.Web/Views/LogParser/Index.cshtml | |
parent | 0336fb252420194d518d6c21c3d1a8f372565c2f (diff) | |
download | SMAPI-0babc3e4461db10b05a60c138de017ff032dc884.tar.gz SMAPI-0babc3e4461db10b05a60c138de017ff032dc884.tar.bz2 SMAPI-0babc3e4461db10b05a60c138de017ff032dc884.zip |
Cleanup log filtering a bit, with a clearer string for the number of total messages. Additionally, save and restore filter state from the URL for better linking.
Diffstat (limited to 'src/SMAPI.Web/Views/LogParser/Index.cshtml')
-rw-r--r-- | src/SMAPI.Web/Views/LogParser/Index.cshtml | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index 6c9feb43..7aa0fd6b 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -77,14 +77,19 @@ 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> } @@ -378,6 +383,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 +396,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> |