Persist show archived state
This commit is contained in:
parent
826d90c7eb
commit
c49345c31b
1 changed files with 5 additions and 1 deletions
|
@ -7,7 +7,7 @@
|
||||||
Create saved filter
|
Create saved filter
|
||||||
</x-button>
|
</x-button>
|
||||||
|
|
||||||
<fancycheckbox class="show-archived-check" v-model="showArchived">
|
<fancycheckbox class="show-archived-check" v-model="showArchived" @change="saveShowArchivedState">
|
||||||
Show Archived
|
Show Archived
|
||||||
</fancycheckbox>
|
</fancycheckbox>
|
||||||
|
|
||||||
|
@ -99,6 +99,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.showArchived = localStorage.getItem('showArchived') ?? false
|
||||||
this.loadBackgroundsForLists()
|
this.loadBackgroundsForLists()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -136,6 +137,9 @@ export default {
|
||||||
this.$store.dispatch('lists/toggleListFavorite', list)
|
this.$store.dispatch('lists/toggleListFavorite', list)
|
||||||
.catch(e => this.error(e, this))
|
.catch(e => this.error(e, this))
|
||||||
},
|
},
|
||||||
|
saveShowArchivedState() {
|
||||||
|
localStorage.setItem('showArchived', this.showArchived)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue