fix: 修复深色模式下气泡样式的用户名样式错误问题

This reverts commit 69513cc76e3ac5180160a64ff9bf5c0d497bdc57.
This commit is contained in:
kangfenmao 2025-02-25 19:28:43 +08:00
parent 91104e288c
commit d6b87ece23
2 changed files with 7 additions and 4 deletions

View File

@ -63,7 +63,7 @@
--chat-background: #111111;
--chat-background-user: #28b561;
--chat-background-assistant: #2c2c2c;
--chat-text-user: var(--color-text);
--chat-text-user: var(--color-black);
--list-item-border-radius: 16px;
}
@ -246,7 +246,7 @@ body,
color: var(--chat-text-user) !important;
}
.message-action-button:hover {
background-color: var(--color-text-3);
background-color: var(--color-white-soft);
}
}
.group-message-wrapper {

View File

@ -89,7 +89,9 @@ const MessageHeader: FC<Props> = memo(({ assistant, model, message }) => {
/>
)}
<UserWrap>
<UserName>{username}</UserName>
<UserName isBubbleStyle={isBubbleStyle} theme={theme}>
{username}
</UserName>
<MessageTime>{dayjs(message.createdAt).format('MM/DD HH:mm')}</MessageTime>
</UserWrap>
</AvatarWrapper>
@ -119,9 +121,10 @@ const UserWrap = styled.div`
justify-content: space-between;
`
const UserName = styled.div`
const UserName = styled.div<{ isBubbleStyle?: boolean; theme?: string }>`
font-size: 14px;
font-weight: 600;
color: ${(props) => (props.isBubbleStyle && props.theme === 'dark' ? 'white' : 'var(--color-text)')};
`
const MessageTime = styled.div`