From eb67231a45c5c43623e1941e85da305198a4395d Mon Sep 17 00:00:00 2001 From: Bogdan Date: Thu, 10 Aug 2023 02:48:38 +0300 Subject: [PATCH] New: Show successful grabs in Interactive Search with green icon (cherry picked from commit 366b2b8b52d8375f1f41719a09893136009a5b48) Closes #2780 --- .../src/InteractiveSearch/InteractiveSearchRow.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/src/InteractiveSearch/InteractiveSearchRow.js b/frontend/src/InteractiveSearch/InteractiveSearchRow.js index e268f2b7e..a09f3f27c 100644 --- a/frontend/src/InteractiveSearch/InteractiveSearchRow.js +++ b/frontend/src/InteractiveSearch/InteractiveSearchRow.js @@ -32,6 +32,18 @@ function getDownloadIcon(isGrabbing, isGrabbed, grabError) { return icons.DOWNLOAD; } +function getDownloadKind(isGrabbed, grabError, downloadAllowed) { + if (isGrabbed) { + return kinds.SUCCESS; + } + + if (grabError || !downloadAllowed) { + return kinds.DANGER; + } + + return kinds.DEFAULT; +} + function getDownloadTooltip(isGrabbing, isGrabbed, grabError) { if (isGrabbing) { return ''; @@ -212,7 +224,7 @@ class InteractiveSearchRow extends Component { {