diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-01-02 19:59:38 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-01-02 19:59:38 -0500 |
commit | e30e42762871af3900c47886b57e8c43287b290a (patch) | |
tree | 640bee64de4be8e369153ee45228aa60c571eacf /src/SMAPI.Web/Views/LogParser/Index.cshtml | |
parent | 1fab386ab1ba6ae92ff934c3869f31a1660cf3b3 (diff) | |
download | SMAPI-e30e42762871af3900c47886b57e8c43287b290a.tar.gz SMAPI-e30e42762871af3900c47886b57e8c43287b290a.tar.bz2 SMAPI-e30e42762871af3900c47886b57e8c43287b290a.zip |
add download option to log view
Diffstat (limited to 'src/SMAPI.Web/Views/LogParser/Index.cshtml')
-rw-r--r-- | src/SMAPI.Web/Views/LogParser/Index.cshtml | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index 06d46c9e..eeff776c 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -2,6 +2,7 @@ @using StardewModdingAPI.Toolkit.Utilities @using StardewModdingAPI.Web.Framework @using StardewModdingAPI.Web.Framework.LogParsing.Models +@using StardewModdingAPI.Web.ViewModels @model StardewModdingAPI.Web.ViewModels.LogParserModel @{ @@ -338,14 +339,24 @@ else if (Model.ParsedLog?.IsValid == true) } } </table> - - <small><a href="@this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID, raw = true })">view raw log</a></small> } else { <pre v-pre>@Model.ParsedLog.RawText</pre> - <small><a href="@this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID })">view parsed log</a></small> } + + <small> + @if (Model.ShowRaw) + { + <a href="@this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID })">view parsed log</a> + } + else + { + <a href="@this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID, format = LogViewFormat.RawView })">view raw log</a> + } + + | <a href="@this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID, format = LogViewFormat.RawDownload })" download>download</a> + </small> </div> } else if (Model.ParsedLog?.IsValid == false) |