@@ -4,6 +4,7 @@ import Helpers
44import Html exposing (Html )
55import Html.Attributes exposing (..)
66import Html.Events
7+ import Json.Encode as Encode
78import JsonTree
89import Set exposing (Set )
910import Svg exposing (..)
@@ -235,10 +236,10 @@ renderArrow total index =
235236 else
236237 let
237238 x1_ =
238- index * nodeSpacing + 40 + nodeRadius + 4
239+ index * nodeSpacing + 40 + nodeRadius + 16
239240
240241 x2_ =
241- ( index + 1 ) * nodeSpacing + 40 - nodeRadius - 4
242+ ( index + 1 ) * nodeSpacing + 40 - nodeRadius - 16
242243
243244 y_ =
244245 44
@@ -297,7 +298,7 @@ viewKvRow key val =
297298 , Html . span [ Html . Attributes . class " fv-kv-val" ] [ Html . text val ]
298299 , Html . button
299300 [ Html . Attributes . class " fv-copy-btn"
300- , Html . Attributes . attribute " data-copy " val
301+ , Html . Events . onClick ( CopyToClipboard val)
301302 ]
302303 [ Html . text " ⎘" ]
303304 ]
@@ -365,12 +366,28 @@ viewDaVinciNodeData nodeId node expandedSubRows =
365366 ( case node. collectors of
366367 Nothing -> []
367368 Just cs ->
368- List . indexedMap
369- ( \ i c ->
370- Html . div [ Html . Attributes . class " coll-card" ]
371- [ JsonTree . view ( " Collector " ++ String . fromInt ( i + 1 )) c ]
372- )
373- cs
369+ Html . div [ Html . Attributes . class " coll-copy-all-row" ]
370+ [ Html . button
371+ [ Html . Attributes . class " fv-copy-btn coll-copy-all"
372+ , Html . Events . onClick ( CopyToClipboard ( Encode . encode 4 ( Encode . list identity cs)))
373+ ]
374+ [ Html . text " Copy all" ]
375+ ]
376+ :: List . indexedMap
377+ ( \ i c ->
378+ Html . div [ Html . Attributes . class " coll-card" ]
379+ [ Html . div [ Html . Attributes . class " coll-card-header" ]
380+ [ Html . span [] [ Html . text ( " Collector " ++ String . fromInt ( i + 1 )) ]
381+ , Html . button
382+ [ Html . Attributes . class " fv-copy-btn"
383+ , Html . Events . onClick ( CopyToClipboard ( Encode . encode 4 c))
384+ ]
385+ [ Html . text " \u{2398}" ]
386+ ]
387+ , JsonTree . view ( " Collector " ++ String . fromInt ( i + 1 )) c
388+ ]
389+ )
390+ cs
374391 )
375392
376393 else
0 commit comments