mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-25 11:13:39 +02:00
New: Show successful grabs in Interactive Search with green icon
This commit is contained in:
parent
51dc96cb6e
commit
366b2b8b52
@ -42,6 +42,18 @@ function getDownloadIcon(
|
|||||||
return icons.DOWNLOAD;
|
return icons.DOWNLOAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDownloadKind(isGrabbed: boolean, grabError?: string) {
|
||||||
|
if (isGrabbed) {
|
||||||
|
return kinds.SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (grabError) {
|
||||||
|
return kinds.DANGER;
|
||||||
|
}
|
||||||
|
|
||||||
|
return kinds.DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
function getDownloadTooltip(
|
function getDownloadTooltip(
|
||||||
isGrabbing: boolean,
|
isGrabbing: boolean,
|
||||||
isGrabbed: boolean,
|
isGrabbed: boolean,
|
||||||
@ -265,7 +277,7 @@ function InteractiveSearchRow(props: InteractiveSearchRowProps) {
|
|||||||
<TableRowCell className={styles.download}>
|
<TableRowCell className={styles.download}>
|
||||||
<SpinnerIconButton
|
<SpinnerIconButton
|
||||||
name={getDownloadIcon(isGrabbing, isGrabbed, grabError)}
|
name={getDownloadIcon(isGrabbing, isGrabbed, grabError)}
|
||||||
kind={grabError ? kinds.DANGER : kinds.DEFAULT}
|
kind={getDownloadKind(isGrabbed, grabError)}
|
||||||
title={getDownloadTooltip(isGrabbing, isGrabbed, grabError)}
|
title={getDownloadTooltip(isGrabbing, isGrabbed, grabError)}
|
||||||
isSpinning={isGrabbing}
|
isSpinning={isGrabbing}
|
||||||
onPress={onGrabPressWrapper}
|
onPress={onGrabPressWrapper}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user