balibabu commited on
Commit
7483940
·
1 Parent(s): c037a22

fix: if the conversation name is too long, it will overflow the current item. #607 (#972)

Browse files

### What problem does this PR solve?

fix: if the conversation name is too long, it will overflow the current
item. #607

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

web/src/pages/chat/index.less CHANGED
@@ -8,6 +8,7 @@
8
 
9
  .chatAppContent {
10
  overflow-y: auto;
 
11
  }
12
 
13
  .chatAppCard {
 
8
 
9
  .chatAppContent {
10
  overflow-y: auto;
11
+ width: 100%;
12
  }
13
 
14
  .chatAppCard {
web/src/pages/chat/index.tsx CHANGED
@@ -17,6 +17,7 @@ import {
17
  Space,
18
  Spin,
19
  Tag,
 
20
  } from 'antd';
21
  import { MenuItemProps } from 'antd/lib/menu/MenuItem';
22
  import classNames from 'classnames';
@@ -46,6 +47,8 @@ import { IDialog } from '@/interfaces/database/chat';
46
  import ChatOverviewModal from './chat-overview-modal';
47
  import styles from './index.less';
48
 
 
 
49
  const Chat = () => {
50
  const dialogList = useSelectFirstDialogOnMount();
51
  const { onRemoveDialog } = useDeleteDialog();
@@ -260,7 +263,14 @@ const Chat = () => {
260
  <Space size={15}>
261
  <Avatar src={x.icon} shape={'square'} />
262
  <section>
263
- <b>{x.name}</b>
 
 
 
 
 
 
 
264
  <div>{x.description}</div>
265
  </section>
266
  </Space>
@@ -315,7 +325,14 @@ const Chat = () => {
315
  })}
316
  >
317
  <Flex justify="space-between" align="center">
318
- <div>{x.name}</div>
 
 
 
 
 
 
 
319
  {conversationActivated === x.id && x.id !== '' && (
320
  <section>
321
  <Dropdown
 
17
  Space,
18
  Spin,
19
  Tag,
20
+ Typography,
21
  } from 'antd';
22
  import { MenuItemProps } from 'antd/lib/menu/MenuItem';
23
  import classNames from 'classnames';
 
47
  import ChatOverviewModal from './chat-overview-modal';
48
  import styles from './index.less';
49
 
50
+ const { Text } = Typography;
51
+
52
  const Chat = () => {
53
  const dialogList = useSelectFirstDialogOnMount();
54
  const { onRemoveDialog } = useDeleteDialog();
 
263
  <Space size={15}>
264
  <Avatar src={x.icon} shape={'square'} />
265
  <section>
266
+ <b>
267
+ <Text
268
+ ellipsis={{ tooltip: x.name }}
269
+ style={{ width: 130 }}
270
+ >
271
+ {x.name}
272
+ </Text>
273
+ </b>
274
  <div>{x.description}</div>
275
  </section>
276
  </Space>
 
325
  })}
326
  >
327
  <Flex justify="space-between" align="center">
328
+ <div>
329
+ <Text
330
+ ellipsis={{ tooltip: x.name }}
331
+ style={{ width: 150 }}
332
+ >
333
+ {x.name}
334
+ </Text>
335
+ </div>
336
  {conversationActivated === x.id && x.id !== '' && (
337
  <section>
338
  <Dropdown