diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2018-12-15 00:18:51 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2018-12-15 00:18:51 -0500 |
commit | 5f620e14fa331b0721bd4044011363477dc79ef5 (patch) | |
tree | 374d13dee743a8406253175cc171ef4f81356538 /src/SMAPI.Web/wwwroot/Content/js | |
parent | 567c216161f00767b5dcdb0adf40a3bee91d18d0 (diff) | |
download | SMAPI-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.js | 33 |
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 = []; |