This commit is contained in:
seb
2026-10-06 12:57:06 +02:00
parent 1b5d8efbc3
commit 543382c3e1

View File

@@ -449,26 +449,45 @@ export class VfsAttachmentLink extends PureComponent {
</Typography>
</Box>
<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.2, flexShrink: 0 }}>
{(isDownloading || isOpening) && (
<CircularProgress size={14} color="inherit" thickness={5} sx={{ mr: 0.5 }} />
)}
{!notFound && (
<>
<IconButton
size="small"
aria-label="In neuem Tab öffnen"
onClick={this.handleOpenInNewTab}
sx={{ p: 0.35, color: 'inherit', opacity: 0.85, '&:hover': { opacity: 1 } }}
sx={{
p: 0,
width: 22,
height: 22,
color: 'inherit',
opacity: 0.85,
'&:hover': { opacity: 1 },
}}
>
<OpenInNewRoundedIcon sx={{ fontSize: 15 }} />
{isOpening ? (
<CircularProgress size={12} color="inherit" thickness={4} />
) : (
<OpenInNewRoundedIcon sx={{ fontSize: 15 }} />
)}
</IconButton>
<IconButton
size="small"
aria-label="Herunterladen"
onClick={this.handleDownload}
sx={{ p: 0.35, color: 'inherit', opacity: 0.85, '&:hover': { opacity: 1 } }}
sx={{
p: 0,
width: 22,
height: 22,
color: 'inherit',
opacity: 0.85,
'&:hover': { opacity: 1 },
}}
>
<DownloadRoundedIcon sx={{ fontSize: 15 }} />
{isDownloading ? (
<CircularProgress size={12} color="inherit" thickness={4} />
) : (
<DownloadRoundedIcon sx={{ fontSize: 15 }} />
)}
</IconButton>
</>
)}
@@ -546,22 +565,25 @@ export class VfsAttachmentLink extends PureComponent {
}}
onClick={(e) => e.stopPropagation()}
>
{(isDownloading || isOpening) && (
<CircularProgress size={13} color="inherit" thickness={4} sx={{ mx: 0.4 }} />
)}
{canView && (
<IconButton
size="small"
aria-label="In neuem Tab öffnen"
onClick={this.handleOpenInNewTab}
sx={{
p: 0.4,
p: 0,
width: 22,
height: 22,
color: 'inherit',
opacity: 0.75,
'&:hover': { opacity: 1, bgcolor: 'action.hover' },
}}
>
<OpenInNewRoundedIcon sx={{ fontSize: 15 }} />
{isOpening ? (
<CircularProgress size={12} color="inherit" thickness={4} />
) : (
<OpenInNewRoundedIcon sx={{ fontSize: 15 }} />
)}
</IconButton>
)}
<IconButton
@@ -569,13 +591,19 @@ export class VfsAttachmentLink extends PureComponent {
aria-label="Herunterladen"
onClick={this.handleDownload}
sx={{
p: 0.4,
p: 0,
width: 22,
height: 22,
color: 'inherit',
opacity: 0.75,
'&:hover': { opacity: 1, bgcolor: 'action.hover' },
}}
>
<DownloadRoundedIcon sx={{ fontSize: 15 }} />
{isDownloading ? (
<CircularProgress size={12} color="inherit" thickness={4} />
) : (
<DownloadRoundedIcon sx={{ fontSize: 15 }} />
)}
</IconButton>
</Box>
)}