From c4f8fe0fe8b9a8a521074f138a7539e5a0f57f17 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 31 Mar 2021 14:51:36 +0200 Subject: [PATCH] Fix comments closed message when not connected Signed-off-by: Thomas Citharel --- js/src/components/Comment/CommentTree.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/src/components/Comment/CommentTree.vue b/js/src/components/Comment/CommentTree.vue index d845ebc54..2e6b1db65 100644 --- a/js/src/components/Comment/CommentTree.vue +++ b/js/src/components/Comment/CommentTree.vue @@ -39,7 +39,7 @@ - {{ + {{ $t("The organiser has chosen to close comments.") }}

-

+
{{ $t("No comments yet") }}
@@ -350,11 +350,15 @@ export default class CommentTree extends Vue { } get isAbleToComment(): boolean { - if (this.currentActor?.id) { + if (this.isConnected) { return this.areCommentsClosed || this.isEventOrganiser; } return false; } + + get isConnected(): boolean { + return this.currentActor?.id != undefined; + } }