Commit 3b60b4ef authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[tree] small forest refactor

parent ef97d9af
...@@ -74,26 +74,26 @@ forest = R.createElement forestCpt ...@@ -74,26 +74,26 @@ forest = R.createElement forestCpt
) )
(cpt' openNodes asyncTasks appReload reload showLogin backend) (cpt' openNodes asyncTasks appReload reload showLogin backend)
cpt' openNodes asyncTasks appReload reload showLogin backend (frontends /\ currentRoute /\ sessions /\ _ /\ _ /\ _ /\ _ /\ handed) = do cpt' openNodes asyncTasks appReload reload showLogin backend (frontends /\ currentRoute /\ sessions /\ _ /\ _ /\ _ /\ _ /\ handed) = do
pure $ R2.row $ [plus handed showLogin backend] <> trees pure $ R2.row $ [ plus handed showLogin backend ] <> trees
where where
trees = tree <$> unSessions sessions trees = tree <$> unSessions sessions
tree s@(Session {treeId}) = tree s@(Session {treeId}) =
treeView { appReload treeView { appReload
, asyncTasks , asyncTasks
, currentRoute , currentRoute
, frontends , frontends
, handed , handed
, openNodes , openNodes
, reload , reload
, root: treeId , root: treeId
, session: s , session: s
} [] } []
plus :: Handed -> R.Setter Boolean -> R.State (Maybe Backend) -> R.Element plus :: Handed -> R.Setter Boolean -> R.State (Maybe Backend) -> R.Element
plus handed showLogin backend = H.div { className: handedClass } [ plus handed showLogin backend = H.div { className: handedClass } [
H.button { title: "Add or remove connections to the server(s)." H.button { className: "btn btn-default"
, on: {click} , on: {click}
, className: "btn btn-default" , title: "Add or remove connections to the server(s)."
} }
[ H.div { "type": "" [ H.div { "type": ""
, className: "fa fa-universal-access fa-lg" , className: "fa fa-universal-access fa-lg"
......
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