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
03f476d7
Commit
03f476d7
authored
May 25, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[REFACT][Tree] NodeType Documentation (simpler for ease contributions)
parent
cf16b82e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
18 deletions
+25
-18
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+25
-18
No files found.
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
03f476d7
...
@@ -595,30 +595,37 @@ reallyDelete d = H.div {className: "panel-footer"}
...
@@ -595,30 +595,37 @@ reallyDelete d = H.div {className: "panel-footer"}
[H.text " Yes, delete!"]
[H.text " Yes, delete!"]
]
]
-- | Action : Upload
-- | Action : Upload
-- | Action: Show Documentation
actionDoc :: GT.NodeType -> R.Hooks R.Element
actionDoc GT.NodeUser = pure $ R.fragment [ H.div { style: {margin: "10px"} }
[ infoTitle GT.NodeUser
, H.p {} [ H.text "This account is personal"]
, H.p {} [ H.text "See the instances terms of uses."]
]
]
actionDoc GT.FolderPrivate = pure $ fragmentPT "This folder and its children are private only!"
actionDoc GT.FolderPublic = pure $ fragmentPT "Soon, you will be able to build public folders to share your work with the world!"
actionDoc GT.FolderShared = pure $ fragmentPT "Soon, you will be able to build teams folders to share your work"
actionDoc nodeType = pure $ fragmentPT $ "More information on " <> show nodeType
-- | Action: Show Documentation
actionDoc :: GT.NodeType -> R.Hooks R.Element
actionDoc nodeType =
pure $ R.fragment [ H.div { style: {margin: "10px"} }
$ [ infoTitle nodeType ]
<> (map (\info -> H.p {} [H.text info]) $ docOf nodeType)
]
where
infoTitle :: GT.NodeType -> R.Element
infoTitle nt = H.div { style: {margin: "10px"}}
[ H.h3 {} [H.text "Documentation about " ]
, H.h3 {className: GT.fldr nt true} [ H.text $ show nt ]
]
-- | TODO add documentation of all NodeType
docOf :: GT.NodeType -> Array String
docOf GT.NodeUser = [ "This account is personal"
, "See the instances terms of uses."
]
docOf GT.FolderPrivate = ["This folder and its children are private only."]
docOf GT.FolderPublic = ["Soon, you will be able to build public folders to share your work with the world!"]
docOf GT.FolderShared = ["Soon, you will be able to build teams folders to share your work"]
docOf nodeType = ["More information on " <> show nodeType]
-- | Utils
infoTitle :: GT.NodeType -> R.Element
infoTitle nt = H.div { style: {margin: "10px"}}
[ H.h3 {} [H.text "Documentation about " ]
, H.h3 {className: GT.fldr nt true} [ H.text $ show nt ]
]
fragmentPT text = H.div {style: {margin: "10px"}} [H.text text]
fragmentPT text = H.div {style: {margin: "10px"}} [H.text text]
...
...
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