From 5962a593da64d3e22bae72fa476ccb46bffe1fc7 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Mon, 4 Nov 2024 20:29:36 +0800 Subject: [PATCH] no message --- app/Models/WebSocketDialogMsg.php | 12 ++++++------ resources/assets/js/functions/web.js | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/Models/WebSocketDialogMsg.php b/app/Models/WebSocketDialogMsg.php index 47a50c5c4..83fcb5c30 100644 --- a/app/Models/WebSocketDialogMsg.php +++ b/app/Models/WebSocketDialogMsg.php @@ -584,7 +584,7 @@ class WebSocketDialogMsg extends AbstractModel case 'meeting': $action = Doo::translate("会议"); - return "[{$action}] " . Base::cutStr($data['msg']['name'], 30); + return "[{$action}] " . Base::cutStr($data['msg']['name'], 50); case 'file': return self::previewFileMsg($data['msg']); @@ -602,7 +602,7 @@ class WebSocketDialogMsg extends AbstractModel return "[{$action}] " . self::previewMsg($data['msg']['data']); case 'notice': - return Base::cutStr(Doo::translate($data['msg']['notice']), 30); + return Base::cutStr(Doo::translate($data['msg']['notice']), 50); case 'template': return self::previewTemplateMsg($data['msg']); @@ -637,7 +637,7 @@ class WebSocketDialogMsg extends AbstractModel $text = strip_tags($text); $text = str_replace([" ", "&", "<", ">"], [" ", "&", "<", ">"], $text); $text = preg_replace("/\s+/", " ", $text); - $text = Base::cutStr($text, 30); + $text = Base::cutStr($text, 50); } return $text; } @@ -657,7 +657,7 @@ class WebSocketDialogMsg extends AbstractModel return "[{$action}]"; } $action = Doo::translate("文件"); - return "[{$action}] " . Base::cutStr($msg['name'], 30); + return "[{$action}] " . Base::cutStr($msg['name'], 50); } /** @@ -671,13 +671,13 @@ class WebSocketDialogMsg extends AbstractModel return $msg['title_raw']; } if ($msg['type'] === 'task_list' && count($msg['list']) === 1) { - return Doo::translate($msg['title']) . ": " . Base::cutStr($msg['list'][0]['name'], 30); + return Doo::translate($msg['title']) . ": " . Base::cutStr($msg['list'][0]['name'], 50); } if (!empty($msg['title'])) { return Doo::translate($msg['title']); } if ($msg['type'] === 'content' && is_string($msg['content']) && $msg['content'] !== '') { - return Base::cutStr(Doo::translate($msg['content']), 30); + return Base::cutStr(Doo::translate($msg['content']), 50); } return Doo::translate('未知的消息'); } diff --git a/resources/assets/js/functions/web.js b/resources/assets/js/functions/web.js index 731ce1ebb..c54d14fea 100755 --- a/resources/assets/js/functions/web.js +++ b/resources/assets/js/functions/web.js @@ -282,7 +282,7 @@ import {MarkdownPreview} from "../store/markdown"; text = text.replace(/\[image:(.*?)\]/g, ``) text = text.replace(/\{\{RemoteURL\}\}/g, this.apiUrl('../')) } else { - text = $A.cutString(text, 30) + text = $A.cutString(text, 50) } return text }, @@ -407,7 +407,7 @@ import {MarkdownPreview} from "../store/markdown"; case 'record': return `[${$A.L('语音')}]` case 'meeting': - return `[${$A.L('会议')}] ${$A.cutString(data.msg.name, 30)}` + return `[${$A.L('会议')}] ${$A.cutString(data.msg.name, 50)}` case 'file': return $A.fileMsgSimpleDesc(data.msg, imgClassName) case 'tag': @@ -417,7 +417,7 @@ import {MarkdownPreview} from "../store/markdown"; case 'todo': return `[${$A.L(data.msg.action === 'remove' ? '取消待办' : (data.msg.action === 'done' ? '完成' : '设待办'))}] ${$A.getMsgSimpleDesc(data.msg.data)}` case 'notice': - return $A.cutString($A.L(data.msg.notice), 30) + return $A.cutString($A.L(data.msg.notice), 50) case 'template': return $A.templateMsgSimpleDesc(data.msg) case 'preview': @@ -450,7 +450,7 @@ import {MarkdownPreview} from "../store/markdown"; } else if (msg.ext == 'mp4') { return `[${$A.L('视频')}]` } - return `[${$A.L('文件')}] ${$A.cutString(msg.name, 30)}` + return `[${$A.L('文件')}] ${$A.cutString(msg.name, 50)}` }, /** @@ -463,13 +463,13 @@ import {MarkdownPreview} from "../store/markdown"; return msg.title_raw } if (msg.type === 'task_list' && $A.arrayLength(msg.list) === 1) { - return $A.L(msg.title) + ": " + $A.cutString(msg.list[0].name, 30) + return $A.L(msg.title) + ": " + $A.cutString(msg.list[0].name, 50) } if (msg.title) { return $A.L(msg.title) } if (msg.type === 'content' && typeof msg.content === 'string' && msg.content !== '') { - return $A.cutString($A.L(msg.content), 30) + return $A.cutString($A.L(msg.content), 50) } return $A.L('未知的消息') },