diff --git a/js/src/assets/undraw_just_saying.svg b/js/src/assets/undraw_just_saying.svg
deleted file mode 100644
index a9ceaf76..00000000
--- 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 de4aa8a6..a0ba0005 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.")
+ }}
@@ -22,7 +25,9 @@
- {{ $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 8e556975..3c30d8ba 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 8fc75610..0b5ebb88 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."
}