Commit 314170b4 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch 'dev' into dev-right-panel-in-docs

parents 4a29c949 df7efe0a
{
"name": "Gargantext",
"version": "0.0.1.91.7",
"version": "0.0.1.94.1",
"scripts": {
"rebase-set": "spago package-set-upgrade && spago psc-package-insdhall",
"rebuild-set": "spago psc-package-insdhall",
......
......@@ -3,7 +3,6 @@ module Gargantext.Components.App where
import Data.Array (fromFoldable)
import Data.Maybe (Maybe(..), maybe')
import Data.Tuple (fst, snd)
import Data.Tuple.Nested ((/\))
import Reactix as R
import Gargantext.Prelude
......@@ -31,7 +30,6 @@ import Gargantext.Routes (AppRoute(..))
import Gargantext.Sessions (useSessions)
import Gargantext.Sessions as Sessions
import Gargantext.Types as GT
import Gargantext.Utils.Reactix as R2
thisModule :: String
thisModule = "Gargantext.Components.App"
......@@ -204,4 +202,4 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
, session
, treeReloadRef
}
]
]
......@@ -6,6 +6,7 @@ import Data.Set (Set)
import Data.Set as Set
import Data.String as S
import Data.String.CodeUnits as DSCU
import Data.Tuple (snd)
import Data.Tuple.Nested ((/\))
import Effect (Effect)
import Effect.Aff (Aff, launchAff, launchAff_)
......@@ -297,7 +298,7 @@ nodeLinkCpt = R.hooksComponentWithModule thisModule "nodeLink" cpt
popoverRef <- R.useRef null
pure $
H.div { on: { click: \_ -> setFolderOpen $ not } }
H.div { on: { click: onClick } }
[ H.a { data: { for: tooltipId
, tip: true
}
......@@ -316,6 +317,12 @@ nodeLinkCpt = R.hooksComponentWithModule thisModule "nodeLink" cpt
]
where
-- NOTE Don't toggle tree if it is not selected
-- This prevents some irritating behaviour
onClick _ = if isSelected then
setFolderOpen not
else
pure unit
tooltipId = "node-link-" <> show id
-- END node link
......
......@@ -10,27 +10,27 @@ import Gargantext.Types (ChartOpts, ChartType, CorpusMetricOpts, CTabNgramType,
import Gargantext.Types as GT
data AppRoute
= Home
| Login
= Annuaire SessionId Int
| ContactPage SessionId Int Int
| Corpus SessionId Int
| CorpusDocument SessionId Int Int Int
| Dashboard SessionId Int
| Document SessionId Int Int
| Folder SessionId Int
| FolderPrivate SessionId Int
| FolderPublic SessionId Int
| FolderShared SessionId Int
| Team SessionId Int
| Corpus SessionId Int
| Document SessionId Int Int
| CorpusDocument SessionId Int Int Int
| PGraphExplorer SessionId Int
| Dashboard SessionId Int
| Texts SessionId Int
| Lists SessionId Int
| Annuaire SessionId Int
| UserPage SessionId Int
| ContactPage SessionId Int Int
| RouteFrameWrite SessionId Int
| Home
| Lists SessionId Int
| Login
| PGraphExplorer SessionId Int
| RouteFile SessionId Int
| RouteFrameCalc SessionId Int
| RouteFrameCode SessionId Int
| RouteFile SessionId Int
| RouteFrameWrite SessionId Int
| Team SessionId Int
| Texts SessionId Int
| UserPage SessionId Int
derive instance eqAppRoute :: Eq AppRoute
......@@ -108,14 +108,17 @@ appPath (RouteFile s i) = "file/" <> show s <> "/" <> show i
nodeTypeAppRoute :: NodeType -> SessionId -> Int -> Maybe AppRoute
nodeTypeAppRoute GT.Annuaire s i = Just $ Annuaire s i
nodeTypeAppRoute GT.NodeContact s i = Just $ Annuaire s i
nodeTypeAppRoute GT.Corpus s i = Just $ Corpus s i
nodeTypeAppRoute GT.Dashboard s i = Just $ Dashboard s i
nodeTypeAppRoute GT.Graph s i = Just $ PGraphExplorer s i
nodeTypeAppRoute GT.NodeList s i = Just $ Lists s i
nodeTypeAppRoute GT.Folder s i = Just $ Folder s i
nodeTypeAppRoute GT.FolderPrivate s i = Just $ FolderPrivate s i
nodeTypeAppRoute GT.FolderPublic s i = Just $ FolderPublic s i
nodeTypeAppRoute GT.FolderShared s i = Just $ FolderShared s i
nodeTypeAppRoute GT.Graph s i = Just $ PGraphExplorer s i
nodeTypeAppRoute GT.NodeContact s i = Just $ Annuaire s i
nodeTypeAppRoute GT.NodeFile s i = Just $ RouteFile s i
nodeTypeAppRoute GT.NodeList s i = Just $ Lists s i
nodeTypeAppRoute GT.NodeUser s i = Just $ UserPage s i
nodeTypeAppRoute GT.Team s i = Just $ Team s i
nodeTypeAppRoute GT.Texts s i = Just $ Texts s i
nodeTypeAppRoute _ _ _ = Nothing
......@@ -138,29 +138,32 @@ instance encodeJsonTabPostQuery :: EncodeJson TabPostQuery where
~> "query" := post.query
~> jsonEmptyObject
data NodeType = NodeUser
| Folder | FolderPrivate | FolderShared | FolderPublic
| Annuaire
| NodeContact
data NodeType = Annuaire
| Corpus
| Team
| Url_Document
| Dashboard
| Error
| Folder
| FolderPrivate
| FolderPublic
| FolderShared
| Graph
| Phylo
| Individu
| Node
| Nodes
| Tree
| NodeContact
| NodeList
| NodeUser
| Nodes
| Phylo
| Team
| Texts
| Tree
| Url_Document
-- TODO Optional Nodes
| NodeFrameWrite
| NodeFile
| NodeFrameCalc
| NodeFrameNotebook
| NodeFrameWrite
| NodePublic NodeType
| NodeFile
derive instance eqNodeType :: Eq NodeType
......
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