Skip to content

Commit

Permalink
fix: if the conversation name is too long, it will overflow the curre…
Browse files Browse the repository at this point in the history
…nt item. infiniflow#607
  • Loading branch information
cike8899 committed May 29, 2024
1 parent 614defe commit 411b088
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions web/src/pages/chat/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

.chatAppContent {
overflow-y: auto;
width: 100%;
}

.chatAppCard {
Expand Down
21 changes: 19 additions & 2 deletions web/src/pages/chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
Space,
Spin,
Tag,
Typography,
} from 'antd';
import { MenuItemProps } from 'antd/lib/menu/MenuItem';
import classNames from 'classnames';
Expand Down Expand Up @@ -46,6 +47,8 @@ import { IDialog } from '@/interfaces/database/chat';
import ChatOverviewModal from './chat-overview-modal';
import styles from './index.less';

const { Text } = Typography;

const Chat = () => {
const dialogList = useSelectFirstDialogOnMount();
const { onRemoveDialog } = useDeleteDialog();
Expand Down Expand Up @@ -260,7 +263,14 @@ const Chat = () => {
<Space size={15}>
<Avatar src={x.icon} shape={'square'} />
<section>
<b>{x.name}</b>
<b>
<Text
ellipsis={{ tooltip: x.name }}
style={{ width: 130 }}
>
{x.name}
</Text>
</b>
<div>{x.description}</div>
</section>
</Space>
Expand Down Expand Up @@ -315,7 +325,14 @@ const Chat = () => {
})}
>
<Flex justify="space-between" align="center">
<div>{x.name}</div>
<div>
<Text
ellipsis={{ tooltip: x.name }}
style={{ width: 150 }}
>
{x.name}
</Text>
</div>
{conversationActivated === x.id && x.id !== '' && (
<section>
<Dropdown
Expand Down

0 comments on commit 411b088

Please sign in to comment.