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
53df92e1
Commit
53df92e1
authored
May 12, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Tree/Node] before refactoring
parent
ecb9ea36
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
100 deletions
+106
-100
Node.purs
src/Gargantext/Components/Forest/Tree/Node.purs
+90
-88
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+16
-12
No files found.
src/Gargantext/Components/Forest/Tree/Node.purs
View file @
53df92e1
...
...
@@ -16,6 +16,9 @@ filterWithRights (show action if user can only)
-}
------------------------------------------------------------------------
------------------------------------------------------------------------
data Status a = IsBeta a | IsProd a
data NodeAction = Documentation NodeType
| SearchBox
| Download | Upload | Refresh | Config
...
...
@@ -71,7 +74,6 @@ glyphiconNodeAction Config = "wrench"
glyphiconNodeAction _ = ""
------------------------------------------------------------------------
------------------------------------------------------------------------
data SettingsBox =
SettingsBox { show :: Boolean
...
...
@@ -83,14 +85,14 @@ data SettingsBox =
settingsBox :: NodeType -> SettingsBox
settingsBox NodeUser = SettingsBox {
show: true
show
: true
, edit : false
, doc : Documentation NodeUser
, buttons : [ Delete ]
}
settingsBox FolderPrivate = SettingsBox {
show: true
show
: true
, edit : false
, doc : Documentation FolderPrivate
, buttons : [ Add [ Corpus
...
...
@@ -101,7 +103,7 @@ settingsBox FolderPrivate = SettingsBox {
}
settingsBox Team = SettingsBox {
show: true
show
: true
, edit : true
, doc : Documentation Team
, buttons : [ Add [ Corpus
...
...
@@ -112,7 +114,7 @@ settingsBox Team = SettingsBox {
}
settingsBox FolderShared = SettingsBox {
show: true
show
: true
, edit : true
, doc : Documentation FolderShared
, buttons : [ Add [Team, FolderShared]
...
...
@@ -121,7 +123,7 @@ settingsBox FolderShared = SettingsBox {
}
settingsBox FolderPublic = SettingsBox {
show: true
show
: true
, edit : false
, doc : Documentation FolderPublic
, buttons : [ Add [ Corpus
...
...
@@ -130,8 +132,8 @@ settingsBox FolderPublic = SettingsBox {
]
}
settingsBox Folder =
SettingsBox {
show
: true
settingsBox Folder =
SettingsBox { show
: true
, edit : true
, doc : Documentation Folder
, buttons : [ Add [ Corpus
...
...
@@ -142,8 +144,8 @@ settingsBox Folder = SettingsBox {
]
}
settingsBox Corpus =
SettingsBox {
show
: true
settingsBox Corpus =
SettingsBox { show
: true
, edit : true
, doc : Documentation Corpus
, buttons : [ SearchBox
...
...
@@ -161,8 +163,8 @@ settingsBox Corpus = SettingsBox {
]
}
settingsBox Texts =
SettingsBox {
show
: true
settingsBox Texts =
SettingsBox { show
: true
, edit : false
, doc : Documentation Texts
, buttons : [ Refresh
...
...
@@ -172,8 +174,8 @@ settingsBox Texts = SettingsBox {
]
}
settingsBox Graph =
SettingsBox {
show
: true
settingsBox Graph =
SettingsBox { show
: true
, edit : false
, doc : Documentation Graph
, buttons : [ Refresh
...
...
@@ -183,28 +185,28 @@ settingsBox Graph = SettingsBox {
]
}
settingsBox NodeList =
SettingsBox {
show
: true
settingsBox NodeList =
SettingsBox { show
: true
, edit : false
, doc : Documentation NodeList
, buttons : [ Refresh
, Config
, Download
, Upload
, CopyFromCorpus
, Download
-- , Delete
]
}
settingsBox Dashboard =
SettingsBox {
show
: true
settingsBox Dashboard =
SettingsBox { show
: true
, edit : false
, doc : Documentation Dashboard
, buttons : []
}
settingsBox Annuaire =
SettingsBox {
show
: true
settingsBox Annuaire =
SettingsBox { show
: true
, edit : false
, doc : Documentation Annuaire
, buttons : [ Upload
...
...
@@ -212,8 +214,8 @@ settingsBox Annuaire = SettingsBox {
]
}
settingsBox _ =
SettingsBox {
show
: false
settingsBox _ =
SettingsBox { show
: false
, edit : false
, doc : Documentation NodeUser
, buttons : []
...
...
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
53df92e1
...
...
@@ -395,11 +395,13 @@ nodePopupCpt = R.hooksComponent "G.C.F.T.N.B.nodePopupView" cpt
where
SettingsBox {edit, doc, buttons} = settingsBox nodeType
mPanelAction :: R.State (Record NodePopupS) -> Record NodePopupProps -> R.State Search -> R.Element
mPanelAction :: R.State (Record NodePopupS)
-> Record NodePopupProps
-> R.State Search
-> R.Element
mPanelAction ({action: Nothing} /\ _) _ _ = H.div {} []
mPanelAction ({action: Just action} /\ _) p search =
panelAction {
action
panelAction { action
, dispatch: p.dispatch
, id: p.id
, name: p.name
...
...
@@ -514,7 +516,7 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt
cpt {action: Documentation GT.FolderShared} _ = do
pure $ fragmentPT "Soon, you will be able to build teams folders to share your work"
cpt {action: Documentation x, nodeType} _ = do
pure $ fragmentPT $ "More information on" <> show nodeType
pure $ fragmentPT $ "More information on
" <> show nodeType
cpt {action: Link _} _ = do
pure $ fragmentPT "Soon, you will be able to link the corpus with your Annuaire (and reciprocally)."
...
...
@@ -549,8 +551,10 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt
]
cpt {action: Add xs, dispatch, id, name, nodePopup: p, nodeType} _ = do
pure $ createNodeView {dispatch, id, name, nodeType, nodeTypes: xs}
cpt {action: CopyFromCorpus, dispatch, id, nodeType, session} _ = do
pure $ copyFromCorpusView {dispatch, id, nodeType, session}
cpt _ _ = do
pure $ H.div {} []
...
...
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