Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
e5eabd49
Commit
e5eabd49
authored
Mar 11, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[toestand] attempt to fix user cpt rendering
parent
905f19ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
Router.purs
src/Gargantext/Components/Router.purs
+17
-15
No files found.
src/Gargantext/Components/Router.purs
View file @
e5eabd49
...
...
@@ -112,7 +112,7 @@ forestedCpt = here.component "forested" cpt
, showLogin
, tasks } children
authed :: Record SessionProps ->
R.Element
-> R.Element
authed :: Record SessionProps ->
(Unit -> R.Element)
-> R.Element
authed props@{ boxes: { sessions }, session, sessionId, tasks } content =
sessionWrapper { fallback: home homeProps []
, context: session
...
...
@@ -120,7 +120,7 @@ authed props@{ boxes: { sessions }, session, sessionId, tasks } content =
, sessionId
, sessions } []
where
render _ = [ content, footer {} [] ]
render _ = [ content
unit
, footer {} [] ]
homeProps = RE.pick props :: Record Props
annuaire :: R2.Component SessionNodeProps
...
...
@@ -130,7 +130,7 @@ annuaireCpt :: R.Component SessionNodeProps
annuaireCpt = here.component "annuaire" cpt where
cpt props@{ boxes, nodeId, session, sessionId, tasks } _ = do
let sessionProps = RE.pick props :: Record SessionProps
pure $ authed sessionProps $
pure $ authed sessionProps $
\_ ->
forested { boxes, tasks } [ annuaireLayout { frontends, nodeId, session } ]
where frontends = defaultFrontends
...
...
@@ -141,7 +141,7 @@ corpusCpt :: R.Component SessionNodeProps
corpusCpt = here.component "corpus" cpt where
cpt props@{ boxes, nodeId, session, tasks } _ = do
let sessionProps = RE.pick props :: Record SessionProps
pure $ authed sessionProps $
pure $ authed sessionProps $
\_ ->
forested { boxes, tasks } [ corpusLayout { nodeId, session } ]
type CorpusDocumentProps =
...
...
@@ -158,7 +158,7 @@ corpusDocumentCpt = here.component "corpusDocument" cpt
where
cpt props@{ boxes, corpusId: corpusId', listId, nodeId, session, sessionId, tasks } _ = do
let sessionProps = RE.pick props :: Record SessionProps
pure $ authed sessionProps $
pure $ authed sessionProps $
\_ ->
forested { boxes, tasks }
[ documentMainLayout { mCorpusId: corpusId, listId: listId, nodeId, session } [] ]
where corpusId = Just corpusId'
...
...
@@ -171,7 +171,7 @@ dashboardCpt = here.component "dashboard" cpt
where
cpt props@{ boxes, nodeId, session, tasks } _ = do
let sessionProps = RE.pick props :: Record SessionProps
pure $ authed sessionProps $
pure $ authed sessionProps $
\_ ->
forested { boxes, tasks } [ dashboardLayout { nodeId, session } [] ]
type DocumentProps = ( listId :: ListId | SessionNodeProps )
...
...
@@ -183,7 +183,7 @@ documentCpt :: R.Component DocumentProps
documentCpt = here.component "document" cpt where
cpt props@{ listId, nodeId, session, sessionId, tasks, boxes } _ = do
let sessionProps = RE.pick props :: Record SessionProps
pure $ authed sessionProps $
pure $ authed sessionProps $
\_ ->
forested { boxes, tasks }
[ documentMainLayout { listId, nodeId, mCorpusId, session } [] ]
where mCorpusId = Nothing
...
...
@@ -215,7 +215,7 @@ listsCpt = here.component "lists" cpt where
, tasks } _ = do
let sessionProps = RE.pick props :: Record SessionProps
session' <- R.useContext session
pure $ authed sessionProps $
pure $ authed sessionProps $
\_ ->
Lists.listsWithForest
{ forestProps: { backend
, forestOpen
...
...
@@ -253,7 +253,7 @@ graphExplorerCpt = here.component "graphExplorer" cpt where
, session
, tasks } _ = do
let sessionProps = RE.pick props :: Record SessionProps
pure $ authed sessionProps $
pure $ authed sessionProps $
\_ ->
simpleLayout { handed }
[ explorerLayoutLoader { backend
, frontends
...
...
@@ -273,7 +273,7 @@ routeFileCpt :: R.Component SessionNodeProps
routeFileCpt = here.component "routeFile" cpt where
cpt props@{ nodeId, session, sessionId, boxes, tasks } _ = do
let sessionProps = RE.pick props :: Record SessionProps
pure $ authed sessionProps $
pure $ authed sessionProps $
\_ ->
forested { boxes, tasks } [ fileLayout { nodeId, session } ]
type RouteFrameProps = (
...
...
@@ -288,7 +288,8 @@ routeFrameCpt :: R.Component RouteFrameProps
routeFrameCpt = here.component "routeFrame" cpt where
cpt props@{ nodeId, nodeType, session, sessionId, boxes, tasks } _ = do
let sessionProps = RE.pick props :: Record SessionProps
pure $ authed sessionProps $ forested { boxes, tasks } [ frameLayout { nodeId, nodeType, session } ]
pure $ authed sessionProps $ \_ ->
forested { boxes, tasks } [ frameLayout { nodeId, nodeType, session } ]
team :: R2.Component SessionNodeProps
team = R.createElement teamCpt
...
...
@@ -297,7 +298,8 @@ teamCpt :: R.Component SessionNodeProps
teamCpt = here.component "team" cpt where
cpt props@{ nodeId, session, sessionId, boxes, tasks } _ = do
let sessionProps = RE.pick props :: Record SessionProps
pure $ authed sessionProps $ forested { boxes, tasks } [ corpusLayout { nodeId, session } ]
pure $ authed sessionProps $ \_ ->
forested { boxes, tasks } [ corpusLayout { nodeId, session } ]
texts :: R2.Component SessionNodeProps
texts = R.createElement textsCpt
...
...
@@ -319,7 +321,7 @@ textsCpt = here.component "texts" cpt
, tasks } _ = do
let sessionProps = RE.pick props :: Record SessionProps
session' <- R.useContext session
pure $ authed sessionProps $
pure $ authed sessionProps $
\_ ->
Texts.textsWithForest
{ forestProps: { backend
, forestOpen
...
...
@@ -350,7 +352,7 @@ userCpt = here.component "user" cpt where
session' <- R.useContext session
R.useEffect' $ do
log2 "[user] session'" session'
pure $ authed sessionProps $
pure $ authed sessionProps $
\_ ->
forested { boxes, tasks }
[ userLayout { frontends
, nodeId
...
...
@@ -371,7 +373,7 @@ contactCpt = here.component "contact" cpt where
, boxes: { reloadForest, reloadRoot } } _ = do
let sessionProps = RE.pick props :: Record SessionProps
let forestedProps = RE.pick props :: Record Props
pure $ authed sessionProps $
pure $ authed sessionProps $
\_ ->
forested forestedProps
[ contactLayout { annuaireId, frontends, nodeId, reloadForest, reloadRoot, session, tasks } [] ]
where frontends = defaultFrontends
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment