diff options
Diffstat (limited to 'src/SMAPI.Web')
-rw-r--r-- | src/SMAPI.Web/ViewModels/ModCompatibilityModel.cs | 12 | ||||
-rw-r--r-- | src/SMAPI.Web/ViewModels/ModModel.cs | 12 | ||||
-rw-r--r-- | src/SMAPI.Web/Views/Mods/Index.cshtml | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/SMAPI.Web/ViewModels/ModCompatibilityModel.cs b/src/SMAPI.Web/ViewModels/ModCompatibilityModel.cs index d331c093..61756176 100644 --- a/src/SMAPI.Web/ViewModels/ModCompatibilityModel.cs +++ b/src/SMAPI.Web/ViewModels/ModCompatibilityModel.cs @@ -11,12 +11,15 @@ namespace StardewModdingAPI.Web.ViewModels /// <summary>The compatibility status, as a string like <c>"Broken"</c>.</summary> public string Status { get; set; } - /// <summary>A link to the unofficial version which fixes compatibility, if any.</summary> - public ModLinkModel UnofficialVersion { get; set; } - /// <summary>The human-readable summary, as an HTML block.</summary> public string Summary { get; set; } + /// <summary>The game or SMAPI version which broke this mod (if applicable).</summary> + public string BrokeIn { get; set; } + + /// <summary>A link to the unofficial version which fixes compatibility, if any.</summary> + public ModLinkModel UnofficialVersion { get; set; } + /********* ** Public methods @@ -26,9 +29,10 @@ namespace StardewModdingAPI.Web.ViewModels public ModCompatibilityModel(WikiCompatibilityInfo info) { this.Status = info.Status.ToString(); + this.Summary = info.Summary; + this.BrokeIn = info.BrokeIn; if (info.UnofficialVersion != null) this.UnofficialVersion = new ModLinkModel(info.UnofficialUrl, info.UnofficialVersion.ToString()); - this.Summary = info.Summary; } } } diff --git a/src/SMAPI.Web/ViewModels/ModModel.cs b/src/SMAPI.Web/ViewModels/ModModel.cs index 4fb9d5b5..1199fe20 100644 --- a/src/SMAPI.Web/ViewModels/ModModel.cs +++ b/src/SMAPI.Web/ViewModels/ModModel.cs @@ -34,9 +34,6 @@ namespace StardewModdingAPI.Web.ViewModels /// <summary>Links to the available mod pages.</summary> public ModLinkModel[] ModPages { get; set; } - /// <summary>The game or SMAPI version which broke this mod (if applicable).</summary> - public string BrokeIn { get; set; } - /// <summary>A unique identifier for the mod that can be used in an anchor URL.</summary> public string Slug { get; set; } @@ -49,15 +46,14 @@ namespace StardewModdingAPI.Web.ViewModels public ModModel(WikiModEntry entry) { // basic info - this.Name = entry.Name; - this.AlternateNames = entry.AlternateNames; - this.Author = entry.Author; - this.AlternateAuthors = entry.AlternateAuthors; + this.Name = entry.Name.FirstOrDefault(); + this.AlternateNames = string.Join(", ", entry.Name.Skip(1).ToArray()); + this.Author = entry.Author.FirstOrDefault(); + this.AlternateAuthors = string.Join(", ", entry.Author.Skip(1).ToArray()); this.SourceUrl = this.GetSourceUrl(entry); this.Compatibility = new ModCompatibilityModel(entry.Compatibility); this.BetaCompatibility = entry.BetaCompatibility != null ? new ModCompatibilityModel(entry.BetaCompatibility) : null; this.ModPages = this.GetModPageUrls(entry).ToArray(); - this.BrokeIn = entry.BrokeIn; this.Slug = entry.Anchor; } diff --git a/src/SMAPI.Web/Views/Mods/Index.cshtml b/src/SMAPI.Web/Views/Mods/Index.cshtml index b2ab61d7..b2e20c7a 100644 --- a/src/SMAPI.Web/Views/Mods/Index.cshtml +++ b/src/SMAPI.Web/Views/Mods/Index.cshtml @@ -71,7 +71,7 @@ <span v-html="mod.BetaCompatibility.Summary"></span> </div> </td> - <td class="mod-broke-in" v-html="mod.BrokeIn" v-show="showAllFields"></td> + <td class="mod-broke-in" v-html="mod.BetaCompatibility ? mod.BetaCompatibility.BrokeIn : mod.Compatibility.BrokeIn" v-show="showAllFields"></td> <td v-show="showAllFields"> <span v-if="mod.SourceUrl"><a v-bind:href="mod.SourceUrl">source</a></span> <span v-else class="mod-closed-source">no source</span> |