Skip to content

Commit

Permalink
style: 优化聊天窗口UI (#1881)
Browse files Browse the repository at this point in the history
  • Loading branch information
teojs authored Feb 18, 2025
1 parent f99851f commit 869e56b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/renderer/src/pages/home/Messages/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ const MessageContentContainer = styled.div`
justify-content: space-between;
margin-left: 46px;
margin-top: 5px;
overflow-y: auto;
`

const MessageFooter = styled.div`
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/src/pages/home/Messages/MessageGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ const MessageWrapper = styled(Scrollbar)<MessageWrapperProps>`
return props.$selected ? 'block' : 'none'
}
if (props.$layout === 'horizontal') {
return 'inline-block'
return 'inline-flex'
}
return 'block'
}};
Expand All @@ -214,7 +214,6 @@ const MessageWrapper = styled(Scrollbar)<MessageWrapperProps>`
padding: 10px;
border-radius: 6px;
max-height: 600px;
overflow-y: auto;
margin-bottom: 10px;
`
}
Expand Down
10 changes: 5 additions & 5 deletions src/renderer/src/pages/home/Messages/MessageGroupMenuBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const MessageGroupMenuBar: FC<Props> = ({
{['fold', 'vertical', 'horizontal', 'grid'].map((layout) => (
<LayoutOption
key={layout}
active={multiModelMessageStyle === layout}
$active={multiModelMessageStyle === layout}
onClick={() => setMultiModelMessageStyle(layout as MultiModelMessageStyle)}>
{layout === 'fold' ? (
<FolderOutlined />
Expand Down Expand Up @@ -100,8 +100,8 @@ const GroupMenuBar = styled.div<{ $layout: MultiModelMessageStyle }>`
overflow: hidden;
border: 0.5px solid var(--color-border);
height: 40px;
margin-left: ${({ $layout }) => (['horizontal', 'grid'].includes($layout) ? '0' : '40px')};
transition: all 0.3s ease;
background-color: var(--color-background);
`

const LayoutContainer = styled.div`
Expand All @@ -110,14 +110,14 @@ const LayoutContainer = styled.div`
flex-direction: row;
`

const LayoutOption = styled.div<{ active: boolean }>`
const LayoutOption = styled.div<{ $active: boolean }>`
cursor: pointer;
padding: 2px 10px;
border-radius: 4px;
background-color: ${({ active }) => (active ? 'var(--color-background-soft)' : 'transparent')};
background-color: ${({ $active }) => ($active ? 'var(--color-background-soft)' : 'transparent')};
&:hover {
background-color: ${({ active }) => (active ? 'var(--color-background-soft)' : 'var(--color-hover)')};
background-color: ${({ $active }) => ($active ? 'var(--color-background-soft)' : 'var(--color-hover)')};
}
`

Expand Down

0 comments on commit 869e56b

Please sign in to comment.