Commit 9cf8d211 authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge branch 'dev-multi-term-selection' of...

Merge branch 'dev-multi-term-selection' of ssh://gitlab.iscpif.fr:20022/gargantext/purescript-gargantext into dev-merge
parents 5d7ea888 856a4c22
...@@ -36,6 +36,7 @@ li .leaf:hover a.settings { ...@@ -36,6 +36,7 @@ li .leaf:hover a.settings {
.tree ul li::before { .tree ul li::before {
bottom: -12px; bottom: -12px;
content: " "; content: " ";
height: 7px;
position: absolute; position: absolute;
top: 5px; top: 5px;
} }
...@@ -50,6 +51,15 @@ li .leaf:hover a.settings { ...@@ -50,6 +51,15 @@ li .leaf:hover a.settings {
width: 1px; width: 1px;
top: 5px; top: 5px;
} }
.tree ul li.with-children::after {
background-color: #000;
}
.tree ul li.with-children::before {
background-color: #000;
}
.tree .lefthanded .leaf {
justify-content: flex-end;
}
.tree .lefthanded ul { .tree .lefthanded ul {
margin-right: 5px; margin-right: 5px;
} }
...@@ -58,17 +68,15 @@ li .leaf:hover a.settings { ...@@ -58,17 +68,15 @@ li .leaf:hover a.settings {
padding-right: 5px; padding-right: 5px;
} }
.tree .lefthanded ul li.with-children::after { .tree .lefthanded ul li.with-children::after {
background-color: #000;
right: -10px; right: -10px;
width: 5px; width: 5px;
} }
.tree .lefthanded ul li.with-children::before { .tree .lefthanded ul li.with-children::before {
background-color: #000;
right: -10px; right: -10px;
width: 1px; width: 1px;
} }
.tree .lefthanded ul li .leaf { .tree .righthanded .leaf {
justify-content: flex-end; justify-content: flex-start;
} }
.tree .righthanded ul { .tree .righthanded ul {
margin-left: 5px; margin-left: 5px;
...@@ -78,12 +86,10 @@ li .leaf:hover a.settings { ...@@ -78,12 +86,10 @@ li .leaf:hover a.settings {
padding-left: 5px; padding-left: 5px;
} }
.tree .righthanded ul li.with-children::after { .tree .righthanded ul li.with-children::after {
background-color: #000;
left: -10px; left: -10px;
width: 5px; width: 5px;
} }
.tree .righthanded ul li.with-children::before { .tree .righthanded ul li.with-children::before {
background-color: #000;
left: -10px; left: -10px;
width: 1px; width: 1px;
} }
...@@ -91,9 +97,6 @@ li .leaf:hover a.settings { ...@@ -91,9 +97,6 @@ li .leaf:hover a.settings {
background-color: #000; background-color: #000;
right: 10px; right: 10px;
} }
.tree .righthanded ul li .leaf {
justify-content: flex-start;
}
.tree .file-dropped { .tree .file-dropped {
background-color: #d8dfe5; background-color: #d8dfe5;
} }
......
...@@ -31,6 +31,7 @@ li ...@@ -31,6 +31,7 @@ li
&::before &::before
bottom: -12px bottom: -12px
content: " " content: " "
height: 7px
position: absolute position: absolute
top: 5px top: 5px
&:not(:first-child):last-child::before &:not(:first-child):last-child::before
...@@ -43,8 +44,15 @@ li ...@@ -43,8 +44,15 @@ li
position: absolute position: absolute
width: 1px width: 1px
top: 5px top: 5px
&.with-children
&::after
background-color: #000
&::before
background-color: #000
.lefthanded .lefthanded
.leaf
justify-content : flex-end
ul ul
margin-right : 5px margin-right : 5px
li li
...@@ -52,18 +60,16 @@ li ...@@ -52,18 +60,16 @@ li
padding-right: 5px padding-right: 5px
&.with-children &.with-children
&::after &::after
background-color: #000
right: -10px right: -10px
width: 5px width: 5px
&::before &::before
background-color: #000
right: -10px right: -10px
width: 1px width: 1px
&:only-child::before &:only-child::before
//right: 1px //right: 1px
.leaf
justify-content : flex-end
.righthanded .righthanded
.leaf
justify-content : flex-start
ul ul
margin-left : 5px margin-left : 5px
li li
...@@ -71,18 +77,14 @@ li ...@@ -71,18 +77,14 @@ li
padding-left: 5px padding-left: 5px
&.with-children &.with-children
&::after &::after
background-color: #000
left: -10px left: -10px
width: 5px width: 5px
&::before &::before
background-color: #000
left: -10px left: -10px
width: 1px width: 1px
&:only::before &:only::before
background-color: #000 background-color: #000
right: 10px right: 10px
.leaf
justify-content : flex-start
.file-dropped .file-dropped
background-color: #d8dfe5 background-color: #d8dfe5
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
-- Select a backend and log into it -- Select a backend and log into it
module Gargantext.Components.Login where module Gargantext.Components.Login where
import DOM.Simple.Console (log)
import Data.Array (head) import Data.Array (head)
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.Maybe (Maybe(..), fromMaybe) import Data.Maybe (Maybe(..), fromMaybe)
...@@ -11,17 +10,21 @@ import Data.Sequence as DS ...@@ -11,17 +10,21 @@ import Data.Sequence as DS
import Data.String as DST import Data.String as DST
import Data.Tuple (fst, snd) import Data.Tuple (fst, snd)
import Data.Tuple.Nested ((/\)) import Data.Tuple.Nested ((/\))
import DOM.Simple.Console (log)
import Effect (Effect) import Effect (Effect)
import Effect.Aff (launchAff_) import Effect.Aff (launchAff_)
import Effect.Class (liftEffect) import Effect.Class (liftEffect)
import Prelude (Unit, bind, const, discard, map, pure, show, ($), (&&), (*>), (/=), (<$>), (<>), (==), (>))
import Reactix as R import Reactix as R
import Reactix.DOM.HTML as H import Reactix.DOM.HTML as H
import Gargantext.Prelude
import Gargantext.Components.Forest.Tree.Node.Tools (checkbox) import Gargantext.Components.Forest.Tree.Node.Tools (checkbox)
import Gargantext.Components.Forms (clearfix, cardBlock, cardGroup, center, formGroup) import Gargantext.Components.Forms (clearfix, cardBlock, cardGroup, center, formGroup)
import Gargantext.Components.Login.Types (AuthRequest(..)) import Gargantext.Components.Login.Types (AuthRequest(..))
import Gargantext.Components.NgramsTable.Loader as NTL
import Gargantext.Ends (Backend(..)) import Gargantext.Ends (Backend(..))
import Gargantext.Hooks.Loader as GHL
import Gargantext.Sessions (Session, Sessions(..), postAuthRequest, unSessions) import Gargantext.Sessions (Session, Sessions(..), postAuthRequest, unSessions)
import Gargantext.Sessions as Sessions import Gargantext.Sessions as Sessions
import Gargantext.Utils (csrfMiddlewareToken) import Gargantext.Utils (csrfMiddlewareToken)
...@@ -129,14 +132,27 @@ renderSessions :: R2.Reductor Sessions Sessions.Action -> R.Element ...@@ -129,14 +132,27 @@ renderSessions :: R2.Reductor Sessions Sessions.Action -> R.Element
renderSessions sessions = R.fragment (renderSession sessions <$> unSessions (fst sessions)) renderSessions sessions = R.fragment (renderSession sessions <$> unSessions (fst sessions))
where where
renderSession :: R2.Reductor Sessions Sessions.Action -> Session -> R.Element renderSession :: R2.Reductor Sessions Sessions.Action -> Session -> R.Element
renderSession sessions' session = H.li {} $ [ H.text $ show session ] renderSession sessions' session = H.li {} [
<> [ H.a { on : {click} H.text $ show session
, className: "glyphitem glyphicon glyphicon-log-out" , H.a { className: "glyphitem fa fa-sign-out"
, id : "log-out" , id : "log-out"
, on : { click: logOutClick }
, title: "Log out" , title: "Log out"
} [] ] } []
, H.a { className: "glyphitem fa fa-eraser"
, id : "log-out"
, on : { click: clearCacheClick }
, title: "Clear cache"
} []
]
where where
click _ = (snd sessions') (Sessions.Logout session) clearCacheClick :: forall a. a -> Effect Unit
clearCacheClick _ = do
launchAff_ $ do
GHL.clearCache unit
NTL.clearCache unit
liftEffect $ log "[renderSessions] cache cleared"
logOutClick _ = (snd sessions') (Sessions.Logout session)
renderBackend :: R.State (Maybe Backend) -> Backend -> R.Element renderBackend :: R.State (Maybe Backend) -> Backend -> R.Element
renderBackend state backend@(Backend {name}) = renderBackend state backend@(Backend {name}) =
......
...@@ -17,6 +17,7 @@ import Gargantext.Components.NgramsTable.Core (Version(..), Versioned(..)) ...@@ -17,6 +17,7 @@ import Gargantext.Components.NgramsTable.Core (Version(..), Versioned(..))
import Gargantext.Utils.CacheAPI as GUC import Gargantext.Utils.CacheAPI as GUC
cacheName :: String
cacheName = "ngrams-cache-api-loader" cacheName = "ngrams-cache-api-loader"
......
...@@ -23,6 +23,12 @@ import Gargantext.Utils as GU ...@@ -23,6 +23,12 @@ import Gargantext.Utils as GU
import Gargantext.Utils.CacheAPI as GUC import Gargantext.Utils.CacheAPI as GUC
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
cacheName :: String
cacheName = "cache-api-loader"
clearCache :: Unit -> Aff Unit
clearCache _ = GUC.delete $ GUC.CacheName cacheName
useLoader :: forall path st. Eq path useLoader :: forall path st. Eq path
=> path => path
...@@ -119,7 +125,6 @@ useCachedAPILoaderEffect { cacheEndpoint ...@@ -119,7 +125,6 @@ useCachedAPILoaderEffect { cacheEndpoint
else do else do
R.setRef oPath path R.setRef oPath path
let cacheName = "cache-api-loader"
let req = mkRequest path let req = mkRequest path
-- log2 "[useCachedLoader] mState" mState -- log2 "[useCachedLoader] mState" mState
launchAff_ $ do launchAff_ $ do
......
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