mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
fix: tooltip shows properly if not in progress (#3185)
This commit is contained in:
@@ -96,7 +96,7 @@ const StatusBadge = ({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const tooltipContent = downloadItem ? (
|
const tooltipContent = (
|
||||||
<ul>
|
<ul>
|
||||||
{downloadItem.map((status, index) => (
|
{downloadItem.map((status, index) => (
|
||||||
<li
|
<li
|
||||||
@@ -111,8 +111,6 @@ const StatusBadge = ({
|
|||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
) : (
|
|
||||||
mediaLinkDescription
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const badgeDownloadProgress = (
|
const badgeDownloadProgress = (
|
||||||
@@ -134,11 +132,13 @@ const StatusBadge = ({
|
|||||||
case MediaStatus.AVAILABLE:
|
case MediaStatus.AVAILABLE:
|
||||||
return (
|
return (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content={inProgress && tooltipContent}
|
content={inProgress ? tooltipContent : mediaLinkDescription}
|
||||||
className={`${
|
className={`${
|
||||||
inProgress && 'hidden max-h-96 w-96 overflow-y-auto sm:block'
|
inProgress && 'hidden max-h-96 w-96 overflow-y-auto sm:block'
|
||||||
}`}
|
}`}
|
||||||
tooltipConfig={{ interactive: true, delayHide: 100 }}
|
tooltipConfig={{
|
||||||
|
...(inProgress && { interactive: true, delayHide: 100 }),
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Badge
|
<Badge
|
||||||
badgeType="success"
|
badgeType="success"
|
||||||
@@ -185,11 +185,13 @@ const StatusBadge = ({
|
|||||||
case MediaStatus.PARTIALLY_AVAILABLE:
|
case MediaStatus.PARTIALLY_AVAILABLE:
|
||||||
return (
|
return (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content={inProgress && tooltipContent}
|
content={inProgress ? tooltipContent : mediaLinkDescription}
|
||||||
className={`${
|
className={`${
|
||||||
inProgress && 'hidden max-h-96 w-96 overflow-y-auto sm:block'
|
inProgress && 'hidden max-h-96 w-96 overflow-y-auto sm:block'
|
||||||
}`}
|
}`}
|
||||||
tooltipConfig={{ interactive: true, delayHide: 100 }}
|
tooltipConfig={{
|
||||||
|
...(inProgress && { interactive: true, delayHide: 100 }),
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Badge
|
<Badge
|
||||||
badgeType="success"
|
badgeType="success"
|
||||||
@@ -236,18 +238,20 @@ const StatusBadge = ({
|
|||||||
case MediaStatus.PROCESSING:
|
case MediaStatus.PROCESSING:
|
||||||
return (
|
return (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content={inProgress && tooltipContent}
|
content={inProgress ? tooltipContent : mediaLinkDescription}
|
||||||
className={`${
|
className={`${
|
||||||
inProgress && 'hidden max-h-96 w-96 overflow-y-auto sm:block'
|
inProgress && 'hidden max-h-96 w-96 overflow-y-auto sm:block'
|
||||||
}`}
|
}`}
|
||||||
tooltipConfig={{ interactive: true, delayHide: 100 }}
|
tooltipConfig={{
|
||||||
|
...(inProgress && { interactive: true, delayHide: 100 }),
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Badge
|
<Badge
|
||||||
badgeType="primary"
|
badgeType="primary"
|
||||||
href={mediaLink}
|
href={mediaLink}
|
||||||
className={`${
|
className={`${
|
||||||
inProgress &&
|
inProgress &&
|
||||||
'relative !bg-gray-700 !bg-opacity-80 !px-0 hover:!bg-gray-700'
|
'relative !bg-gray-700 !bg-opacity-80 !px-0 hover:overflow-hidden hover:!bg-gray-700'
|
||||||
} overflow-hidden`}
|
} overflow-hidden`}
|
||||||
>
|
>
|
||||||
{inProgress && badgeDownloadProgress}
|
{inProgress && badgeDownloadProgress}
|
||||||
|
Reference in New Issue
Block a user