add status unavailable message when status can't be loaded in status preview
This commit is contained in:
parent
57e72b48c1
commit
ab4005add5
5 changed files with 20 additions and 5 deletions
src/components/status_popover
|
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue