mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: merge multi-image UX — batch processing, filmstrip navigation, resize/rotate redesign
Integrates feature/multi-image-ux branch with 20 commits including: - Multi-image viewer with arrow navigation and filmstrip thumbnails - Batch processing across all tool settings components - File store rewrite with FileEntry model for multi-image support - Resize settings redesigned with tab-based UI (presets, custom, scale) - Side-by-side comparison for resize results - Per-file metadata caching in strip-metadata - Client-side ZIP extraction via fflate - SSE progress correlation via clientJobId
This commit is contained in:
@@ -42,6 +42,7 @@ export async function registerBatchRoutes(
|
||||
// Parse multipart: collect all files and the settings field
|
||||
const files: ParsedFile[] = [];
|
||||
let settingsRaw: string | null = null;
|
||||
let clientJobId: string | null = null;
|
||||
|
||||
try {
|
||||
const parts = request.parts();
|
||||
@@ -60,6 +61,8 @@ export async function registerBatchRoutes(
|
||||
}
|
||||
} else if (part.fieldname === "settings") {
|
||||
settingsRaw = part.value as string;
|
||||
} else if (part.fieldname === "clientJobId") {
|
||||
clientJobId = part.value as string;
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
@@ -102,7 +105,7 @@ export async function registerBatchRoutes(
|
||||
}
|
||||
|
||||
// Create a job ID for progress tracking
|
||||
const jobId = randomUUID();
|
||||
const jobId = clientJobId || randomUUID();
|
||||
|
||||
const progress: JobProgress = {
|
||||
jobId,
|
||||
@@ -120,6 +123,7 @@ export async function registerBatchRoutes(
|
||||
"Content-Disposition": `attachment; filename="batch-${toolId}-${jobId.slice(0, 8)}.zip"`,
|
||||
"Transfer-Encoding": "chunked",
|
||||
"X-Job-Id": jobId,
|
||||
"X-File-Order": files.map(f => f.filename).join(","),
|
||||
});
|
||||
|
||||
// Create ZIP archive that pipes directly to the response
|
||||
|
||||
Reference in New Issue
Block a user