From 2d5e29de5d5d3d58e5477fa2ec79e20982881822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 23 Apr 2021 16:34:29 +0200 Subject: [PATCH] Allow to cancel repies and adapt comment ui to talk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .../card/CardSidebarTabComments.vue | 11 ++- src/components/card/CommentForm.vue | 1 + src/components/card/CommentItem.vue | 75 +++++++++++++++---- 3 files changed, 70 insertions(+), 17 deletions(-) diff --git a/src/components/card/CardSidebarTabComments.vue b/src/components/card/CardSidebarTabComments.vue index c12d2eff8..d10260cb6 100644 --- a/src/components/card/CardSidebarTabComments.vue +++ b/src/components/card/CardSidebarTabComments.vue @@ -7,7 +7,11 @@ - +
    @@ -36,6 +40,7 @@ import CommentItem from './CommentItem' import CommentForm from './CommentForm' import InfiniteLoading from 'vue-infinite-loading' import { getCurrentUser } from '@nextcloud/auth' + export default { name: 'CardSidebarTabComments', components: { @@ -101,6 +106,7 @@ export default { } }, async loadComments() { + this.$store.dispatch('setReplyTo', null) this.error = null this.isLoading = true try { @@ -130,6 +136,9 @@ export default { await this.$store.dispatch('fetchMore', { cardId: this.card.id }) this.isLoading = false }, + cancelReply() { + this.$store.dispatch('setReplyTo', null) + }, }, } diff --git a/src/components/card/CommentForm.vue b/src/components/card/CommentForm.vue index a530900ef..028f7ef02 100644 --- a/src/components/card/CommentForm.vue +++ b/src/components/card/CommentForm.vue @@ -178,6 +178,7 @@ export default { .comment-form__contenteditable { word-break: break-word; + border-radius: var(--border-radius-large) } .atwho-wrap { diff --git a/src/components/card/CommentItem.vue b/src/components/card/CommentItem.vue index 70d10a2f0..118ad0f4e 100644 --- a/src/components/card/CommentItem.vue +++ b/src/components/card/CommentItem.vue @@ -1,10 +1,22 @@