From 5f83cfc02b8b65d3545f747b1ac5b6129cebb636 Mon Sep 17 00:00:00 2001 From: Arkadiusz Wieczorek Date: Thu, 20 Jan 2022 19:49:27 +0100 Subject: [PATCH] Add click on rows --- sidebar/stolen-data-cluster.scss | 12 ++++++++---- sidebar/stolen-data-cluster.tsx | 9 ++++++--- sidebar/stolen-data.tsx | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/sidebar/stolen-data-cluster.scss b/sidebar/stolen-data-cluster.scss index 29f70fb..3a0450e 100644 --- a/sidebar/stolen-data-cluster.scss +++ b/sidebar/stolen-data-cluster.scss @@ -2,7 +2,7 @@ .stolen-data-cluster-container { .domains-container { - padding-top: 1rem; + padding-top: 0.5rem; display: flex; flex-flow: column; border-bottom: none; @@ -32,7 +32,7 @@ table { width: 100%; position: relative; - left: -2px; + left: -1px; text-align: left; font-size: 0.75rem; font-family: 'Fira Code'; @@ -116,6 +116,7 @@ font-weight: 600; padding: 0.5rem 0; text-align: left; + cursor: default; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; @@ -124,12 +125,15 @@ background: #fff; } } + .checkbox { - // background: red; - // width: 1rem; position: relative; top: 1px; width: 0.875rem; + + input { + cursor: pointer; + } } } } diff --git a/sidebar/stolen-data-cluster.tsx b/sidebar/stolen-data-cluster.tsx index 8c8a4fc..340002c 100644 --- a/sidebar/stolen-data-cluster.tsx +++ b/sidebar/stolen-data-cluster.tsx @@ -12,8 +12,10 @@ const MAX_STRING_VALUE_LENGTH = 100; function StolenDataValue({ entry, + refresh, }: { entry: StolenDataEntry; + refresh: Function; prefixKey?: string; }) { const [version] = useEmitter(entry); @@ -32,8 +34,10 @@ function StolenDataValue({ className="value" onClick={(e) => { entry.toggleMark(); + refresh(); e.stopPropagation(); }} + title={maskString(entry.value, 1, MAX_STRING_VALUE_LENGTH)} // style={{ color: entry.isMarked ? 'black' : 'gray' }} > {body} @@ -66,8 +70,7 @@ function StolenDataRow({ /> { entry.toggleMark(); refresh(); @@ -119,7 +122,7 @@ function StolenDataRow({ {/* */} - + ); } diff --git a/sidebar/stolen-data.tsx b/sidebar/stolen-data.tsx index 02a044f..ac14064 100644 --- a/sidebar/stolen-data.tsx +++ b/sidebar/stolen-data.tsx @@ -83,7 +83,7 @@ export function StolenData({ Zaznacz automatycznie */} - Domeny otrzymujące informacje + Domeny, które pozyskały informacje {clusters.map((cluster) => { return (