add status unavailable message when status can't be loaded in status preview

This commit is contained in:
Shpuld Shpuldson 2020-03-02 08:35:57 +02:00
parent 57e72b48c1
commit ab4005add5
5 changed files with 20 additions and 5 deletions
src/components/status_popover

View file

@ -5,6 +5,11 @@ const StatusPopover = {
props: [
'statusId'
],
data () {
return {
error: false
}
},
computed: {
status () {
return find(this.$store.state.statuses.allStatuses, { id: this.statusId })
@ -18,6 +23,8 @@ const StatusPopover = {
enter () {
if (!this.status) {
this.$store.dispatch('fetchStatus', this.statusId)
.then(data => (this.error = false))
.catch(e => (this.error = true))
}
}
}