From 1bbd08a5a05c85a152847a6d98f9b15e829d7178 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 #8964 --- .../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 5b7cc6c6f..de7c49692 100644 --- a/frontend/src/InteractiveSearch/InteractiveSearchRow.js +++ b/frontend/src/InteractiveSearch/InteractiveSearchRow.js @@ -31,6 +31,18 @@ function getDownloadIcon(isGrabbing, isGrabbed, grabError) { 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) { if (isGrabbing) { return ''; @@ -148,7 +160,7 @@ class InteractiveSearchRow extends Component {