diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-04-07 23:05:29 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-04-07 23:05:29 +0300 |
commit | 23300ff857a2123b17d79f0a7584ec15309938ca (patch) | |
tree | 822e3fbb00094e17b0597993b6a67c7e2d342b2d /src | |
parent | 323d9b287518c9829f1fbfc2798bbad4ebc82f84 (diff) |
Fix outbox send now error handling and improve message action labels
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'src')
-rw-r--r-- | src/components/OutboxMessageListItem.vue | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/components/OutboxMessageListItem.vue b/src/components/OutboxMessageListItem.vue index 74cb65e37..6a8431743 100644 --- a/src/components/OutboxMessageListItem.vue +++ b/src/components/OutboxMessageListItem.vue @@ -40,13 +40,13 @@ icon="icon-checkmark" :close-after-click="true" @click="sendMessage"> - {{ t('mail', 'Send message now') }} + {{ t('mail', 'Send now') }} </ActionButton> <ActionButton icon="icon-delete" :close-after-click="true" @click="deleteMessage"> - {{ t('mail', 'Delete message') }} + {{ t('mail', 'Delete') }} </ActionButton> </template> </ListItem> @@ -109,8 +109,12 @@ export default { }, async sendMessage(data) { logger.debug('sending message', { data }) - await this.$store.dispatch('outbox/sendMessage', { id: this.message.id }) - showSuccess(t('mail', 'Message sent')) + try { + await this.$store.dispatch('outbox/sendMessage', { id: this.message.id }) + showSuccess(t('mail', 'Message sent')) + } catch (error) { + showError(t('mail', 'Could not send message')) + } }, async openModal() { await this.$store.dispatch('showMessageComposer', { |