From bb7cb42bf9f1f212601ecaaa5bff4b00ceb3683f Mon Sep 17 00:00:00 2001 From: Nikolai Lopin Date: Wed, 26 Jun 2024 11:01:42 +0200 Subject: [PATCH] refactor: remove answer `withSelection` (#1219) it doesn't work --- frontend/html/comments/types/battle.html | 2 +- frontend/html/comments/types/bold.html | 2 +- frontend/html/comments/types/normal.html | 2 +- frontend/html/comments/types/reply.html | 2 +- frontend/static/js/components/ReplyContainer.vue | 11 ----------- frontend/static/js/main.js | 4 ++-- 6 files changed, 6 insertions(+), 17 deletions(-) diff --git a/frontend/html/comments/types/battle.html b/frontend/html/comments/types/battle.html index 06fdcc211..d317600a0 100644 --- a/frontend/html/comments/types/battle.html +++ b/frontend/html/comments/types/battle.html @@ -52,7 +52,7 @@ {% endif %} {% if me and me.is_active_membership and comment.post.is_commentable %} -  ответить +  ответить {% endif %} diff --git a/frontend/html/comments/types/bold.html b/frontend/html/comments/types/bold.html index fe6a9591e..722308e60 100644 --- a/frontend/html/comments/types/bold.html +++ b/frontend/html/comments/types/bold.html @@ -91,7 +91,7 @@ {% endif %} {% if me and me.is_active_membership and comment.post.is_commentable %} -  ответить +  ответить {% endif %} diff --git a/frontend/html/comments/types/normal.html b/frontend/html/comments/types/normal.html index 63895f6c0..498316899 100644 --- a/frontend/html/comments/types/normal.html +++ b/frontend/html/comments/types/normal.html @@ -104,7 +104,7 @@ {% endif %} {% if me and me.is_active_membership and comment.post.is_commentable %} -  ответить +  ответить {% endif %} diff --git a/frontend/html/comments/types/reply.html b/frontend/html/comments/types/reply.html index 9b08dc38d..a5434715e 100644 --- a/frontend/html/comments/types/reply.html +++ b/frontend/html/comments/types/reply.html @@ -88,7 +88,7 @@ {% endif %} {% if me and me.is_active_membership and comment.post.is_commentable %} - +  ответить {% endif %} diff --git a/frontend/static/js/components/ReplyContainer.vue b/frontend/static/js/components/ReplyContainer.vue index 4ca1c77d5..b15f92bb8 100644 --- a/frontend/static/js/components/ReplyContainer.vue +++ b/frontend/static/js/components/ReplyContainer.vue @@ -89,17 +89,6 @@ export default { if (username !== null && username !== "") { this.appendMarkdownTextareaValue("@" + username + ", "); } - - // Add selected text as quote - const withSelection = this.replyTo.withSelection - if (withSelection) { - const selectedText = window.getSelection().toString(); - if (selectedText !== null && selectedText !== "") { - this.appendMarkdownTextareaValue("\n> " + selectedText + "\n\n"); - } - } - - this.appendMarkdownTextareaValue(""); } editor.focus() diff --git a/frontend/static/js/main.js b/frontend/static/js/main.js index d950df1a2..aca1dced3 100644 --- a/frontend/static/js/main.js +++ b/frontend/static/js/main.js @@ -76,8 +76,8 @@ new Vue({ window.scrollBy(0, commentPosition.top); } }, - showReplyForm(commentId, username, withSelection) { - this.replyTo = { commentId, username, withSelection } + showReplyForm(commentId, username) { + this.replyTo = { commentId, username } }, }, });