From 6329339a323e876ea2d1cac76b15b9d065224c50 Mon Sep 17 00:00:00 2001 From: balibabu Date: Fri, 26 Apr 2024 18:55:37 +0800 Subject: [PATCH] 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) --- web/src/locales/en.ts | 1 + web/src/locales/zh-traditional.ts | 1 + web/src/locales/zh.ts | 1 + .../pages/file-manager/action-cell/index.tsx | 46 +++++++++++-------- 4 files changed, 29 insertions(+), 20 deletions(-) diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts index 94e7fcff..31da8897 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 b0391f89..133dd301 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 36b85de1..26455539 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 1c8aeae0..b3d0eeed 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 ( - + + + - - {record.type !== 'folder' && ( + + + {record.type !== 'folder' && ( + + + )} );