From ab4005add57f36cc78b774971f9942c5894362dc Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 2 Mar 2020 08:35:57 +0200 Subject: add status unavailable message when status can't be loaded in status preview --- src/components/status_popover/status_popover.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/components/status_popover/status_popover.js') 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)) } } } -- cgit v1.2.3-70-g09d2