mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-06-04 11:24:00 +08:00
feat: add Tooltip to action icon of FileManager (#561)
### What problem does this PR solve? #345 feat: add Tooltip to action icon of FileManager ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
84b39c60f6
commit
6329339a32
@ -23,6 +23,7 @@ export default {
|
|||||||
copy: 'Copy',
|
copy: 'Copy',
|
||||||
copied: 'Copied',
|
copied: 'Copied',
|
||||||
comingSoon: 'Coming Soon',
|
comingSoon: 'Coming Soon',
|
||||||
|
download: 'Download',
|
||||||
},
|
},
|
||||||
login: {
|
login: {
|
||||||
login: 'Sign in',
|
login: 'Sign in',
|
||||||
|
@ -23,6 +23,7 @@ export default {
|
|||||||
copy: '複製',
|
copy: '複製',
|
||||||
copied: '複製成功',
|
copied: '複製成功',
|
||||||
comingSoon: '即將推出',
|
comingSoon: '即將推出',
|
||||||
|
download: '下載',
|
||||||
},
|
},
|
||||||
login: {
|
login: {
|
||||||
login: '登入',
|
login: '登入',
|
||||||
|
@ -23,6 +23,7 @@ export default {
|
|||||||
copy: '复制',
|
copy: '复制',
|
||||||
copied: '复制成功',
|
copied: '复制成功',
|
||||||
comingSoon: '即将推出',
|
comingSoon: '即将推出',
|
||||||
|
download: '下载',
|
||||||
},
|
},
|
||||||
login: {
|
login: {
|
||||||
login: '登录',
|
login: '登录',
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
DeleteOutlined,
|
DeleteOutlined,
|
||||||
DownloadOutlined,
|
DownloadOutlined,
|
||||||
EditOutlined,
|
EditOutlined,
|
||||||
ToolOutlined,
|
LinkOutlined,
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import { Button, Space, Tooltip } from 'antd';
|
import { Button, Space, Tooltip } from 'antd';
|
||||||
import { useHandleDeleteFile } from '../hooks';
|
import { useHandleDeleteFile } from '../hooks';
|
||||||
@ -30,7 +30,7 @@ const ActionCell = ({
|
|||||||
}: IProps) => {
|
}: IProps) => {
|
||||||
const documentId = record.id;
|
const documentId = record.id;
|
||||||
const beingUsed = false;
|
const beingUsed = false;
|
||||||
const { t } = useTranslate('knowledgeDetails');
|
const { t } = useTranslate('fileManager');
|
||||||
const { handleRemoveFile } = useHandleDeleteFile(
|
const { handleRemoveFile } = useHandleDeleteFile(
|
||||||
[documentId],
|
[documentId],
|
||||||
setSelectedRowKeys,
|
setSelectedRowKeys,
|
||||||
@ -58,13 +58,15 @@ const ActionCell = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Space size={0}>
|
<Space size={0}>
|
||||||
<Button
|
<Tooltip title={t('addToKnowledge')}>
|
||||||
type="text"
|
<Button
|
||||||
className={styles.iconButton}
|
type="text"
|
||||||
onClick={onShowConnectToKnowledgeModal}
|
className={styles.iconButton}
|
||||||
>
|
onClick={onShowConnectToKnowledgeModal}
|
||||||
<ToolOutlined size={20} />
|
>
|
||||||
</Button>
|
<LinkOutlined size={20} />
|
||||||
|
</Button>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
<Tooltip title={t('rename', { keyPrefix: 'common' })}>
|
<Tooltip title={t('rename', { keyPrefix: 'common' })}>
|
||||||
<Button
|
<Button
|
||||||
@ -76,23 +78,27 @@ const ActionCell = ({
|
|||||||
<EditOutlined size={20} />
|
<EditOutlined size={20} />
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Button
|
<Tooltip title={t('delete', { keyPrefix: 'common' })}>
|
||||||
type="text"
|
|
||||||
disabled={beingUsed}
|
|
||||||
onClick={handleRemoveFile}
|
|
||||||
className={styles.iconButton}
|
|
||||||
>
|
|
||||||
<DeleteOutlined size={20} />
|
|
||||||
</Button>
|
|
||||||
{record.type !== 'folder' && (
|
|
||||||
<Button
|
<Button
|
||||||
type="text"
|
type="text"
|
||||||
disabled={beingUsed}
|
disabled={beingUsed}
|
||||||
onClick={onDownloadDocument}
|
onClick={handleRemoveFile}
|
||||||
className={styles.iconButton}
|
className={styles.iconButton}
|
||||||
>
|
>
|
||||||
<DownloadOutlined size={20} />
|
<DeleteOutlined size={20} />
|
||||||
</Button>
|
</Button>
|
||||||
|
</Tooltip>
|
||||||
|
{record.type !== 'folder' && (
|
||||||
|
<Tooltip title={t('download', { keyPrefix: 'common' })}>
|
||||||
|
<Button
|
||||||
|
type="text"
|
||||||
|
disabled={beingUsed}
|
||||||
|
onClick={onDownloadDocument}
|
||||||
|
className={styles.iconButton}
|
||||||
|
>
|
||||||
|
<DownloadOutlined size={20} />
|
||||||
|
</Button>
|
||||||
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user