mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 22:07:32 -04:00
Show successful grabs in Search with green icon
This commit is contained in:
parent
dfb00d9bb1
commit
9f4c9d3344
2 changed files with 26 additions and 2 deletions
|
@ -37,6 +37,18 @@ function getDownloadIcon(isGrabbing, isGrabbed, grabError) {
|
||||||
return icons.DOWNLOAD;
|
return icons.DOWNLOAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDownloadKind(isGrabbed, grabError) {
|
||||||
|
if (isGrabbed) {
|
||||||
|
return kinds.SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (grabError) {
|
||||||
|
return kinds.DANGER;
|
||||||
|
}
|
||||||
|
|
||||||
|
return kinds.DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
function getDownloadTooltip(isGrabbing, isGrabbed, grabError) {
|
function getDownloadTooltip(isGrabbing, isGrabbed, grabError) {
|
||||||
if (isGrabbing) {
|
if (isGrabbing) {
|
||||||
return '';
|
return '';
|
||||||
|
@ -115,7 +127,7 @@ class SearchIndexOverview extends Component {
|
||||||
<div className={styles.actions}>
|
<div className={styles.actions}>
|
||||||
<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)}
|
||||||
isDisabled={isGrabbed}
|
isDisabled={isGrabbed}
|
||||||
isSpinning={isGrabbing}
|
isSpinning={isGrabbing}
|
||||||
|
|
|
@ -30,6 +30,18 @@ function getDownloadIcon(isGrabbing, isGrabbed, grabError) {
|
||||||
return icons.DOWNLOAD;
|
return icons.DOWNLOAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDownloadKind(isGrabbed, grabError) {
|
||||||
|
if (isGrabbed) {
|
||||||
|
return kinds.SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (grabError) {
|
||||||
|
return kinds.DANGER;
|
||||||
|
}
|
||||||
|
|
||||||
|
return kinds.DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
function getDownloadTooltip(isGrabbing, isGrabbed, grabError) {
|
function getDownloadTooltip(isGrabbing, isGrabbed, grabError) {
|
||||||
if (isGrabbing) {
|
if (isGrabbing) {
|
||||||
return '';
|
return '';
|
||||||
|
@ -303,7 +315,7 @@ class SearchIndexRow extends Component {
|
||||||
>
|
>
|
||||||
<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)}
|
||||||
isDisabled={isGrabbed}
|
isDisabled={isGrabbed}
|
||||||
isSpinning={isGrabbing}
|
isSpinning={isGrabbing}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue