This commit is contained in:
seb
2026-10-08 20:59:40 +02:00
parent ca4033b626
commit 40416cdae5

View File

@@ -302,12 +302,10 @@ export default class BrandImageSearchDialog extends PureComponent {
>
<TextInput
fullWidth
label="Suchbegriff"
value={query}
disabled={isSearching || Boolean(processingId)}
onChange={(e) => this.setState({ query: e.target.value })}
onKeyDown={this.handleQueryKeyDown}
placeholder="z. B. Nike logo png"
slotProps={{
input: {
startAdornment: (
@@ -336,36 +334,79 @@ export default class BrandImageSearchDialog extends PureComponent {
</Box>
{/* Progress / Status banner */}
{status === 'loading' && <LinearProgress sx={{ mb: 2, borderRadius: 1 }} />}
<Box
sx={{
minHeight: 28,
mb: 1.5,
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
}}
>
{status === 'loading' && (
<Box>
<Box
sx={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
mb: 0.5,
}}
>
<Typography variant="caption" color="text.secondary">
Bilder werden gesucht...
</Typography>
</Box>
<LinearProgress sx={{ borderRadius: 1 }} />
</Box>
)}
{status === 'streaming' && (
<Box sx={{ mb: 2 }}>
{status === 'streaming' && (
<Box>
<Box
sx={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
mb: 0.5,
}}
>
<Typography variant="caption" color="text.secondary">
Thumbnails werden gestreamt...
</Typography>
<Typography variant="caption" fontWeight={600} color="text.secondary">
{loadedThumbs} / {images.length}
</Typography>
</Box>
<LinearProgress
variant="determinate"
value={
images.length > 0
? Math.round((loadedThumbs / images.length) * 100)
: 0
}
sx={{ borderRadius: 1 }}
/>
</Box>
)}
{status === 'done' && images.length > 0 && (
<Box
sx={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
mb: 0.5,
}}
>
<Typography variant="caption" color="text.secondary">
Thumbnails werden gestreamt...
Thumbnails geladen
</Typography>
<Typography variant="caption" fontWeight={600} color="text.secondary">
{loadedThumbs} / {images.length}
</Typography>
</Box>
<LinearProgress
variant="determinate"
value={
images.length > 0
? Math.round((loadedThumbs / images.length) * 100)
: 0
}
sx={{ borderRadius: 1 }}
/>
</Box>
)}
)}
</Box>
{/* Error banner */}
{error && (
@@ -611,10 +652,7 @@ export default class BrandImageSearchDialog extends PureComponent {
)}
</DialogContent>
<DialogActions sx={{ px: 2.5, py: 1.5, justifyContent: 'space-between' }}>
<Typography variant="caption" color="text.secondary">
{images.length > 0 ? `${images.length} Ergebnisse gefunden` : ''}
</Typography>
<DialogActions sx={{ px: 2.5, py: 1.5 }}>
<Button onClick={onClose} color="inherit">
Schließen
</Button>