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:
@@ -614,7 +614,7 @@ export function BeautifyControls({
|
||||
<input
|
||||
ref={bgInputRef}
|
||||
type="file"
|
||||
accept="image/*,.heic,.heif,.hif"
|
||||
accept="image/*,.avif,.heic,.heif,.hif"
|
||||
onChange={(e) => {
|
||||
const file = e.target.files?.[0] ?? null;
|
||||
setBgImageFile(file);
|
||||
|
||||
@@ -105,7 +105,7 @@ function UploadArea() {
|
||||
const input = document.createElement("input");
|
||||
input.type = "file";
|
||||
input.multiple = true;
|
||||
input.accept = "image/*,.heic,.heif,.hif";
|
||||
input.accept = "image/*,.avif,.heic,.heif,.hif";
|
||||
input.onchange = (e) => {
|
||||
const files = Array.from((e.target as HTMLInputElement).files || []);
|
||||
if (files.length > 0) addImages(files);
|
||||
@@ -595,7 +595,7 @@ function ImageStrip() {
|
||||
const input = document.createElement("input");
|
||||
input.type = "file";
|
||||
input.multiple = true;
|
||||
input.accept = "image/*,.heic,.heif,.hif";
|
||||
input.accept = "image/*,.avif,.heic,.heif,.hif";
|
||||
input.onchange = (e) => {
|
||||
const files = Array.from((e.target as HTMLInputElement).files || []);
|
||||
if (files.length > 0) store.addImages(files);
|
||||
|
||||
@@ -58,7 +58,7 @@ export function CompareSettings() {
|
||||
id="compare-second-image"
|
||||
ref={secondInputRef}
|
||||
type="file"
|
||||
accept="image/*,.heic,.heif,.hif"
|
||||
accept="image/*,.avif,.heic,.heif,.hif"
|
||||
onChange={(e) => setSecondFile(e.target.files?.[0] ?? null)}
|
||||
className="hidden"
|
||||
/>
|
||||
|
||||
@@ -65,7 +65,7 @@ export function ComposeSettings() {
|
||||
id="compose-overlay-image"
|
||||
ref={overlayInputRef}
|
||||
type="file"
|
||||
accept="image/*,.heic,.heif,.hif"
|
||||
accept="image/*,.avif,.heic,.heif,.hif"
|
||||
onChange={(e) => setOverlayFile(e.target.files?.[0] ?? null)}
|
||||
className="hidden"
|
||||
/>
|
||||
|
||||
@@ -192,7 +192,7 @@ function TemplateGallery() {
|
||||
<input
|
||||
ref={fileInputRef}
|
||||
type="file"
|
||||
accept="image/*,.heic,.heif,.hif"
|
||||
accept="image/*,.avif,.heic,.heif,.hif"
|
||||
onChange={handleFileChange}
|
||||
className="hidden"
|
||||
/>
|
||||
|
||||
@@ -666,7 +666,7 @@ export function QrGenerateSettings() {
|
||||
<input
|
||||
ref={logoInputRef}
|
||||
type="file"
|
||||
accept="image/*,.heic,.heif,.hif"
|
||||
accept="image/*,.avif,.heic,.heif,.hif"
|
||||
onChange={handleLogoUpload}
|
||||
className="hidden"
|
||||
/>
|
||||
|
||||
@@ -369,7 +369,7 @@ export function RemoveBgControls({ settings: _settings, onChange }: RemoveBgCont
|
||||
Choose background image
|
||||
<input
|
||||
type="file"
|
||||
accept="image/*,.heic,.heif,.hif"
|
||||
accept="image/*,.avif,.heic,.heif,.hif"
|
||||
className="hidden"
|
||||
onChange={(e) => {
|
||||
const file = e.target.files?.[0];
|
||||
|
||||
@@ -110,7 +110,7 @@ export function WatermarkImageSettings() {
|
||||
<input
|
||||
ref={watermarkInputRef}
|
||||
type="file"
|
||||
accept="image/*,.heic,.heif,.hif"
|
||||
accept="image/*,.avif,.heic,.heif,.hif"
|
||||
onChange={(e) => setWatermarkFile(e.target.files?.[0] ?? null)}
|
||||
className="hidden"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user