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', + }}>