From 0babc3e4461db10b05a60c138de017ff032dc884 Mon Sep 17 00:00:00 2001 From: Khloe Leclair Date: Mon, 11 Apr 2022 14:29:33 -0400 Subject: 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. --- src/SMAPI.Web/Views/LogParser/Index.cshtml | 12 +++++++++--- 1 file changed, 9 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 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) + { + + new Tabby("[data-tabs]"); + + } }); } @@ -378,6 +383,7 @@ else if (log?.IsValid == true) @@ -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" /> -- cgit