Persist show archived state
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2021-01-30 20:59:42 +01:00
parent 826d90c7eb
commit c49345c31b
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 1 deletions

View File

@ -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>