diff --git a/webapp/components/Comment/Comment.vue b/webapp/components/Comment/Comment.vue
index 3063fc400..aeedb9e52 100644
--- a/webapp/components/Comment/Comment.vue
+++ b/webapp/components/Comment/Comment.vue
@@ -54,13 +54,14 @@
+
-
@@ -86,7 +87,6 @@ export default {
isTarget,
isCollapsed: !isTarget,
openEditCommentMenu: false,
- answered: this.$t('post.comment.answered'),
}
},
components: {
@@ -113,7 +113,6 @@ export default {
if (this.isLongComment && this.isCollapsed) {
return this.$filters.truncate(this.comment.content, COMMENT_TRUNCATE_TO_LENGTH)
}
- // console.log(this.comment.content.replace(/\?/gi, '?++'))
return this.comment.content
},
displaysComment() {
@@ -149,6 +148,10 @@ export default {
},
},
methods: {
+ reply(comment) {
+ const message = { slug: this.comment.author.slug, id: this.comment.author.id }
+ this.$emit('reply', message)
+ },
checkAnchor(anchor) {
return `#${this.anchor}` === anchor
},
@@ -176,23 +179,6 @@ export default {
this.$toast.error(err.message)
}
},
- answerComment() {
- const slug =
- '@d' +
- this.comment.author.slug +
- ''
- document.querySelector('.editor-content div').focus()
- if (document.querySelector('.is-empty')) {
- document.querySelector('.is-empty').innerHTML = slug + ' '
- } else {
- const html = document.querySelector('.editor-content').innerHTML
- document.querySelector('.editor-content div').innerHTML = html + ' ' + slug + ' '
- }
- },
},
}
@@ -218,6 +204,11 @@ export default {
float: right;
}
+.answerbutton {
+ float: right;
+ top: 0px;
+}
+
@keyframes highlight {
0% {
border: 1px solid $color-primary;
diff --git a/webapp/components/CommentForm/CommentForm.vue b/webapp/components/CommentForm/CommentForm.vue
index 6cdd08af3..c2a0e4562 100644
--- a/webapp/components/CommentForm/CommentForm.vue
+++ b/webapp/components/CommentForm/CommentForm.vue
@@ -57,6 +57,9 @@ export default {
}
},
methods: {
+ reply(message) {
+ this.$refs.editor.insertReply(message)
+ },
updateEditorContent(value) {
const sanitizedContent = this.$filters.removeHtml(value, false)
if (!this.update) {
diff --git a/webapp/components/CommentList/CommentList.vue b/webapp/components/CommentList/CommentList.vue
index 25ed62f68..d21f2b407 100644
--- a/webapp/components/CommentList/CommentList.vue
+++ b/webapp/components/CommentList/CommentList.vue
@@ -8,6 +8,7 @@