From 888bac9408319d39b72403dad6258980b0d9067f Mon Sep 17 00:00:00 2001 From: ConnorYoh <40631091+ConnorYoh@users.noreply.github.com> Date: Fri, 22 Aug 2025 17:12:14 +0100 Subject: [PATCH] Added optional title for tool workflow (#4256) - Added optional title for tool workflow - Not added to any tool. Just there for when we need it - Added add files button to files step - renamed Local files button in filemanager to Upload Files - --------- Co-authored-by: Connor Yoh Co-authored-by: James Brunton --- .../public/locales/en-GB/translation.json | 1 + .../components/fileManager/FileInfoCard.tsx | 10 ++-- .../fileManager/FileSourceButtons.tsx | 14 ++--- .../src/components/shared/FilePreview.tsx | 19 ++++++- .../tools/shared/FileStatusIndicator.tsx | 39 ++++++++++++-- .../src/components/tools/shared/ToolStep.tsx | 9 ++-- .../tools/shared/ToolWorkflowTitle.tsx | 53 +++++++++++++++++++ .../tools/shared/createToolFlow.tsx | 6 +++ 8 files changed, 129 insertions(+), 22 deletions(-) create mode 100644 frontend/src/components/tools/shared/ToolWorkflowTitle.tsx diff --git a/frontend/public/locales/en-GB/translation.json b/frontend/public/locales/en-GB/translation.json index 63937bc74..6b720aadb 100644 --- a/frontend/public/locales/en-GB/translation.json +++ b/frontend/public/locales/en-GB/translation.json @@ -1970,6 +1970,7 @@ "dropFilesHere": "Drop files here or click to upload", "pdfFilesOnly": "PDF files only", "supportedFileTypes": "Supported file types", + "upload": "Upload", "uploadFile": "Upload File", "uploadFiles": "Upload Files", "noFilesInStorage": "No files available in storage. Upload some files first.", diff --git a/frontend/src/components/fileManager/FileInfoCard.tsx b/frontend/src/components/fileManager/FileInfoCard.tsx index f8cc84cb8..68c2a491d 100644 --- a/frontend/src/components/fileManager/FileInfoCard.tsx +++ b/frontend/src/components/fileManager/FileInfoCard.tsx @@ -17,7 +17,7 @@ const FileInfoCard: React.FC = ({ return ( - + {t('fileManager.details', 'File Details')} @@ -31,7 +31,7 @@ const FileInfoCard: React.FC = ({ - + {t('fileManager.fileFormat', 'Format')} {currentFile ? ( @@ -43,7 +43,7 @@ const FileInfoCard: React.FC = ({ )} - + {t('fileManager.fileSize', 'Size')} @@ -51,7 +51,7 @@ const FileInfoCard: React.FC = ({ - + {t('fileManager.fileVersion', 'Version')} @@ -64,4 +64,4 @@ const FileInfoCard: React.FC = ({ ); }; -export default FileInfoCard; \ No newline at end of file +export default FileInfoCard; diff --git a/frontend/src/components/fileManager/FileSourceButtons.tsx b/frontend/src/components/fileManager/FileSourceButtons.tsx index a6870a661..d2d28e09e 100644 --- a/frontend/src/components/fileManager/FileSourceButtons.tsx +++ b/frontend/src/components/fileManager/FileSourceButtons.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Stack, Text, Button, Group } from '@mantine/core'; import HistoryIcon from '@mui/icons-material/History'; -import FolderIcon from '@mui/icons-material/Folder'; +import UploadIcon from '@mui/icons-material/Upload'; import CloudIcon from '@mui/icons-material/Cloud'; import { useTranslation } from 'react-i18next'; import { useFileManagerContext } from '../../contexts/FileManagerContext'; @@ -10,7 +10,7 @@ interface FileSourceButtonsProps { horizontal?: boolean; } -const FileSourceButtons: React.FC = ({ +const FileSourceButtons: React.FC = ({ horizontal = false }) => { const { activeSource, onSourceChange, onLocalFileClick } = useFileManagerContext(); @@ -44,11 +44,11 @@ const FileSourceButtons: React.FC = ({ > {horizontal ? t('fileManager.recent', 'Recent') : t('fileManager.recent', 'Recent')} - + - +