mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-22 20:36:08 +00:00
Feat/kook (#1834)
* feat: add adapter file * fix: style for bot log * fix: kook bugs
This commit is contained in:
committed by
GitHub
parent
b4f92eba38
commit
0e2cd8c018
@@ -48,7 +48,7 @@ export function BotLogCard({ botLog }: { botLog: BotLog }) {
|
||||
<div className={`${styles.botLogCardContainer}`}>
|
||||
{/* 头部标签,时间 */}
|
||||
<div className={`${styles.cardTitleContainer}`}>
|
||||
<div className={`flex flex-row gap-4`}>
|
||||
<div className={`flex flex-row gap-2 items-center`}>
|
||||
<div className={`${styles.tag}`}>{botLog.level}</div>
|
||||
{botLog.message_session_id && (
|
||||
<div
|
||||
@@ -60,6 +60,7 @@ export function BotLogCard({ botLog }: { botLog: BotLog }) {
|
||||
toast.success(t('common.copySuccess'));
|
||||
});
|
||||
}}
|
||||
title={t('common.clickToCopy')}
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
@@ -67,8 +68,8 @@ export function BotLogCard({ botLog }: { botLog: BotLog }) {
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="1664"
|
||||
width="20"
|
||||
height="20"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
>
|
||||
<path
|
||||
@@ -87,7 +88,6 @@ export function BotLogCard({ botLog }: { botLog: BotLog }) {
|
||||
fill="currentColor"
|
||||
></path>
|
||||
</svg>
|
||||
{/* 会话ID */}
|
||||
|
||||
<span className={`${styles.chatId}`}>
|
||||
{getSubChatId(botLog.message_session_id)}
|
||||
@@ -95,22 +95,25 @@ export function BotLogCard({ botLog }: { botLog: BotLog }) {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div>{formatTime(botLog.timestamp)}</div>
|
||||
</div>
|
||||
<div className={`${styles.cardTitleContainer} ${styles.cardText}`}>
|
||||
{botLog.text}
|
||||
</div>
|
||||
<PhotoProvider className={``}>
|
||||
<div className={`w-50 mt-2`}>
|
||||
{botLog.images.map((item) => (
|
||||
<img
|
||||
key={item}
|
||||
src={`${baseURL}/api/v1/files/image/${item}`}
|
||||
alt=""
|
||||
/>
|
||||
))}
|
||||
<div className={`${styles.timestamp}`}>
|
||||
{formatTime(botLog.timestamp)}
|
||||
</div>
|
||||
</PhotoProvider>
|
||||
</div>
|
||||
<div className={`${styles.cardText}`}>{botLog.text}</div>
|
||||
{botLog.images.length > 0 && (
|
||||
<PhotoProvider>
|
||||
<div className={`flex flex-wrap gap-2 mt-3`}>
|
||||
{botLog.images.map((item) => (
|
||||
<img
|
||||
key={item}
|
||||
src={`${baseURL}/api/v1/files/image/${item}`}
|
||||
alt=""
|
||||
className="max-w-xs rounded cursor-pointer hover:opacity-90 transition-opacity"
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</PhotoProvider>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user