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
131
Issues
131
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
purescript-gargantext
Commits
5b9aac47
Commit
5b9aac47
authored
Apr 22, 2021
by
Karen Konou
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Folder view: refactor to fix dependency loop
parent
3799c0ca
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
21 deletions
+36
-21
FolderView.purs
src/Gargantext/Components/FolderView.purs
+0
-9
BackButton.js
src/Gargantext/Components/FolderView/BackButton.js
+7
-0
BackButton.purs
src/Gargantext/Components/FolderView/BackButton.purs
+18
-0
Frame.purs
src/Gargantext/Components/Nodes/Frame.purs
+2
-2
Table.purs
src/Gargantext/Components/Table.purs
+9
-10
No files found.
src/Gargantext/Components/FolderView.purs
View file @
5b9aac47
...
...
@@ -108,14 +108,5 @@ folderCpt = here.component "folderCpt" cpt where
getFolderPath :: NodeType -> SessionId -> Int -> String
getFolderPath nodeType sid nodeId = appPath $ fromMaybe Home $ nodeTypeAppRoute nodeType sid nodeId
backButton :: R.Element
backButton =
H.button {
className: "btn btn-primary"
, on: {click: back}
} [
H.i { className: "fa fa-arrow-left"} []
]
loadFolders :: Record Props -> Aff FTree
loadFolders {nodeId, session} = get session $ TreeFirstLevel (Just nodeId) ""
src/Gargantext/Components/FolderView/BackButton.js
0 → 100644
View file @
5b9aac47
'use strict'
;
exports
.
back
=
function
()
{
return
function
()
{
history
.
back
();
}
}
\ No newline at end of file
src/Gargantext/Components/FolderView/BackButton.purs
0 → 100644
View file @
5b9aac47
module Gargantext.Components.FolderView.BackButton where
import Gargantext.Prelude (Unit)
import Effect (Effect)
import Reactix as R
import Reactix.DOM.HTML as H
foreign import back :: Effect Unit
backButton :: R.Element
backButton =
H.button {
className: "btn btn-primary"
, on: {click: back}
} [
H.i { className: "fa fa-arrow-left"} []
]
\ No newline at end of file
src/Gargantext/Components/Nodes/Frame.purs
View file @
5b9aac47
...
...
@@ -13,7 +13,7 @@ import Reactix.DOM.HTML as H
import Toestand as T
import Gargantext.Components.Node (NodePoly(..))
import Gargantext.Components.FolderView
as FV
import Gargantext.Components.FolderView
.BackButton (backButton)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Prelude
import Gargantext.Routes (SessionRoute(NodeAPI))
...
...
@@ -106,7 +106,7 @@ frameLayoutViewCpt = here.component "frameLayoutView" cpt
, reload
, session } _ =
pure $ H.div{} [
FV.
backButton
backButton
, H.div { className : "frame"
, rows: "100%,*" }
[ H.iframe { src: hframeUrl nodeType base frame_id
...
...
src/Gargantext/Components/Table.purs
View file @
5b9aac47
module Gargantext.Components.Table where
import Gargantext.Prelude
import Data.Array as A
import Data.Maybe (Maybe(..))
import Data.Sequence as Seq
import Effect (Effect)
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
import Gargantext.Prelude
import Gargantext.Components.FolderView as FV
import Gargantext.Components.Table.Types (ColumnName, OrderBy, OrderByDirection(..), Params, Props, TableContainerProps, columnName)
import Gargantext.Components.FolderView.BackButton (backButton)
import Gargantext.Components.Nodes.Lists.Types as NT
import Gargantext.Components.Search (SearchType(..))
import Gargantext.
Utils.Reactix as R2
import Gargantext.
Components.Table.Types (ColumnName, OrderBy, OrderByDirection(..), Params, Props, TableContainerProps, columnName)
import Gargantext.Utils.Reactix (effectLink)
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
here :: R2.Here
here = R2.here "Gargantext.Components.Table"
...
...
@@ -64,7 +63,7 @@ tableHeaderLayoutCpt = here.component "tableHeaderLayout" cpt
cacheState' <- T.useLive T.unequal cacheState
pure $ R.fragment
[ R2.row [
FV.
backButton]
[ R2.row [backButton]
,
R2.row
[ H.div {className: "col-md-3"} [ H.h3 {} [H.text title] ]
...
...
Karen Konou
@karenkonou
mentioned in commit
4585b6fc
·
May 06, 2021
mentioned in commit
4585b6fc
mentioned in commit 4585b6fcbcdd677ad6f959c431b48b374bd8844f
Toggle commit list
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