summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/wwwroot/Content
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-16 17:25:58 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-16 17:25:58 -0500
commitb214a76965d98ca785b64b490533b6bf66371a48 (patch)
tree76017f8b5762d9cb4e179d32a6b44270e6726051 /src/SMAPI.Web/wwwroot/Content
parent13ed6decf55a7fd72c34b965397011d3012cb9cc (diff)
parentfd0af5f3c149629b91bbe1651a7bda9564b860eb (diff)
downloadSMAPI-b214a76965d98ca785b64b490533b6bf66371a48.tar.gz
SMAPI-b214a76965d98ca785b64b490533b6bf66371a48.tar.bz2
SMAPI-b214a76965d98ca785b64b490533b6bf66371a48.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Web/wwwroot/Content')
-rw-r--r--src/SMAPI.Web/wwwroot/Content/js/mods.js40
1 files changed, 37 insertions, 3 deletions
diff --git a/src/SMAPI.Web/wwwroot/Content/js/mods.js b/src/SMAPI.Web/wwwroot/Content/js/mods.js
index f7a8501e..28992908 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: ""
@@ -98,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)
@@ -154,6 +183,7 @@ smapi.modList = function (mods) {
if (mod.Visible) {
stats.total++;
stats[this.getCompatibilityGroup(mod)]++;
+ stats["smapi3_" + mod.Smapi3Status]++;
}
}
},
@@ -175,10 +205,14 @@ 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;
+ // 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 = [];
@@ -219,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":