summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Views/LogParser
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-01-02 19:59:38 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-01-02 19:59:38 -0500
commite30e42762871af3900c47886b57e8c43287b290a (patch)
tree640bee64de4be8e369153ee45228aa60c571eacf /src/SMAPI.Web/Views/LogParser
parent1fab386ab1ba6ae92ff934c3869f31a1660cf3b3 (diff)
downloadSMAPI-e30e42762871af3900c47886b57e8c43287b290a.tar.gz
SMAPI-e30e42762871af3900c47886b57e8c43287b290a.tar.bz2
SMAPI-e30e42762871af3900c47886b57e8c43287b290a.zip
add download option to log view
Diffstat (limited to 'src/SMAPI.Web/Views/LogParser')
-rw-r--r--src/SMAPI.Web/Views/LogParser/Index.cshtml17
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)