Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

feat: add Tooltip to action icon of FileManager (#561)

balibabu6329339a323e
diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts
index 94e7fcff1c..31da8897f5 100644
--- a/web/src/locales/en.ts
+++ b/web/src/locales/en.ts
@@ -23,6 +23,7 @@ export default {
copy: 'Copy',
copied: 'Copied',
comingSoon: 'Coming Soon',
+ download: 'Download',
},
login: {
login: 'Sign in',
diff --git a/web/src/locales/zh-traditional.ts b/web/src/locales/zh-traditional.ts
index b0391f89bb..133dd301f5 100644
--- a/web/src/locales/zh-traditional.ts
+++ b/web/src/locales/zh-traditional.ts
@@ -23,6 +23,7 @@ export default {
copy: '複製',
copied: '複製成功',
comingSoon: '即將推出',
+ download: '下載',
},
login: {
login: '登入',
diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.ts
index 36b85de1c5..2645553928 100644
--- a/web/src/locales/zh.ts
+++ b/web/src/locales/zh.ts
@@ -23,6 +23,7 @@ export default {
copy: '复制',
copied: '复制成功',
comingSoon: '即将推出',
+ download: '下载',
},
login: {
login: '登录',
diff --git a/web/src/pages/file-manager/action-cell/index.tsx b/web/src/pages/file-manager/action-cell/index.tsx
index 1c8aeae0d2..b3d0eeed42 100644
--- a/web/src/pages/file-manager/action-cell/index.tsx
+++ b/web/src/pages/file-manager/action-cell/index.tsx
@@ -6,7 +6,7 @@ import {
DeleteOutlined,
DownloadOutlined,
EditOutlined,
- ToolOutlined,
+ LinkOutlined,
} from '@ant-design/icons';
import { Button, Space, Tooltip } from 'antd';
import { useHandleDeleteFile } from '../hooks';
@@ -30,7 +30,7 @@ const ActionCell = ({
}: IProps) => {
const documentId = record.id;
const beingUsed = false;
- const { t } = useTranslate('knowledgeDetails');
+ const { t } = useTranslate('fileManager');
const { handleRemoveFile } = useHandleDeleteFile(
[documentId],
setSelectedRowKeys,
@@ -58,13 +58,15 @@ const ActionCell = ({
return (
<Space size={0}>
- <Button
- type="text"
- className={styles.iconButton}
- onClick={onShowConnectToKnowledgeModal}
- >
- <ToolOutlined size={20} />
- </Button>
+ <Tooltip title={t('addToKnowledge')}>
+ <Button
+ type="text"
+ className={styles.iconButton}
+ onClick={onShowConnectToKnowledgeModal}
+ >
+ <LinkOutlined size={20} />
+ </Button>
+ </Tooltip>
<Tooltip title={t('rename', { keyPrefix: 'common' })}>
<Button
@@ -76,23 +78,27 @@ const ActionCell = ({
<EditOutlined size={20} />
</Button>
</Tooltip>
- <Button
- type="text"
- disabled={beingUsed}
- onClick={handleRemoveFile}
- className={styles.iconButton}
- >
- <DeleteOutlined size={20} />
- </Button>
- {record.type !== 'folder' && (
+ <Tooltip title={t('delete', { keyPrefix: 'common' })}>
<Button
type="text"
disabled={beingUsed}
- onClick={onDownloadDocument}
+ onClick={handleRemoveFile}
className={styles.iconButton}
>
- <DownloadOutlined size={20} />
+ <DeleteOutlined size={20} />
</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>
);