Preload labels and use locally stored in vuex

This commit is contained in:
kolaente 2021-06-03 22:23:04 +02:00
parent e37145cd43
commit a9d3446ce3
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
8 changed files with 246 additions and 170 deletions

View file

@ -55,6 +55,7 @@ export default {
},
created() {
this.renewTokenOnFocus()
this.loadLabels()
},
computed: mapState({
namespaces(state) {
@ -126,6 +127,12 @@ export default {
showKeyboardShortcuts() {
this.$store.commit(KEYBOARD_SHORTCUTS_ACTIVE, true)
},
loadLabels() {
this.$store.dispatch('labels/loadAllLabels')
.catch(e => {
this.error(e, this)
})
},
},
}
</script>