diff --git a/js/src/assets/undraw_just_saying.svg b/js/src/assets/undraw_just_saying.svg
deleted file mode 100644
index a9ceaf767..000000000
--- a/js/src/assets/undraw_just_saying.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/js/src/components/Comment/CommentTree.vue b/js/src/components/Comment/CommentTree.vue
index de4aa8a6b..a0ba0005e 100644
--- a/js/src/components/Comment/CommentTree.vue
+++ b/js/src/components/Comment/CommentTree.vue
@@ -6,6 +6,9 @@
@submit.prevent="createCommentForEvent(newComment)"
@keyup.ctrl.enter="createCommentForEvent(newComment)"
>
+ {{
+ $t("Comments are closed for everybody else.")
+ }}
- {{ $t("Comments have been closed.") }}
+ {{
+ $t("The organiser has chosen to close comments.")
+ }}
-
+
{{ $t("No comments yet") }}
-
@@ -281,14 +285,24 @@ export default class CommentTree extends Vue {
return this.orderedComments.filter((comment) => !comment.deletedAt || comment.totalReplies > 0);
}
+ get isEventOrganiser(): boolean {
+ return (
+ this.currentActor.id !== undefined &&
+ this.event.organizerActor !== undefined &&
+ this.currentActor.id === this.event.organizerActor.id
+ );
+ }
+
+ get areCommentsClosed(): boolean {
+ return (
+ this.currentActor.id !== undefined &&
+ this.event.options.commentModeration !== CommentModeration.CLOSED
+ );
+ }
+
get isAbleToComment(): boolean {
if (this.currentActor.id) {
- if (
- this.event.options.commentModeration !== CommentModeration.CLOSED ||
- (this.event.organizerActor && this.currentActor.id === this.event.organizerActor.id)
- ) {
- return true;
- }
+ return this.areCommentsClosed || this.isEventOrganiser;
}
return false;
}
diff --git a/js/src/i18n/en_US.json b/js/src/i18n/en_US.json
index 8e5569753..3c30d8baf 100644
--- a/js/src/i18n/en_US.json
+++ b/js/src/i18n/en_US.json
@@ -56,7 +56,6 @@
"Closed": "Closed",
"Comment deleted": "Comment deleted",
"Comment from @{username} reported": "Comment from @{username} reported",
- "Comments have been closed.": "Comments have been closed.",
"Comments": "Comments",
"Confirm my participation": "Confirm my participation",
"Confirm my particpation": "Confirm my particpation",
@@ -805,5 +804,7 @@
"Instances you follow": "Instances you follow",
"Last group created": "Last group created",
"{username} was invited to {group}": "{username} was invited to {group}",
- "The member was removed from the group {group}": "The member was removed from the group {group}"
+ "The member was removed from the group {group}": "The member was removed from the group {group}",
+ "The organiser has chosen to close comments.": "The organiser has chosen to close comments.",
+ "Comments are closed for everybody else.": "Comments are closed for everybody else."
}
diff --git a/js/src/i18n/fr_FR.json b/js/src/i18n/fr_FR.json
index 8fc756106..0b5ebb887 100644
--- a/js/src/i18n/fr_FR.json
+++ b/js/src/i18n/fr_FR.json
@@ -855,5 +855,7 @@
"Instances you follow": "Instances que vous suivez",
"Last group created": "Dernier groupe créé",
"{username} was invited to {group}": "{username} a été invité à {group}",
- "The member was removed from the group {group}": "Le ou la membre a été supprimé·e du groupe {group}"
+ "The member was removed from the group {group}": "Le ou la membre a été supprimé·e du groupe {group}",
+ "The organiser has chosen to close comments.": "L'organisateur·ice a choisi de fermer les commentaires.",
+ "Comments are closed for everybody else.": "Les commentaires sont fermés pour tous·tes les autres."
}