summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/wwwroot/Content/js
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-15 00:18:51 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-15 00:18:51 -0500
commit5f620e14fa331b0721bd4044011363477dc79ef5 (patch)
tree374d13dee743a8406253175cc171ef4f81356538 /src/SMAPI.Web/wwwroot/Content/js
parent567c216161f00767b5dcdb0adf40a3bee91d18d0 (diff)
downloadSMAPI-5f620e14fa331b0721bd4044011363477dc79ef5.tar.gz
SMAPI-5f620e14fa331b0721bd4044011363477dc79ef5.tar.bz2
SMAPI-5f620e14fa331b0721bd4044011363477dc79ef5.zip
add SMAPI 3.0 readiness to API data (#606)
Diffstat (limited to 'src/SMAPI.Web/wwwroot/Content/js')
-rw-r--r--src/SMAPI.Web/wwwroot/Content/js/mods.js33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/SMAPI.Web/wwwroot/Content/js/mods.js b/src/SMAPI.Web/wwwroot/Content/js/mods.js
index f7a8501e..23c7aa7e 100644
--- a/src/SMAPI.Web/wwwroot/Content/js/mods.js
+++ b/src/SMAPI.Web/wwwroot/Content/js/mods.js
@@ -11,7 +11,11 @@ smapi.modList = function (mods) {
soon: 0,
broken: 0,
abandoned: 0,
- invalid: 0
+ invalid: 0,
+ smapi3_unknown: 0,
+ smapi3_ok: 0,
+ smapi3_broken: 0,
+ smapi3_soon: 0
};
var data = {
mods: mods,
@@ -88,6 +92,28 @@ smapi.modList = function (mods) {
id: "show-custom",
value: true
}
+ },
+ "SMAPI 3.0": {
+ ok: {
+ label: "ready",
+ id: "show-smapi-3-ready",
+ value: true
+ },
+ soon: {
+ label: "soon",
+ id: "show-smapi-3-soon",
+ value: true
+ },
+ broken: {
+ label: "broken",
+ id: "show-smapi-3-broken",
+ value: true
+ },
+ unknown: {
+ label: "unknown",
+ id: "show-smapi-3-unknown",
+ value: true
+ }
}
},
search: ""
@@ -154,6 +180,7 @@ smapi.modList = function (mods) {
if (mod.Visible) {
stats.total++;
stats[this.getCompatibilityGroup(mod)]++;
+ stats["smapi3_" + mod.Smapi3Status]++;
}
}
},
@@ -179,6 +206,10 @@ smapi.modList = function (mods) {
if (filters.status[status] && !filters.status[status].value)
return false;
+ // check SMAPI 3.0 compatibility
+ if (filters["SMAPI 3.0"][mod.Smapi3Status] && !filters["SMAPI 3.0"][mod.Smapi3Status].value)
+ return false;
+
// check download sites
var ignoreSites = [];