style: update chat background colors and margins for improved UI consistency

This commit is contained in:
Teo 2025-06-09 17:53:37 +08:00
parent 8db2059605
commit 39f74cab3c
8 changed files with 25 additions and 37 deletions

View File

@ -66,9 +66,9 @@
--settings-width: 250px; --settings-width: 250px;
--scrollbar-width: 5px; --scrollbar-width: 5px;
--chat-background: #111111; --chat-background: transparent;
--chat-background-user: #28b561; --chat-background-user: #232325;
--chat-background-assistant: #2c2c2c; --chat-background-assistant: transparent;
--chat-text-user: var(--color-black); --chat-text-user: var(--color-black);
--list-item-border-radius: 8px; --list-item-border-radius: 8px;
@ -133,9 +133,9 @@
--navbar-background-mac: rgba(255, 255, 255, 0.55); --navbar-background-mac: rgba(255, 255, 255, 0.55);
--navbar-background: rgba(244, 244, 244); --navbar-background: rgba(244, 244, 244);
--chat-background: #f3f3f3; --chat-background: transparent;
--chat-background-user: #95ec69; --chat-background-user: #f3f3f3;
--chat-background-assistant: #ffffff; --chat-background-assistant: transparent;
--chat-text-user: var(--color-text); --chat-text-user: var(--color-text);
--border-width: 0.5px; --border-width: 0.5px;

View File

@ -119,32 +119,21 @@ ul {
#messages { #messages {
background-color: var(--chat-background); background-color: var(--chat-background);
} }
#inputbar {
margin: -5px 15px 15px 15px;
background: var(--color-background);
}
.system-prompt { .system-prompt {
background-color: var(--chat-background-assistant); background-color: var(--chat-background-assistant);
} }
.message-content-container { .message-content-container {
margin: 5px 0; margin: 5px 0;
border-radius: 8px; border-radius: 8px;
padding: 10px 15px 0 15px;
} }
.message-thought-container { .message-thought-container {
margin-top: 8px; margin-top: 8px;
} }
.message-user { .message-user {
color: var(--chat-text-user); .message-content-container {
.markdown, margin: 5px 0;
.anticon, border-radius: 8px 0 8px 8px;
.iconfont, padding: 10px 15px 0 15px;
.lucide,
.message-tokens {
color: var(--chat-text-user) !important;
}
.message-action-button:hover {
background-color: var(--color-white-soft);
} }
} }
.group-grid-container.horizontal, .group-grid-container.horizontal,

View File

@ -132,10 +132,7 @@ const Chat: FC<Props> = (props) => {
} }
const Container = styled.div` const Container = styled.div`
display: flex;
flex-direction: row;
height: 100%; height: 100%;
flex: 1;
` `
const Main = styled(Flex)` const Main = styled(Flex)`

View File

@ -68,15 +68,13 @@ const HomePage: FC = () => {
} }
const Container = styled.div` const Container = styled.div`
min-width: 0;
display: flex; display: flex;
flex: 1; flex: 1;
flex-direction: column; flex-direction: column;
` `
const ContentContainer = styled.div` const ContentContainer = styled.div`
display: flex;
flex: 1;
flex-direction: row;
overflow: hidden; overflow: hidden;
` `

View File

@ -912,7 +912,7 @@ const InputBarContainer = styled.div`
border: 0.5px solid var(--color-border); border: 0.5px solid var(--color-border);
transition: all 0.2s ease; transition: all 0.2s ease;
position: relative; position: relative;
margin: 14px 20px; margin: 16px 16px;
margin-top: 0; margin-top: 0;
border-radius: 15px; border-radius: 15px;
padding-top: 6px; // 为拖动手柄留出空间 padding-top: 6px; // 为拖动手柄留出空间

View File

@ -217,7 +217,7 @@ const MessageContainer = styled.div`
flex-direction: column; flex-direction: column;
position: relative; position: relative;
transition: background-color 0.3s ease; transition: background-color 0.3s ease;
padding: 0 20px; padding: 0 24px;
transform: translateZ(0); transform: translateZ(0);
will-change: transform; will-change: transform;
&.message-highlight { &.message-highlight {

View File

@ -168,7 +168,9 @@ const MessageGroup = ({ messages, topic, registerMessageElement }: Props) => {
topic, topic,
index: message.index, index: message.index,
style: { style: {
paddingTop: isGrouped && ['horizontal', 'grid'].includes(multiModelMessageStyle) ? 0 : 15 ...(isGrouped && ['horizontal', 'grid'].includes(multiModelMessageStyle)
? { padding: 0 }
: { paddingTop: 15 })
} }
} }
@ -202,7 +204,10 @@ const MessageGroup = ({ messages, topic, registerMessageElement }: Props) => {
</MessageWrapper> </MessageWrapper>
} }
trigger={gridPopoverTrigger} trigger={gridPopoverTrigger}
styles={{ root: { maxWidth: '60vw', minWidth: '550px', overflowY: 'auto', zIndex: 1000 } }}> styles={{
root: { maxWidth: '60vw', minWidth: '550px', overflowY: 'auto', zIndex: 1000 },
body: { padding: 2 }
}}>
<div style={{ cursor: 'pointer' }}>{messageContent}</div> <div style={{ cursor: 'pointer' }}>{messageContent}</div>
</Popover> </Popover>
) )
@ -259,7 +264,7 @@ const GroupContainer = styled.div<{ $isGrouped: boolean; $layout: MultiModelMess
padding-top: ${({ $isGrouped, $layout }) => ($isGrouped && 'horizontal' === $layout ? '15px' : '0')}; padding-top: ${({ $isGrouped, $layout }) => ($isGrouped && 'horizontal' === $layout ? '15px' : '0')};
&.group-container.horizontal, &.group-container.horizontal,
&.group-container.grid { &.group-container.grid {
padding: 0 20px; padding: 0 24px;
.message { .message {
padding: 0; padding: 0;
} }
@ -317,10 +322,10 @@ const MessageWrapper = styled(Scrollbar)<MessageWrapperProps>`
width: 100%; width: 100%;
&.horizontal { &.horizontal {
display: inline-block; height: 100%;
} }
&.grid { &.grid {
display: inline-block; height: 100%;
} }
&.fold { &.fold {
display: none; display: none;
@ -333,10 +338,9 @@ const MessageWrapper = styled(Scrollbar)<MessageWrapperProps>`
if ($layout === 'horizontal' && $isGrouped) { if ($layout === 'horizontal' && $isGrouped) {
return css` return css`
border: 0.5px solid var(--color-border); border: 0.5px solid var(--color-border);
padding: 10px; padding: 10px 10px 0 10px;
border-radius: 6px; border-radius: 6px;
max-height: 600px; max-height: 600px;
margin-bottom: 10px;
` `
} }
return '' return ''

View File

@ -104,7 +104,7 @@ const GroupMenuBar = styled.div<{ $layout: MultiModelMessageStyle }>`
margin: 0 20px; margin: 0 20px;
padding: 6px 10px; padding: 6px 10px;
border-radius: 6px; border-radius: 6px;
margin-top: 10px; margin-top: 6px;
justify-content: space-between; justify-content: space-between;
overflow: hidden; overflow: hidden;
border: 0.5px solid var(--color-border); border: 0.5px solid var(--color-border);