diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-06-27 09:47:31 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-06-27 09:47:31 -0400 |
commit | 3e5c109df1f90904c2dcb177e35b35f003e90fd9 (patch) | |
tree | 7c06948b4dd20bacda354e67b81070804eb65ac1 /src/SMAPI.Web/ViewModels | |
parent | cf3728562771b20b66c3f9307a72ae3b19b10bdf (diff) | |
download | SMAPI-3e5c109df1f90904c2dcb177e35b35f003e90fd9.tar.gz SMAPI-3e5c109df1f90904c2dcb177e35b35f003e90fd9.tar.bz2 SMAPI-3e5c109df1f90904c2dcb177e35b35f003e90fd9.zip |
add log parser option to view raw log
Diffstat (limited to 'src/SMAPI.Web/ViewModels')
-rw-r--r-- | src/SMAPI.Web/ViewModels/LogParserModel.cs | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/SMAPI.Web/ViewModels/LogParserModel.cs b/src/SMAPI.Web/ViewModels/LogParserModel.cs index 0fbd8ad5..df36ca73 100644 --- a/src/SMAPI.Web/ViewModels/LogParserModel.cs +++ b/src/SMAPI.Web/ViewModels/LogParserModel.cs @@ -27,6 +27,9 @@ namespace StardewModdingAPI.Web.ViewModels /// <summary>The parsed log info.</summary> public ParsedLog ParsedLog { get; set; } + /// <summary>Whether to show the raw unparsed log.</summary> + public bool ShowRaw { get; set; } + /// <summary>An error which occurred while uploading the log to Pastebin.</summary> public string UploadError { get; set; } @@ -43,12 +46,24 @@ namespace StardewModdingAPI.Web.ViewModels /// <summary>Construct an instance.</summary> /// <param name="sectionUrl">The root URL for the log parser controller.</param> /// <param name="pasteID">The paste ID.</param> - /// <param name="parsedLog">The parsed log info.</param> - public LogParserModel(string sectionUrl, string pasteID, ParsedLog parsedLog) + public LogParserModel(string sectionUrl, string pasteID) { this.SectionUrl = sectionUrl; this.PasteID = pasteID; + this.ParsedLog = null; + this.ShowRaw = false; + } + + /// <summary>Construct an instance.</summary> + /// <param name="sectionUrl">The root URL for the log parser controller.</param> + /// <param name="pasteID">The paste ID.</param> + /// <param name="parsedLog">The parsed log info.</param> + /// <param name="showRaw">Whether to show the raw unparsed log.</param> + public LogParserModel(string sectionUrl, string pasteID, ParsedLog parsedLog, bool showRaw) + : this(sectionUrl, pasteID) + { this.ParsedLog = parsedLog; + this.ShowRaw = showRaw; } /// <summary>Get all content packs in the log grouped by the mod they're for.</summary> |