summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-10-27 21:15:53 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-10-27 21:15:53 -0400
commit8231d05a33d8783093dd993cbe004239039fe8e8 (patch)
tree77df6119aefd4ba0e012491b86d0096ab27b48d7 /src
parente94aaaf7c8dccd0910d6275860821b16c90ef6c6 (diff)
downloadSMAPI-8231d05a33d8783093dd993cbe004239039fe8e8.tar.gz
SMAPI-8231d05a33d8783093dd993cbe004239039fe8e8.tar.bz2
SMAPI-8231d05a33d8783093dd993cbe004239039fe8e8.zip
add warnings to compatibility list (#597)
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI.Web/ViewModels/ModModel.cs4
-rw-r--r--src/SMAPI.Web/Views/Mods/Index.cshtml1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/SMAPI.Web/ViewModels/ModModel.cs b/src/SMAPI.Web/ViewModels/ModModel.cs
index 1199fe20..309ed828 100644
--- a/src/SMAPI.Web/ViewModels/ModModel.cs
+++ b/src/SMAPI.Web/ViewModels/ModModel.cs
@@ -34,6 +34,9 @@ namespace StardewModdingAPI.Web.ViewModels
/// <summary>Links to the available mod pages.</summary>
public ModLinkModel[] ModPages { get; set; }
+ /// <summary>The human-readable warnings for players about this mod.</summary>
+ public string[] Warnings { get; set; }
+
/// <summary>A unique identifier for the mod that can be used in an anchor URL.</summary>
public string Slug { get; set; }
@@ -54,6 +57,7 @@ namespace StardewModdingAPI.Web.ViewModels
this.Compatibility = new ModCompatibilityModel(entry.Compatibility);
this.BetaCompatibility = entry.BetaCompatibility != null ? new ModCompatibilityModel(entry.BetaCompatibility) : null;
this.ModPages = this.GetModPageUrls(entry).ToArray();
+ this.Warnings = entry.Warnings;
this.Slug = entry.Anchor;
}
diff --git a/src/SMAPI.Web/Views/Mods/Index.cshtml b/src/SMAPI.Web/Views/Mods/Index.cshtml
index b2e20c7a..b326fd36 100644
--- a/src/SMAPI.Web/Views/Mods/Index.cshtml
+++ b/src/SMAPI.Web/Views/Mods/Index.cshtml
@@ -70,6 +70,7 @@
<strong v-if="mod.BetaCompatibility">SDV beta only:</strong>
<span v-html="mod.BetaCompatibility.Summary"></span>
</div>
+ <div v-for="(warning, i) in mod.Warnings">⚠ {{warning}}</div>
</td>
<td class="mod-broke-in" v-html="mod.BetaCompatibility ? mod.BetaCompatibility.BrokeIn : mod.Compatibility.BrokeIn" v-show="showAllFields"></td>
<td v-show="showAllFields">