mirror of
https://github.com/kihashi/stardew_community_checklist.git
synced 2025-10-19 08:03:17 +00:00
Added a special filter for seasons.
This commit is contained in:
parent
f9da987ba3
commit
d6b46b5a38
14
main.js
14
main.js
@ -176,3 +176,17 @@ Vue.filter('filterByArray', function(array1, array2){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Vue.filter('seasonFilter', function(items, season_id){
|
||||||
|
return items.filter(function(element){
|
||||||
|
if(season_id == "allseasons" && element.seasons.length > 3){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if(element.seasons.length < 4 && element.seasons.indexOf(season_id) > -1){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user