From 5f620e14fa331b0721bd4044011363477dc79ef5 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 15 Dec 2018 00:18:51 -0500 Subject: add SMAPI 3.0 readiness to API data (#606) --- src/SMAPI.Web/wwwroot/Content/js/mods.js | 33 +++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'src/SMAPI.Web/wwwroot/Content') 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 = []; -- cgit From 0130416bd1d54f243252ebe00f78c185342ab9d3 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 15 Dec 2018 14:35:39 -0500 Subject: show SMAPI 3.0 readiness for unofficial updates too (#606) --- src/SMAPI.Web/Views/Mods/Index.cshtml | 6 +++--- src/SMAPI.Web/wwwroot/Content/js/mods.js | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/SMAPI.Web/wwwroot/Content') 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 @@ - + {{mod.Name}} (aka {{mod.AlternateNames}}) @@ -87,13 +87,13 @@
⚠ {{warning}}
- + source no source -