From 366b2b8b52d8375f1f41719a09893136009a5b48 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 --- .../src/InteractiveSearch/InteractiveSearchRow.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/src/InteractiveSearch/InteractiveSearchRow.tsx b/frontend/src/InteractiveSearch/InteractiveSearchRow.tsx index 53ee5dd2e..ff4fd7490 100644 --- a/frontend/src/InteractiveSearch/InteractiveSearchRow.tsx +++ b/frontend/src/InteractiveSearch/InteractiveSearchRow.tsx @@ -42,6 +42,18 @@ function getDownloadIcon( return icons.DOWNLOAD; } +function getDownloadKind(isGrabbed: boolean, grabError?: string) { + if (isGrabbed) { + return kinds.SUCCESS; + } + + if (grabError) { + return kinds.DANGER; + } + + return kinds.DEFAULT; +} + function getDownloadTooltip( isGrabbing: boolean, isGrabbed: boolean, @@ -265,7 +277,7 @@ function InteractiveSearchRow(props: InteractiveSearchRowProps) {