From 0e821d1c84f250316be3bb59d2147aaac6b114e3 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sun, 27 Oct 2024 11:18:27 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BB=BB=E5=8A=A1=E5=8F=98=E5=8C=96?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=8A=A0=E4=B8=8A=E4=BB=BB=E5=8A=A1=E6=A0=87?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/WebSocketDialogMsg.php | 3 +++ resources/assets/js/functions/web.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/app/Models/WebSocketDialogMsg.php b/app/Models/WebSocketDialogMsg.php index 8cae5439e..d6c04fdef 100644 --- a/app/Models/WebSocketDialogMsg.php +++ b/app/Models/WebSocketDialogMsg.php @@ -628,6 +628,9 @@ class WebSocketDialogMsg extends AbstractModel if (!empty($msg['title_raw'])) { return $msg['title_raw']; } + if ($msg['type'] === 'task_list' && count($msg['list']) === 1) { + return Doo::translate($msg['title']) . ": " . $msg['list'][0]['name']; + } if (!empty($msg['title'])) { return Doo::translate($msg['title']); } diff --git a/resources/assets/js/functions/web.js b/resources/assets/js/functions/web.js index 8f2a88594..c76692b52 100755 --- a/resources/assets/js/functions/web.js +++ b/resources/assets/js/functions/web.js @@ -454,6 +454,9 @@ import {MarkdownPreview} from "../store/markdown"; if (msg.title_raw) { return msg.title_raw } + if (msg.type === 'task_list' && $A.arrayLength(msg.list) === 1) { + return $A.L(msg.title) + ": " + msg.list[0].name + } if (msg.title) { return $A.L(msg.title) }