Turn component into a small vue app and add public private comment logic

This commit is contained in:
2025-02-06 12:46:19 +01:00
parent 9b84bc4d69
commit 10314845f6
11 changed files with 183 additions and 98 deletions

View File

@@ -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>