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
142
Issues
142
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
041aef52
Commit
041aef52
authored
Jun 05, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Types] Forest/Tree/Action
parent
36c0e206
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
Tree.purs
src/Gargantext/Components/Forest/Tree.purs
+2
-2
Action.purs
src/Gargantext/Components/Forest/Tree/Node/Action.purs
+2
-2
Add.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Add.purs
+1
-1
Rename.purs
...Gargantext/Components/Forest/Tree/Node/Action/Rename.purs
+1
-1
No files found.
src/Gargantext/Components/Forest/Tree.purs
View file @
041aef52
...
...
@@ -204,14 +204,14 @@ performAction { reload: (_ /\ setReload)
performAction p@{ reload: (_ /\ setReload)
, session
, tree: (NTree (LNode {id}) _) } (
Submit
name) = do
, tree: (NTree (LNode {id}) _) } (
RenameNode
name) = do
void $ renameNode session id $ RenameValue {name}
performAction p RefreshTree
performAction p@{ openNodes: (_ /\ setOpenNodes)
, reload: (_ /\ setReload)
, session
, tree: (NTree (LNode {id}) _) } (
CreateSubmit
name nodeType) = do
, tree: (NTree (LNode {id}) _) } (
AddNode
name nodeType) = do
task <- addNode session id $ AddNodeValue {name, nodeType}
liftEffect do
setOpenNodes (Set.insert (mkNodeId session id))
...
...
src/Gargantext/Components/Forest/Tree/Node/Action.purs
View file @
041aef52
...
...
@@ -15,11 +15,11 @@ import Gargantext.Sessions (Session, get, put, post, delete)
import Gargantext.Routes as GR
import Gargantext.Types as GT
data Action =
CreateSubmit
String GT.NodeType
data Action =
AddNode
String GT.NodeType
| DeleteNode
| UpdateNode GT.AsyncTaskWithType
| RenameNode String
| SearchQuery GT.AsyncTaskWithType
| Submit String
| UploadFile GT.NodeType FileType (Maybe String) UploadFileContents
| RefreshTree
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Add.purs
View file @
041aef52
...
...
@@ -125,7 +125,7 @@ addNodeView p@{ dispatch, nodeType, nodeTypes } = R.createElement el p []
, onClick: mkEffectFn1 $ \_ -> do
-- TODO
--setPopupOpen $ const Nothing
launchAff $ dispatch $
CreateSubmit
name' nt
launchAff $ dispatch $
AddNode
name' nt
} [H.text "Add"]
]
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Rename.purs
View file @
041aef52
...
...
@@ -65,7 +65,7 @@ renameBox p@{ dispatch, renameBoxOpen: (true /\ setRenameBoxOpen) } = R.createEl
, type: "button"
, onClick: mkEffectFn1 $ \_ -> do
setRenameBoxOpen $ const false
launchAff $ dispatch $
Submit
newName
launchAff $ dispatch $
RenameNode
newName
, title: "Rename"
} []
cancelBtn =
...
...
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