From cdc7e671cec75fcaf3903fac4c48a877e9e8d4b0 Mon Sep 17 00:00:00 2001 From: weifashi <605403358@qq.com> Date: Wed, 15 Nov 2023 11:19:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=94=AE=E7=9B=98=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=87=8C=E9=9D=A2=EF=BC=8C=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=9B=9E=E8=BD=A6=E5=8F=91=E9=80=81=E8=BF=98=E6=98=AF=E6=8C=89?= =?UTF-8?q?=E9=94=AE=E5=8F=91=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 2 +- language/original-web.txt | 4 +- .../manage/components/ChatInput/index.vue | 19 +++++- .../setting/components/SystemSetting.vue | 2 +- .../assets/js/pages/manage/setting/index.vue | 2 +- .../js/pages/manage/setting/keyboard.vue | 64 +++++++++++-------- 6 files changed, 62 insertions(+), 31 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 619dbb25b..d451b2ad3 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -176,7 +176,7 @@ services: okr: container_name: "dootask-okr-${APP_ID}" - image: "kuaifan/doookr:0.0.21" + image: "kuaifan/doookr:0.0.22" environment: TZ: "${TIMEZONE:-PRC}" DOO_TASK_URL: "http://${APP_IPPR}.3" diff --git a/language/original-web.txt b/language/original-web.txt index e468697f1..9eaaf2df4 100644 --- a/language/original-web.txt +++ b/language/original-web.txt @@ -1389,4 +1389,6 @@ APP推送 文件上传限制 包含消息发送的文件 特殊设置 -打包列表 \ No newline at end of file +打包列表 +使用独立的发送按钮 +开启后,键盘上的发送按钮会被替换成换行 \ No newline at end of file diff --git a/resources/assets/js/pages/manage/components/ChatInput/index.vue b/resources/assets/js/pages/manage/components/ChatInput/index.vue index 1452765b8..2f0a6c21c 100755 --- a/resources/assets/js/pages/manage/components/ChatInput/index.vue +++ b/resources/assets/js/pages/manage/components/ChatInput/index.vue @@ -492,6 +492,11 @@ export default { } return null; }, + + separateSendButton() { + return $A.jsonParse(window.localStorage.getItem("__keyboard:data__"))?.separate_send_button === 'open'; + }, + }, watch: { // Watch content change @@ -663,6 +668,11 @@ export default { shortKey: true, handler: _ => { if (!this.isEnterSend) { + if (this.separateSendButton) { + const length = this.quill.getSelection(true).index; + this.quill.insertText(length, "\r\n"); + return false; + } this.onSend(); return false; } @@ -674,6 +684,11 @@ export default { shiftKey: false, handler: _ => { if (this.isEnterSend) { + if (this.separateSendButton) { + const length = this.quill.getSelection(true).index; + this.quill.insertText(length, "\r\n"); + return false; + } this.onSend(); return false; } @@ -786,7 +801,9 @@ export default { this.quill.insertText(length, "\r\n"); } }); - this.quill.root.setAttribute('enterkeyhint', 'send') + if (!this.separateSendButton) { + this.quill.root.setAttribute('enterkeyhint', 'send') + } }) // Ready event diff --git a/resources/assets/js/pages/manage/setting/components/SystemSetting.vue b/resources/assets/js/pages/manage/setting/components/SystemSetting.vue index 3d493ed1c..4dd8bb5c6 100644 --- a/resources/assets/js/pages/manage/setting/components/SystemSetting.vue +++ b/resources/assets/js/pages/manage/setting/components/SystemSetting.vue @@ -158,7 +158,7 @@
{{$L('是否将消息中的网络图片保存到本地服务器。')}}
- +