Commit f2d39fce authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FOREST] glyphicons and btn.

parent 773c9d8b
......@@ -10,6 +10,7 @@ import Gargantext.Routes (AppRoute)
import Gargantext.Sessions (Session(..), Sessions, unSessions)
import Gargantext.Components.Forest.Tree (treeView)
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils (glyphicon)
type Props =
( sessions :: Sessions
......@@ -33,7 +34,7 @@ forestCpt = R.staticComponent "G.C.Forest.forest" cpt where
plus :: R2.Setter Boolean -> R.Element
plus showLogin =
H.button {on: {click}}
[ H.i { className: "glyphicon glyphicon-plus"} [] ]
[ H.i { className: glyphicon "plus"} [] ]
-- TODO same as the one in the Login Modal (same CSS)
-- [ H.i { className: "material-icons md-36"} [] ]
where
......
......@@ -188,11 +188,13 @@ nodePopupView d p (Just NodePopup /\ setPopupOpen) = R.createElement el p []
panelHeading renameBoxOpen@(open /\ _) =
H.div {className: "panel-heading"}
[ H.div {className: "row" }
[ -- H.h1 {className : "col-md-12"} [H.text "Settings Box"]
H.div {className: "row" }
[ H.div {className: rowClass open} [ renameBox d {id, name} renameBoxOpen ]
, if edit then editIcon renameBoxOpen else H.div {} []
, H.div {className: "col-md-1"}
[ H.a {className: "btn glyphitem glyphicon glyphicon-remove-circle"
[ H.a { type : "button"
, className: glyphicon "remove-circle"
, onClick: mkEffectFn1 $ \_ -> setPopupOpen $ const Nothing
, title: "Close"} []
]
......@@ -202,7 +204,7 @@ nodePopupView d p (Just NodePopup /\ setPopupOpen) = R.createElement el p []
editIcon (false /\ setRenameBoxOpen) =
H.div {className: "col-md-1"}
[ H.a {style: {color: "black"}
, className: "btn glyphitem glyphicon glyphicon-pencil"
, className: glyphicon "pencil"
, id: "rename1"
, title: "Rename"
, onClick: mkEffectFn1 $ \_ -> setRenameBoxOpen $ const true
......
......@@ -21,7 +21,7 @@ import Gargantext.Components.Login.Types (AuthRequest(..))
import Gargantext.Ends (Backend(..))
import Gargantext.Sessions (Session, Sessions(..), postAuthRequest, unSessions)
import Gargantext.Sessions as Sessions
import Gargantext.Utils (csrfMiddlewareToken, glyphicon)
import Gargantext.Utils (csrfMiddlewareToken)
import Gargantext.Utils.Reactix as R2
-- TODO: ask for login (modal) or account creation after 15 mn when user
......@@ -111,7 +111,7 @@ renderSessions sessions = R.fragment (renderSession sessions <$> unSessions (fst
renderSession :: R2.Reductor Sessions Sessions.Action -> Session -> R.Element
renderSession sessions session = H.li {} $ [ H.text $ "Active session: " <> show session ]
<> [ H.a { on : {click}
, className: glyphicon "log-out"
, className: "glyphitem glyphicon glyphicon-log-out"
, id : "log-out"
, title: "Log out"
} [] ]
......@@ -133,9 +133,12 @@ renderBackend backend@(Backend {name}) state =
H.li {} $ [ H.a { on : {click}
-- , className: glyphicon "log-in"
-- , id : "log-in"
} [ H.text $ " Connect to " <> name ] ] <> [ H.a { on : {click}, className : glyphicon "log-in", title: "Log In"} []]
where
click _ = (snd state) (const $ Just backend)
} [ H.text $ " Connect to " <> name ] ]
<> [ H.a { on : {click}
, className : "glyphitem glyphicon glyphicon-log-in"
, title: "Log In"} []]
where
click _ = (snd state) (const $ Just backend)
type FormProps =
......
......@@ -39,5 +39,5 @@ _unit :: forall s. Lens' s Unit
_unit = lens (\_ -> unit) (\s _ -> s)
glyphicon t = "glyphitem glyphicon glyphicon-" <> t
glyphicon t = "btn glyphitem glyphicon glyphicon-" <> t
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