mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: add .avif to all file picker accept strings
AVIF was missing from expandAccept() and every inline accept attribute, causing the OS file picker to gray out .avif files. Drag-and-drop was unaffected because it bypasses the accept filter. Added .avif to dropzone.tsx expandAccept (covers all Dropzone pickers) plus 12 inline accept strings across tool settings, pages, and file-upload-area.
This commit is contained in:
@@ -16,7 +16,7 @@ interface DropzoneProps {
|
||||
// Append explicit extensions so they are selectable.
|
||||
function expandAccept(accept?: string): string | undefined {
|
||||
if (!accept?.includes("image/*")) return accept;
|
||||
return `${accept},.heic,.heif,.hif,.jxl,.ico,.dng,.cr2,.cr3,.nef,.nrw,.arw,.orf,.rw2,.raf,.pef,.3fr,.iiq,.srw,.x3f,.rwl,.gpr,.fff,.mrw,.mef,.kdc,.dcr,.erf,.ptx,.tga,.psd,.exr,.hdr,.svgz,.jp2,.j2k,.j2c,.jpc,.jpf,.jpx,.qoi,.eps,.epsf,.dds,.cur,.apng,.dpx,.cin,.fits,.fit,.fts,.ppm,.pgm,.pbm,.pnm,.pam,.pfm`;
|
||||
return `${accept},.avif,.heic,.heif,.hif,.jxl,.ico,.dng,.cr2,.cr3,.nef,.nrw,.arw,.orf,.rw2,.raf,.pef,.3fr,.iiq,.srw,.x3f,.rwl,.gpr,.fff,.mrw,.mef,.kdc,.dcr,.erf,.ptx,.tga,.psd,.exr,.hdr,.svgz,.jp2,.j2k,.j2c,.jpc,.jpf,.jpx,.qoi,.eps,.epsf,.dds,.cur,.apng,.dpx,.cin,.fits,.fit,.fts,.ppm,.pgm,.pbm,.pnm,.pam,.pfm`;
|
||||
}
|
||||
|
||||
export function Dropzone({
|
||||
|
||||
Reference in New Issue
Block a user