diff --git a/frontend/src/features/hero/components/ProcessingStatus.tsx b/frontend/src/features/hero/components/ProcessingStatus.tsx index 7c1a356..b20c318 100644 --- a/frontend/src/features/hero/components/ProcessingStatus.tsx +++ b/frontend/src/features/hero/components/ProcessingStatus.tsx @@ -66,3 +66,24 @@ export function ProcessingStatus({ hero }: { hero: HeroAdminDto }) { ); } + +/** + * The place of a photo that has no pictures yet: one calm shimmer (hidden from assistive technology) and a readable + * text. It lives in the row of the slide, so it stays mounted (and the animation keeps running) while the page asks the + * server again every few seconds, and it disappears when the photo is ready. + */ +export function PhotoPlaceholder({ failed, testId }: { failed: boolean; testId: string }) { + const { t } = useTranslation(); + return ( +
+ {busy ? t('hero.upload.progress', { done: finished, total: items.length }) : t('hero.upload.summary', { ok: added, total: items.length })} +
+{t('hero.intro')}
+{t('hero.help.save')}
+{t('common.loading')}
} {isError && ( @@ -125,7 +142,11 @@ function HeroEditor({ hero }: { hero: HeroAdminDto }) { const save = useSaveHero(); const upload = useUploadHeroImage(); const [serverError, setServerError] = useState{t('hero.schedule.hint')}
-{t('hero.slides.hint')}
- {uploadError &&{uploadError}
} + {limits && ( ++ {t('hero.slides.limits', { formats: limits.formats.join(', '), size: Math.round(limits.maxUploadBytes / (1024 * 1024)), megapixels: limits.maxMegapixels })} +
+ )} +{t('hero.slides.empty')}
} +{t('hero.slides.altHint')}
{t('hero.slides.focusPending')}
@@ -325,7 +442,10 @@ function HeroEditor({ hero }: { hero: HeroAdminDto }) {{t('hero.slides.ceiling', { max: hero.maxPublishedSlides })} @@ -358,8 +480,17 @@ function HeroEditor({ hero }: { hero: HeroAdminDto }) { )} -