Commit 7f3965da authored by Karen Konou's avatar Karen Konou

[Tree] reset pins button

parent 0a56148e
...@@ -6,6 +6,7 @@ module Gargantext.Components.Forest ...@@ -6,6 +6,7 @@ module Gargantext.Components.Forest
import Gargantext.Prelude import Gargantext.Prelude
import Data.Array as A import Data.Array as A
import Data.Map (empty)
import Data.Map as Map import Data.Map as Map
import Data.Maybe (Maybe(..), fromMaybe) import Data.Maybe (Maybe(..), fromMaybe)
import Gargantext.Components.App.Store (Boxes) import Gargantext.Components.App.Store (Boxes)
...@@ -83,7 +84,7 @@ plus :: R2.Leaf Plus ...@@ -83,7 +84,7 @@ plus :: R2.Leaf Plus
plus = R2.leaf plusCpt plus = R2.leaf plusCpt
plusCpt :: R.Component Plus plusCpt :: R.Component Plus
plusCpt = here.component "plus" cpt where plusCpt = here.component "plus" cpt where
cpt { boxes: { backend, showLogin } } _ = do cpt { boxes: { backend, showLogin, pinnedTreeId} } _ = do
-- Hooks -- Hooks
{ goToRoute } <- useLinkHandler { goToRoute } <- useLinkHandler
...@@ -102,7 +103,7 @@ plusCpt = here.component "plus" cpt where ...@@ -102,7 +103,7 @@ plusCpt = here.component "plus" cpt where
[ [
B.tooltipContainer B.tooltipContainer
{ delayShow: 600 { delayShow: 600
, position: TooltipPosition Top , position: TooltipPosition Right
, tooltipSlot: , tooltipSlot:
B.span_ "Back to home" B.span_ "Back to home"
, defaultSlot: , defaultSlot:
...@@ -118,7 +119,23 @@ plusCpt = here.component "plus" cpt where ...@@ -118,7 +119,23 @@ plusCpt = here.component "plus" cpt where
, ,
B.tooltipContainer B.tooltipContainer
{ delayShow: 600 { delayShow: 600
, position: TooltipPosition Top , position: TooltipPosition Right
, tooltipSlot:
B.span_ "Reset pins"
, defaultSlot:
B.button
{ className: "forest-layout__action__button"
, callback: \_ -> T.write_ empty pinnedTreeId
, variant: ButtonVariant Light
}
[
B.icon { name: "refresh" }
]
}
,
B.tooltipContainer
{ delayShow: 600
, position: TooltipPosition Right
, tooltipSlot: , tooltipSlot:
B.span_ "Add or remove connection to the server(s)" B.span_ "Add or remove connection to the server(s)"
, defaultSlot: , defaultSlot:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment