Commit 2bc70b91 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[Tree] fix background highlight color, no highlight when filetype dialog closed

parent edbf10c8
...@@ -205,7 +205,7 @@ text-align: center; ...@@ -205,7 +205,7 @@ text-align: center;
margin-top: 10px; margin-top: 10px;
} }
.tree .file-dropped { .tree .file-dropped {
background-color: aliceblue; background-color: #d8dfe5;
} }
#graph-tree .tree { #graph-tree .tree {
margin-top: 27px; margin-top: 27px;
......
...@@ -446,7 +446,7 @@ createNodeView _ _ = R.createElement el {} [] ...@@ -446,7 +446,7 @@ createNodeView _ _ = R.createElement el {} []
--fileTypeView :: (Action -> Effect Unit) -> FTree -> R.Element --fileTypeView :: (Action -> Effect Unit) -> FTree -> R.Element
fileTypeView d (s@(NTree (LNode {id}) _) /\ _) (Just (DroppedFile {contents, fileType}) /\ setDroppedFile) = R.createElement el {} [] fileTypeView d (s@(NTree (LNode {id}) _) /\ _) (Just (DroppedFile {contents, fileType}) /\ setDroppedFile) (_ /\ setIsDragOver) = R.createElement el {} []
where where
el = R.hooksComponent "FileTypeView" cpt el = R.hooksComponent "FileTypeView" cpt
cpt props _ = do cpt props _ = do
...@@ -468,7 +468,9 @@ fileTypeView d (s@(NTree (LNode {id}) _) /\ _) (Just (DroppedFile {contents, fil ...@@ -468,7 +468,9 @@ fileTypeView d (s@(NTree (LNode {id}) _) /\ _) (Just (DroppedFile {contents, fil
[ H.h5 {} [H.text "Choose file type"] ] [ H.h5 {} [H.text "Choose file type"] ]
, H.div {className: "col-md-2"} , H.div {className: "col-md-2"}
[ H.a {className: "btn text-danger glyphitem glyphicon glyphicon-remove-circle" [ H.a {className: "btn text-danger glyphitem glyphicon glyphicon-remove-circle"
, onClick: mkEffectFn1 $ \_ -> setDroppedFile $ Nothing , onClick: mkEffectFn1 $ \_ -> do
setDroppedFile Nothing
setIsDragOver false
, title: "Close"} [] , title: "Close"} []
] ]
] ]
...@@ -499,7 +501,7 @@ fileTypeView d (s@(NTree (LNode {id}) _) /\ _) (Just (DroppedFile {contents, fil ...@@ -499,7 +501,7 @@ fileTypeView d (s@(NTree (LNode {id}) _) /\ _) (Just (DroppedFile {contents, fil
, type: "button" , type: "button"
} [H.text "Upload"] } [H.text "Upload"]
] ]
fileTypeView _ _ (Nothing /\ _) = R.createElement el {} [] fileTypeView _ _ (Nothing /\ _) _ = R.createElement el {} []
where where
el = R.hooksComponent "FileTypeView" cpt el = R.hooksComponent "FileTypeView" cpt
cpt props _ = pure $ H.div {} [] cpt props _ = pure $ H.div {} []
...@@ -536,7 +538,7 @@ toHtml d s@(NTree (LNode {id, name, nodeType}) ary) n = R.createElement el {} [] ...@@ -536,7 +538,7 @@ toHtml d s@(NTree (LNode {id, name, nodeType}) ary) n = R.createElement el {} []
, popOverIcon nodeState , popOverIcon nodeState
, nodePopupView d nodeState , nodePopupView d nodeState
, createNodeView d nodeState , createNodeView d nodeState
, fileTypeView d nodeState droppedFile , fileTypeView d nodeState droppedFile isDragOver
] ]
folderIcon folderOpen@(open /\ _) = folderIcon folderOpen@(open /\ _) =
H.a {onClick: R2.effToggler folderOpen} H.a {onClick: R2.effToggler folderOpen}
......
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