Fix comments closed message when not connected
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
569a4b6356
commit
c4f8fe0fe8
|
@ -39,7 +39,7 @@
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
</form>
|
</form>
|
||||||
<b-notification v-else :closable="false">{{
|
<b-notification v-else-if="isConnected" :closable="false">{{
|
||||||
$t("The organiser has chosen to close comments.")
|
$t("The organiser has chosen to close comments.")
|
||||||
}}</b-notification>
|
}}</b-notification>
|
||||||
<p
|
<p
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
@delete-comment="deleteComment"
|
@delete-comment="deleteComment"
|
||||||
/>
|
/>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
<div v-else-if="isAbleToComment" class="no-comments">
|
<div class="no-comments">
|
||||||
<span>{{ $t("No comments yet") }}</span>
|
<span>{{ $t("No comments yet") }}</span>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
@ -350,11 +350,15 @@ export default class CommentTree extends Vue {
|
||||||
}
|
}
|
||||||
|
|
||||||
get isAbleToComment(): boolean {
|
get isAbleToComment(): boolean {
|
||||||
if (this.currentActor?.id) {
|
if (this.isConnected) {
|
||||||
return this.areCommentsClosed || this.isEventOrganiser;
|
return this.areCommentsClosed || this.isEventOrganiser;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isConnected(): boolean {
|
||||||
|
return this.currentActor?.id != undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue