1
0
mirror of https://github.com/kihashi/stardew_community_checklist.git synced 2025-10-19 08:03:17 +00:00

Added fucntions to save and load the hideCompleted setting.

This commit is contained in:
John Cleaver 2016-04-15 20:50:37 -04:00
parent 74cc7f8c39
commit 24946c01a0

View File

@ -35,6 +35,10 @@ var v = new Vue({
if(spoilers !== null && spoilers !== ""){
this.spoilers = JSON.parse(spoilers);
}
hideCompleted = localStorage.getItem('hideCompleted')
if(hideCompleted !== null && hideCompleted !== ""){
this.hideCompleted = hideCompleted;
}
},
computed: {
user_data_serialized: function(){
@ -105,6 +109,10 @@ var v = new Vue({
change_skill: function(new_skill){
this.active_skill = new_skill;
},
toggleHideCompleted: function(){
this.hideCompleted = !this.hideCompleted;
localStorage.setItem('hideCompleted', this.hideCompleted);
},
addItemToBundle: function(bundleId, itemId, itemPosition){
this.user_data[bundleId].push({item: itemId, position: itemPosition});
},