1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-22 07:52:43 +00:00

Fix comments closed message when not connected

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-03-31 14:51:36 +02:00
parent 569a4b6356
commit c4f8fe0fe8
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -39,7 +39,7 @@
</div>
</article>
</form>
<b-notification v-else :closable="false">{{
<b-notification v-else-if="isConnected" :closable="false">{{
$t("The organiser has chosen to close comments.")
}}</b-notification>
<p
@ -65,7 +65,7 @@
@delete-comment="deleteComment"
/>
</transition-group>
<div v-else-if="isAbleToComment" class="no-comments">
<div class="no-comments">
<span>{{ $t("No comments yet") }}</span>
</div>
</transition>
@ -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;
}
}
</script>