diff options
Diffstat (limited to 'src/SMAPI.Web/Views')
-rw-r--r-- | src/SMAPI.Web/Views/LogParser/Index.cshtml | 27 | ||||
-rw-r--r-- | src/SMAPI.Web/Views/Shared/_Layout.cshtml | 2 |
2 files changed, 26 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> diff --git a/src/SMAPI.Web/Views/Shared/_Layout.cshtml b/src/SMAPI.Web/Views/Shared/_Layout.cshtml index 67dcd3b3..1e82ab5f 100644 --- a/src/SMAPI.Web/Views/Shared/_Layout.cshtml +++ b/src/SMAPI.Web/Views/Shared/_Layout.cshtml @@ -26,6 +26,8 @@ <li><a href="@Url.PlainAction("Index", "LogParser", values: null)">Log parser</a></li> <li><a href="@Url.PlainAction("Index", "JsonValidator", values: null)">JSON validator</a></li> </ul> + + @RenderSection("SidebarExtra", required: false) </div> <div id="content-column"> <div id="content"> |