aboutsummaryrefslogtreecommitdiff
path: root/src/components/status_popover/status_popover.js
diff options
context:
space:
mode:
authorShpuld Shpuldson <shp@cock.li>2020-03-02 08:35:57 +0200
committerShpuld Shpuldson <shp@cock.li>2020-03-02 08:35:57 +0200
commitab4005add57f36cc78b774971f9942c5894362dc (patch)
tree8d7e5d54d839df53187553e6fe379b23a33c059f /src/components/status_popover/status_popover.js
parent57e72b48c1fec74a860fd5abc75f0e9c4986c3f6 (diff)
add status unavailable message when status can't be loaded in status preview
Diffstat (limited to 'src/components/status_popover/status_popover.js')
-rw-r--r--src/components/status_popover/status_popover.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/components/status_popover/status_popover.js b/src/components/status_popover/status_popover.js
index cb55f67e..159132a9 100644
--- a/src/components/status_popover/status_popover.js
+++ b/src/components/status_popover/status_popover.js
@@ -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))
}
}
}