schemaFormats)
@@ -53,14 +60,18 @@ namespace StardewModdingAPI.Web.ViewModels.JsonValidator
/// Set the validated content.
/// The validated content.
- public JsonValidatorModel SetContent(string content)
+ /// When the uploaded file will no longer be available.
+ /// A non-blocking warning while uploading the log.
+ public JsonValidatorModel SetContent(string content, DateTime? expiry, string uploadWarning = null)
{
this.Content = content;
+ this.Expiry = expiry;
+ this.UploadWarning = uploadWarning;
return this;
}
- /// Set the error which occurred while uploading the log to Pastebin.
+ /// Set the error which occurred while uploading the JSON.
/// The error message.
public JsonValidatorModel SetUploadError(string error)
{
diff --git a/src/SMAPI.Web/Views/JsonValidator/Index.cshtml b/src/SMAPI.Web/Views/JsonValidator/Index.cshtml
index de6b06a2..a5a134ac 100644
--- a/src/SMAPI.Web/Views/JsonValidator/Index.cshtml
+++ b/src/SMAPI.Web/Views/JsonValidator/Index.cshtml
@@ -1,3 +1,4 @@
+@using Humanizer
@using StardewModdingAPI.Web.Framework
@using StardewModdingAPI.Web.ViewModels.JsonValidator
@model JsonValidatorModel
@@ -26,7 +27,7 @@
{
}
-
+
@@ -67,6 +68,18 @@ else if (Model.PasteID != null)
}
+@* save warnings *@
+@if (Model.UploadWarning != null || Model.Expiry != null)
+{
+
+ @if (Model.Expiry != null)
+ {
+ This log will expire in @((DateTime.UtcNow - Model.Expiry.Value).Humanize()).
+ }
+
+
+}
+
@* upload new file *@
@if (Model.Content == null)
{
diff --git a/src/SMAPI.Web/appsettings.json b/src/SMAPI.Web/appsettings.json
index f81587ef..b3567469 100644
--- a/src/SMAPI.Web/appsettings.json
+++ b/src/SMAPI.Web/appsettings.json
@@ -26,7 +26,7 @@
"AmazonAccessKey": null,
"AmazonSecretKey": null,
"AmazonRegion": "us-east-1",
- "AmazonLogBucket": "smapi-log-parser",
+ "AmazonTempBucket": "smapi-web-temp",
"ChucklefishBaseUrl": "https://community.playstarbound.com",
"ChucklefishModPageUrlFormat": "resources/{0}",
diff --git a/src/SMAPI.Web/wwwroot/Content/css/json-validator.css b/src/SMAPI.Web/wwwroot/Content/css/json-validator.css
index cd117694..18195098 100644
--- a/src/SMAPI.Web/wwwroot/Content/css/json-validator.css
+++ b/src/SMAPI.Web/wwwroot/Content/css/json-validator.css
@@ -41,6 +41,12 @@
background: #FCC;
}
+.save-metadata {
+ margin-top: 1em;
+ font-size: 0.8em;
+ opacity: 0.3;
+}
+
/*********
** Validation results
*********/