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:
parent
569a4b6356
commit
c4f8fe0fe8
1 changed files with 7 additions and 3 deletions
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue