feat: add batch processing for multiple file uploads
- Add BatchState management in taskStore with progress tracking - Implement batch processing service with concurrency control - Direct Track: max 5 parallel tasks - OCR Track: sequential processing (GPU VRAM limit) - Refactor ProcessingPage to support batch mode with BatchProcessingPanel - Update UploadPage to initialize batch state for multi-file uploads - Add i18n translations for batch processing (zh-TW, en-US) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,11 +14,30 @@ import PreprocessingSettings from '@/components/PreprocessingSettings'
|
||||
import PreprocessingPreview from '@/components/PreprocessingPreview'
|
||||
import ProcessingTrackSelector from '@/components/ProcessingTrackSelector'
|
||||
import TaskNotFound from '@/components/TaskNotFound'
|
||||
import BatchProcessingPanel from '@/components/BatchProcessingPanel'
|
||||
import { useTaskValidation } from '@/hooks/useTaskValidation'
|
||||
import { useTaskStore, useProcessingState } from '@/store/taskStore'
|
||||
import { useTaskStore, useProcessingState, useIsBatchMode } from '@/store/taskStore'
|
||||
import type { LayoutModel, ProcessingOptions, PreprocessingMode, PreprocessingConfig, ProcessingTrack } from '@/types/apiV2'
|
||||
|
||||
/**
|
||||
* ProcessingPage - Main entry point
|
||||
* Routes to batch or single task processing based on state
|
||||
*/
|
||||
export default function ProcessingPage() {
|
||||
const isBatchMode = useIsBatchMode()
|
||||
|
||||
// Route to appropriate component
|
||||
if (isBatchMode) {
|
||||
return <BatchProcessingPanel />
|
||||
}
|
||||
|
||||
return <SingleTaskProcessing />
|
||||
}
|
||||
|
||||
/**
|
||||
* SingleTaskProcessing - Original single task processing UI
|
||||
*/
|
||||
function SingleTaskProcessing() {
|
||||
const { t } = useTranslation()
|
||||
const navigate = useNavigate()
|
||||
const { toast } = useToast()
|
||||
|
||||
Reference in New Issue
Block a user