feat: add chat logo

This commit is contained in:
tianzhou
2023-03-28 21:06:43 +08:00
parent ee20272a9e
commit e9314d055f
11 changed files with 78 additions and 68 deletions

View File

@ -47,7 +47,7 @@ const MessageView = (props: Props) => {
>
{isCurrentUser ? (
<>
<div className="mt-0.5 w-auto max-w-full bg-indigo-600 text-white px-4 py-2 rounded-lg whitespace-pre-wrap">
<div className="w-auto max-w-full bg-indigo-600 text-white px-4 py-2 rounded-lg whitespace-pre-wrap">
{message.content}
</div>
<div className="w-10 h-10 p-1 border rounded-full flex justify-center items-center ml-2 shrink-0">
@ -56,11 +56,11 @@ const MessageView = (props: Props) => {
</>
) : (
<>
<div className="w-10 h-10 p-1 border rounded-full flex justify-center items-center mr-2 shrink-0">
<Icon.AiOutlineRobot className="w-6 h-6" />
<div className="w-10 h-10 p-1 flex justify-center items-center mr-2 shrink-0">
<img src="/chat-logo-bot.webp" alt="" />
</div>
<ReactMarkdown
className="mt-0.5 w-auto max-w-[calc(100%-4rem)] bg-gray-100 px-4 py-2 rounded-lg prose prose-neutral"
className="w-auto max-w-[calc(100%-4rem)] bg-gray-100 px-4 py-2 rounded-lg prose prose-neutral"
remarkPlugins={[remarkGfm]}
components={{
pre({ node, className, children, ...props }) {