mirror of
https://github.com/kihashi/stardew_community_checklist.git
synced 2025-10-19 08:03:17 +00:00
Merge branch 'master' into JSON
This commit is contained in:
commit
2f1f9323a9
24
index.html
24
index.html
@ -18,7 +18,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="header-left">
|
<div class="header-left">
|
||||||
<div class="header-item">
|
<div class="header-item">
|
||||||
<a href="/"><h1 class="title">Stardew Community Checklist</h1></a>
|
<a href="./"><h1 class="title">Stardew Community Checklist</h1></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
@ -141,9 +141,25 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h3 class="title">{{ static.bundles[active_bundle].name }}</h3>
|
<div class="columns">
|
||||||
<progress class="progress is-info" value="{{ user_data[active_bundle].length }}"
|
<div class="column">
|
||||||
max="{{ static.bundles[active_bundle].items_required }}"></progress>
|
<h3 class="title">{{ static.bundles[active_bundle].name }}</h3>
|
||||||
|
<h5 class="subtitle">{{ static.bundles[active_bundle].reward }}</h5>
|
||||||
|
<progress class="progress is-info"
|
||||||
|
value="{{ user_data[active_bundle].length }}"
|
||||||
|
max="{{ static.bundles[active_bundle].items_required }}"></progress>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<h3 class="title">{{ static.rooms[static.bundles[active_bundle].room].name }}</h3>
|
||||||
|
<h5 class="subtitle">{{ static.rooms[static.bundles[active_bundle].room].reward }}</h5>
|
||||||
|
<progress class="progress is-info"
|
||||||
|
value="{{ getRoomItemsChecked(static.bundles[active_bundle].room) }}"
|
||||||
|
max="{{ getRoomItemsRequired(static.bundles[active_bundle].room) }}"
|
||||||
|
>
|
||||||
|
|
||||||
|
</progress>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="columns is-multiline">
|
<div class="columns is-multiline">
|
||||||
<div class="column is-3 is-flex" v-for="item in static.items | inBundle active_bundle">
|
<div class="column is-3 is-flex" v-for="item in static.items | inBundle active_bundle">
|
||||||
<div class="card is-fullwidth is-flex eq-line">
|
<div class="card is-fullwidth is-flex eq-line">
|
||||||
|
|||||||
16
main.js
16
main.js
@ -116,6 +116,22 @@ var v = new Vue({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
},
|
||||||
|
getRoomItemsRequired: function(roomId) {
|
||||||
|
return this.static.bundles.reduce(function(previousValue, nextValue){
|
||||||
|
if(nextValue.room === roomId){
|
||||||
|
return previousValue + nextValue.items_required;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return previousValue;
|
||||||
|
}
|
||||||
|
}, 0)
|
||||||
|
},
|
||||||
|
getRoomItemsChecked: function(roomId){
|
||||||
|
return this.static.bundles
|
||||||
|
.filter(function(b){ return b.room === roomId; })
|
||||||
|
.map(function(b){ return b.id; })
|
||||||
|
.reduce(function(p, c){ return p + v.user_data[c].length; }, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user