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:
parent
74cc7f8c39
commit
24946c01a0
8
main.js
8
main.js
@ -35,6 +35,10 @@ var v = new Vue({
|
|||||||
if(spoilers !== null && spoilers !== ""){
|
if(spoilers !== null && spoilers !== ""){
|
||||||
this.spoilers = JSON.parse(spoilers);
|
this.spoilers = JSON.parse(spoilers);
|
||||||
}
|
}
|
||||||
|
hideCompleted = localStorage.getItem('hideCompleted')
|
||||||
|
if(hideCompleted !== null && hideCompleted !== ""){
|
||||||
|
this.hideCompleted = hideCompleted;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
user_data_serialized: function(){
|
user_data_serialized: function(){
|
||||||
@ -105,6 +109,10 @@ var v = new Vue({
|
|||||||
change_skill: function(new_skill){
|
change_skill: function(new_skill){
|
||||||
this.active_skill = new_skill;
|
this.active_skill = new_skill;
|
||||||
},
|
},
|
||||||
|
toggleHideCompleted: function(){
|
||||||
|
this.hideCompleted = !this.hideCompleted;
|
||||||
|
localStorage.setItem('hideCompleted', this.hideCompleted);
|
||||||
|
},
|
||||||
addItemToBundle: function(bundleId, itemId, itemPosition){
|
addItemToBundle: function(bundleId, itemId, itemPosition){
|
||||||
this.user_data[bundleId].push({item: itemId, position: itemPosition});
|
this.user_data[bundleId].push({item: itemId, position: itemPosition});
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user