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