summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web')
-rw-r--r--src/SMAPI.Web/Views/Mods/Index.cshtml6
-rw-r--r--src/SMAPI.Web/wwwroot/Content/js/mods.js7
2 files changed, 8 insertions, 5 deletions
diff --git a/src/SMAPI.Web/Views/Mods/Index.cshtml b/src/SMAPI.Web/Views/Mods/Index.cshtml
index 67034322..a6c94cf1 100644
--- a/src/SMAPI.Web/Views/Mods/Index.cshtml
+++ b/src/SMAPI.Web/Views/Mods/Index.cshtml
@@ -65,7 +65,7 @@
</tr>
</thead>
<tbody>
- <tr v-for="mod in mods" :key="mod.Name" v-bind:id="mod.Slug" :key="mod.Slug" v-bind:data-status="mod.BetaCompatibility != null ? mod.BetaCompatibility.Status : mod.Compatibility.Status" v-show="mod.Visible">
+ <tr v-for="mod in mods" :key="mod.Name" v-bind:id="mod.Slug" :key="mod.Slug" v-bind:data-status="mod.LatestCompatibility.Status" v-show="mod.Visible">
<td>
{{mod.Name}}
<small class="mod-alt-names" v-if="mod.AlternateNames">(aka {{mod.AlternateNames}})</small>
@@ -87,13 +87,13 @@
</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="showAdvanced"></td>
+ <td class="mod-broke-in" v-html="mod.LatestCompatibility.BrokeIn" v-show="showAdvanced"></td>
<td v-show="showAdvanced">
<span v-if="mod.SourceUrl"><a v-bind:href="mod.SourceUrl">source</a></span>
<span v-else class="mod-closed-source">no source</span>
</td>
<td v-show="showAdvanced">
- <template v-if="(mod.BetaCompatibility || mod.Compatibility).Status == 'ok' || mod.Smapi3Status == 'ok' || mod.Smapi3Status == 'soon'">
+ <template v-if="mod.LatestCompatibility.Status == 'ok' || mod.LatestCompatibility.Status == 'unofficial' || mod.Smapi3Status == 'ok' || mod.Smapi3Status == 'soon'">
<small v-if="mod.Smapi3Status == 'ok'">✓</small>
<small v-else-if="mod.Smapi3Status == 'broken'">✖</small>
<small v-else-if="mod.Smapi3Status == 'soon' && mod.Smapi3Url"><a v-bind:href="mod.Smapi3Url">↻ soon</a></small>
diff --git a/src/SMAPI.Web/wwwroot/Content/js/mods.js b/src/SMAPI.Web/wwwroot/Content/js/mods.js
index 23c7aa7e..28992908 100644
--- a/src/SMAPI.Web/wwwroot/Content/js/mods.js
+++ b/src/SMAPI.Web/wwwroot/Content/js/mods.js
@@ -124,6 +124,9 @@ smapi.modList = function (mods) {
// set initial visibility
mod.Visible = true;
+ // set overall compatibility
+ mod.LatestCompatibility = mod.BetaCompatibility || mod.Compatibility;
+
// concatenate searchable text
mod.SearchableText = [mod.Name, mod.AlternateNames, mod.Author, mod.AlternateAuthors, mod.Compatibility.Summary, mod.BrokeIn];
if (mod.Compatibility.UnofficialVersion)
@@ -202,7 +205,7 @@ smapi.modList = function (mods) {
return false;
// check status
- var status = (mod.BetaCompatibility || mod.Compatibility).Status;
+ var status = mod.LatestCompatibility.Status;
if (filters.status[status] && !filters.status[status].value)
return false;
@@ -250,7 +253,7 @@ smapi.modList = function (mods) {
* @returns {string} The compatibility group (one of 'compatible', 'workaround', 'soon', 'broken', 'abandoned', or 'invalid').
*/
getCompatibilityGroup: function (mod) {
- var status = (mod.BetaCompatibility || mod.Compatibility).Status;
+ var status = mod.LatestCompatibility.Status;
switch (status) {
// obsolete
case "abandoned":