diff --git a/src/components/admin-image-field.tsx b/src/components/admin-image-field.tsx index a444a3b..3881c82 100644 --- a/src/components/admin-image-field.tsx +++ b/src/components/admin-image-field.tsx @@ -70,8 +70,16 @@ export function AdminImageField({ name, label, initialValue }: AdminImageFieldPr accept="image/jpeg,image/png,image/webp,image/avif" onChange={handleFileChange} disabled={status === "uploading"} - className="block text-xs" + className="hidden" /> + {status === "uploading" ? (
{t.adminImageField.uploading}
) : null} diff --git a/src/components/admin-image-list-field.tsx b/src/components/admin-image-list-field.tsx index db6c536..5d1d2b3 100644 --- a/src/components/admin-image-list-field.tsx +++ b/src/components/admin-image-list-field.tsx @@ -88,8 +88,16 @@ export function AdminImageListField({ name, label, initialValues }: AdminImageLi accept="image/jpeg,image/png,image/webp,image/avif" onChange={handleFileChange} disabled={status === "uploading"} - className="block text-xs" + className="hidden" /> + {status === "uploading" ? ({t.adminImageField.uploading}
) : null} diff --git a/src/components/admin-video-field.tsx b/src/components/admin-video-field.tsx index 2553c7b..034143b 100644 --- a/src/components/admin-video-field.tsx +++ b/src/components/admin-video-field.tsx @@ -68,8 +68,16 @@ export function AdminVideoField({ name, label, initialValue }: AdminVideoFieldPr accept="video/mp4,video/webm" onChange={handleFileChange} disabled={status === "uploading"} - className="block text-xs" + className="hidden" /> + {status === "uploading" ? ({t.adminVideoField.uploading}
) : null} diff --git a/src/i18n/dictionaries/de.ts b/src/i18n/dictionaries/de.ts index ce319dc..db17475 100644 --- a/src/i18n/dictionaries/de.ts +++ b/src/i18n/dictionaries/de.ts @@ -1129,6 +1129,7 @@ export const de: Dictionary = { }, adminImageField: { none: "Kein Bild", + chooseFile: "Datei auswählen", uploading: "Wird hochgeladen…", remove: "Bild entfernen", removeImageAt: (position) => `Bild ${position} entfernen`, @@ -1136,6 +1137,7 @@ export const de: Dictionary = { }, adminVideoField: { none: "Kein Video", + chooseFile: "Datei auswählen", uploading: "Wird hochgeladen…", remove: "Video entfernen", uploadError: "Der Upload ist fehlgeschlagen.", diff --git a/src/i18n/dictionaries/en.ts b/src/i18n/dictionaries/en.ts index 7601513..53b9f4b 100644 --- a/src/i18n/dictionaries/en.ts +++ b/src/i18n/dictionaries/en.ts @@ -1129,6 +1129,7 @@ export const en: Dictionary = { }, adminImageField: { none: "No image", + chooseFile: "Choose file", uploading: "Uploading…", remove: "Remove image", removeImageAt: (position) => `Remove image ${position}`, @@ -1136,6 +1137,7 @@ export const en: Dictionary = { }, adminVideoField: { none: "No video", + chooseFile: "Choose file", uploading: "Uploading…", remove: "Remove video", uploadError: "The upload failed.", diff --git a/src/i18n/dictionary-type.ts b/src/i18n/dictionary-type.ts index 811eabe..ff79fb7 100644 --- a/src/i18n/dictionary-type.ts +++ b/src/i18n/dictionary-type.ts @@ -830,6 +830,7 @@ export interface Dictionary { * in admin/inhalte, admin/produkte, admin/ernten). */ adminImageField: { none: string; + chooseFile: string; uploading: string; remove: string; removeImageAt: (position: number) => string; @@ -839,6 +840,7 @@ export interface Dictionary { * admin/inhalte). */ adminVideoField: { none: string; + chooseFile: string; uploading: string; remove: string; uploadError: string;