diff --git a/frontend/src/components/MultiUploadFileList.tsx b/frontend/src/components/MultiUploadFileList.tsx new file mode 100644 index 0000000..0f616aa --- /dev/null +++ b/frontend/src/components/MultiUploadFileList.tsx @@ -0,0 +1,74 @@ +import { formatFileSize } from '../lib/fileUtils'; + +export interface FileListItem { + id: string; + file: File; + autoTitle: string; +} + +interface MultiUploadFileListProps { + files: FileListItem[]; + onRemove: (id: string) => void; + onClearAll: () => void; + disabled?: boolean; +} + +export function MultiUploadFileList({ + files, + onRemove, + onClearAll, + disabled = false +}: MultiUploadFileListProps) { + const totalSize = files.reduce((sum, f) => sum + f.file.size, 0); + + return ( +
+ {item.file.name} +
++ {formatFileSize(item.file.size)} · Title: "{item.autoTitle}" +
++ Total: {formatFileSize(totalSize)} +
+Drop the video file here
++ Drop the video {multiple ? 'files' : 'file'} here +
) : (- Drag and drop a video file here, or click to select + Drag and drop video {multiple ? 'files' : 'a video file'} here, or click to select
- Supports MP4, MOV, AVI, MKV up to {Math.round(maxSize / (1024 * 1024))}MB + Supports MP4, MOV, AVI, MKV up to {Math.round(maxSize / (1024 * 1024))}MB{multiple ? ' each' : ''}
+ {upload.filename} +
+ {upload.status === 'success' && upload.jobId && ( ++ Job: "{upload.autoTitle}" +
+ )} + {upload.status === 'error' && upload.error && ( +{upload.error}
+ )} +- Select languages that need cultural adaptation instead of direct translation -
-