Hero-admin: schakelaar Actief, destructieve knoppen rood, slide-kopjes, juiste voorvertoning in het focusvenster, status per foto
- Schakelaar (role=switch) Actief / Niet actief bij de knoppen, gedimde rij; 'Verberg voor schermlezers'; veld 'Beschrijving' binnen een groep 'Slide N'
- Alle foto's zonder complete set tonen 'Wordt verwerkt' (voortgang bij de foto die bezig is, 'in de wachtrij' bij de rest); totaal bovenaan telt ook nog niet opgeslagen foto's
- Per foto 'Verwerking afgerond' (zelfde weergave voor een hergebruikte foto), foto direct bruikbaar; niet-opgeslagen foto's worden zelf ververst (GET /hero/images/{id}), ook in een achtergrondtab
- Focusvenster toont de hele foto (full-preview in elke set, achtergrond-aanvulling voor oude sets) in plaats van de uitgesneden wide-variant (vervorming)
- Prullenbak en 'Wijzigingen weggooien' in de destructieve stijl
- upload-respons: reused (intern)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,8 @@ export function useHero() {
|
||||
queryFn: () => api.get<HeroAdminDto>('/api/v1/hero/all'),
|
||||
// Images are cut in the background after an upload or a saved focus change: look again until they are all ready.
|
||||
refetchInterval: (query) => (query.state.data?.slides.some((s) => s.image.processing) ? 5000 : false),
|
||||
// Also while the tab is in the background or the connection came back: the state must never stay stale.
|
||||
refetchIntervalInBackground: true,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -58,3 +60,11 @@ export function useHeroUploadLimits() {
|
||||
staleTime: 10 * 60 * 1000,
|
||||
});
|
||||
}
|
||||
|
||||
/** The query of one image: the page asks it for photos that were uploaded but not saved yet, until they are ready. */
|
||||
export const heroImageQuery = (imageId: string) => ({
|
||||
queryKey: ['hero', 'image', imageId],
|
||||
queryFn: () => api.get<HeroImageDto>(`/api/v1/hero/images/${imageId}`),
|
||||
refetchInterval: (query: { state: { data?: HeroImageDto } }) => (query.state.data?.processing ? 5000 : false),
|
||||
refetchIntervalInBackground: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user