diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-05-07 22:41:37 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-05-07 22:41:37 -0400 |
commit | a500812e88ac5a8acdd9732963e6fae95c0a73e6 (patch) | |
tree | 9f36571698b14ab4d898385d7bb14998efd30836 /src/SMAPI.Web/Views/LogParser/Index.cshtml | |
parent | c58d01d0cf45d6f5c7f75281cb6270afc68272db (diff) | |
download | SMAPI-a500812e88ac5a8acdd9732963e6fae95c0a73e6.tar.gz SMAPI-a500812e88ac5a8acdd9732963e6fae95c0a73e6.tar.bz2 SMAPI-a500812e88ac5a8acdd9732963e6fae95c0a73e6.zip |
update web project to .NET Core 3.1
Diffstat (limited to 'src/SMAPI.Web/Views/LogParser/Index.cshtml')
-rw-r--r-- | src/SMAPI.Web/Views/LogParser/Index.cshtml | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index 2183992b..9b611bcd 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -1,5 +1,4 @@ @using Humanizer -@using Newtonsoft.Json @using StardewModdingAPI.Toolkit.Utilities @using StardewModdingAPI.Web.Framework @using StardewModdingAPI.Web.Framework.LogParsing.Models @@ -12,7 +11,6 @@ .GetValues(typeof(LogLevel)) .Cast<LogLevel>() .ToDictionary(level => level.ToString().ToLower(), level => level != LogLevel.Trace); - JsonSerializerSettings noFormatting = new JsonSerializerSettings { Formatting = Formatting.None }; string curPageUrl = this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID }, absoluteUrl: true); } @@ -32,12 +30,12 @@ <script> $(function() { smapi.logParser({ - logStarted: new Date(@Json.Serialize(Model.ParsedLog?.Timestamp)), - showPopup: @Json.Serialize(Model.ParsedLog == null), - showMods: @Json.Serialize(Model.ParsedLog?.Mods?.Select(p => Model.GetSlug(p.Name)).Distinct().ToDictionary(slug => slug, slug => true), noFormatting), - showSections: @Json.Serialize(Enum.GetNames(typeof(LogSection)).ToDictionary(section => section, section => false), noFormatting), - showLevels: @Json.Serialize(defaultFilters, noFormatting), - enableFilters: @Json.Serialize(!Model.ShowRaw) + logStarted: new Date(@this.ForJson(Model.ParsedLog?.Timestamp)), + showPopup: @this.ForJson(Model.ParsedLog == null), + showMods: @this.ForJson(Model.ParsedLog?.Mods?.Select(p => Model.GetSlug(p.Name)).Distinct().ToDictionary(slug => slug, slug => true)), + showSections: @this.ForJson(Enum.GetNames(typeof(LogSection)).ToDictionary(section => section, section => false)), + showLevels: @this.ForJson(defaultFilters), + enableFilters: @this.ForJson(!Model.ShowRaw) }, '@this.Url.PlainAction("Index", "LogParser", values: null)'); }); </script> |