mirror of
https://github.com/kihashi/stardew_community_checklist.git
synced 2025-10-19 08:03:17 +00:00
commit
f50eb5ea40
@ -1230,6 +1230,10 @@
|
||||
}
|
||||
],
|
||||
"seasons": [
|
||||
{
|
||||
"id": "allseasons",
|
||||
"name": "All Seasons"
|
||||
},
|
||||
{
|
||||
"id": "spring",
|
||||
"name": "Spring"
|
||||
|
||||
@ -353,7 +353,7 @@
|
||||
<h3 class="title">{{ getSeasonName(active_season) }}</h3>
|
||||
<progress class="progress is-info" value="" max=""></progress>
|
||||
<div class="columns is-multiline">
|
||||
<template v-for="item in static.items | filterBy active_season in 'seasons'">
|
||||
<template v-for="item in static.items | seasonFilter active_season">
|
||||
<div class="column is-3 is-flex" v-if="!(hideCompleted && isCompleted(item))">
|
||||
<div class="card is-fullwidth is-flex eq-line">
|
||||
<header class="card-header">
|
||||
|
||||
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