From f04748aa5c45963b03af318c8669eb6efe117c6a Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Sat, 4 Oct 2025 14:56:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9C=A8=E5=AF=B9=E8=AF=9D=E4=B8=AD?= =?UTF-8?q?=E6=89=93=E5=BC=80=E5=AF=B9=E8=AF=9D=E8=AF=A6=E6=83=85=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/ui/chat/ChatFragment.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/client/ui/chat/ChatFragment.tsx b/client/ui/chat/ChatFragment.tsx index b2dd01b..e0834f1 100644 --- a/client/ui/chat/ChatFragment.tsx +++ b/client/ui/chat/ChatFragment.tsx @@ -19,6 +19,7 @@ import EventBus from "../../EventBus.ts"; interface Args extends React.HTMLAttributes { target: string showReturnButton?: boolean + openChatInfoDialog: (chat: Chat) => void onReturnButtonClicked?: () => void } @@ -46,7 +47,7 @@ const markedInstance = new marked.Marked({ } }) -export default function ChatFragment({ target, showReturnButton, onReturnButtonClicked, ...props }: Args) { +export default function ChatFragment({ target, showReturnButton, onReturnButtonClicked, openChatInfoDialog, ...props }: Args) { const [messagesList, setMessagesList] = React.useState([] as Message[]) const [chatInfo, setChatInfo] = React.useState({ title: '加載中...' @@ -108,7 +109,7 @@ export default function ChatFragment({ target, showReturnButton, onReturnButtonC } function callback(data: unknown) { EventBus.emit('RecentsList.updateRecents') - + const { chat, msg } = (data as OnMessageData) if (target == chat) { setMessagesList(messagesList.concat([msg])) @@ -226,6 +227,14 @@ export default function ChatFragment({ target, showReturnButton, onReturnButtonC } 設定 +
+ openChatInfoDialog(chatInfo)} style={{ + alignSelf: 'center', + marginLeft: '5px', + marginRight: '5px', + }}>