mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-12-21 09:35:42 +00:00
Turn component into a small vue app and add public private comment logic
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="comment-container" v-if="shouldRenderPublic">
|
||||
<label class="col-form-label" for="content">{{
|
||||
$t("comment.label_public")
|
||||
}}</label>
|
||||
<comment-editor type="public"></comment-editor>
|
||||
</div>
|
||||
<div class="comment-container" v-if="shouldRenderPrivate">
|
||||
<label class="col-form-label" for="content">{{
|
||||
$t("comment.label_private")
|
||||
}}</label>
|
||||
<comment-editor type="private"></comment-editor>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CommentEditor from "../CommentEditor/component/CommentEditor.vue";
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
components: { CommentEditor },
|
||||
props: {
|
||||
commentMode: String,
|
||||
},
|
||||
computed: {
|
||||
shouldRenderPublic() {
|
||||
return this.commentMode === "public" || this.commentMode === "both";
|
||||
},
|
||||
shouldRenderPrivate() {
|
||||
return this.commentMode === "private" || this.commentMode === "both";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user