From 3e5c109df1f90904c2dcb177e35b35f003e90fd9 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 27 Jun 2018 09:47:31 -0400 Subject: add log parser option to view raw log --- src/SMAPI.Web/ViewModels/LogParserModel.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/SMAPI.Web/ViewModels') 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 /// The parsed log info. public ParsedLog ParsedLog { get; set; } + /// Whether to show the raw unparsed log. + public bool ShowRaw { get; set; } + /// An error which occurred while uploading the log to Pastebin. public string UploadError { get; set; } @@ -43,12 +46,24 @@ namespace StardewModdingAPI.Web.ViewModels /// Construct an instance. /// The root URL for the log parser controller. /// The paste ID. - /// The parsed log info. - 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; + } + + /// Construct an instance. + /// The root URL for the log parser controller. + /// The paste ID. + /// The parsed log info. + /// Whether to show the raw unparsed log. + public LogParserModel(string sectionUrl, string pasteID, ParsedLog parsedLog, bool showRaw) + : this(sectionUrl, pasteID) + { this.ParsedLog = parsedLog; + this.ShowRaw = showRaw; } /// Get all content packs in the log grouped by the mod they're for. -- cgit