diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js index 51892d0d86..f70ecd1d2f 100644 --- a/src/components/extra_buttons/extra_buttons.js +++ b/src/components/extra_buttons/extra_buttons.js @@ -25,11 +25,14 @@ const ExtraButtons = { pinStatus () { this.refreshPopper() this.$store.dispatch('pinStatus', this.status.id) + .then(() => this.$emit('onSuccess')) .catch(err => this.$emit('onError', err.error.error)) }, unpinStatus () { this.refreshPopper() this.$store.dispatch('unpinStatus', this.status.id) + .then(() => this.$emit('onSuccess')) + .catch(err => this.$emit('onError', err.error.error)) }, refreshPopper () { this.showPopper = false diff --git a/src/components/status/status.js b/src/components/status/status.js index 09a2a01066..a1ffb026a6 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -302,9 +302,9 @@ const Status = { }, showError (error) { this.error = error - setTimeout(() => { - this.error = null - }, 5000) + }, + clearError () { + this.error = undefined }, linkClicked (event) { let { target } = event diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 77949a5207..8575a95e9d 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -1,6 +1,9 @@