Files
jsonPrism/src-tauri
poli0981andClaude Opus 4.7 58ef7e739a fix(tauri): port batch extension filter to native drag-drop (v1.3.2) (#24)
The v1.3.0/v1.3.1 desktop bundles accepted any file dropped from File
Explorer / Finder / Nautilus into the workspace, because
`ConverterWorkspace.handleMultiFileDrop` (called by `useTauriDragDrop`
on `tauri://drag-drop` events) ran `batchStore.addFiles` directly and
skipped the `direction × format` extension whitelist that the
`react-dropzone` path in `BatchPanel` / `InputPanel` enforced. Files
like `.cs` / `.py` leaked into the queue with no `wrong_format` toast.

Extract `src/lib/file-filter.ts` exposing `getAllowedExtensions`,
`extOf`, and `filterByExtension` so all three drop entry points share
one implementation. The web `react-dropzone` paths keep their previous
behavior; the Tauri callback now filters + toasts before calling
`addFiles`.

Bump package / Cargo / Tauri version to 1.3.2.

7 new unit tests cover the helper. Total: 190.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 20:05:44 +07:00
..
2026-05-13 09:43:37 +07:00
2026-05-13 09:43:37 +07:00
2026-05-13 09:43:37 +07:00
2026-05-13 09:43:37 +07:00