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
1029a019
Commit
1029a019
authored
Sep 28, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[padagraph] add padagraph Node type
parent
7b8056ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
Settings.purs
src/Gargantext/Components/Forest/Tree/Node/Settings.purs
+8
-1
Types.purs
src/Gargantext/Types.purs
+10
-1
No files found.
src/Gargantext/Components/Forest/Tree/Node/Settings.purs
View file @
1029a019
...
...
@@ -57,7 +57,7 @@ instance Show NodeAction where
show Share = "Share"
show Config = "Config"
show (Link _) = "Link to " -- <> show x
show (Add _) = "Add Child" -- foldl (\a b -> a <> show b) "Add " xs
show (Add _)
= "Add Child" -- foldl (\a b -> a <> show b) "Add " xs
show (Merge _) = "Merge with subtree" -- <> show t
show (Publish _) = "Publish" -- <> show x
show AddingContact = "AddingContact"
...
...
@@ -210,6 +210,7 @@ settingsBox Graph =
, Download -- TODO as GEXF or JSON
-- , Publish publishParams
, Delete
, Add [ NodePadagraph ]
]
}
...
...
@@ -370,6 +371,12 @@ settingsBox NodeFile =
, Delete ]
}
settingsBox NodePadagraph =
SettingsBox { show: true
, edit: true
, doc: Documentation NodePadagraph
, buttons: [ Delete ]}
settingsBox _ =
SettingsBox { show : false
...
...
src/Gargantext/Types.purs
View file @
1029a019
...
...
@@ -159,6 +159,7 @@ data NodeType = Annuaire
| NodeFrameWrite
| NodeFrameVisio
| NodePublic NodeType
| NodePadagraph
derive instance Generic NodeType _
derive instance Eq NodeType
instance JSON.ReadForeign NodeType where
...
...
@@ -198,6 +199,7 @@ instance Show NodeType where
show NodeFrameVisio = "NodeFrameVisio"
show (NodePublic nt) = "NodePublic" <> show nt
show NodeFile = "NodeFile"
show NodePadagraph = "NodePadagraph"
instance Read NodeType where
...
...
@@ -223,9 +225,10 @@ instance Read NodeType where
read "Annuaire" = Just Annuaire
read "NodeFrameWrite" = Just NodeFrameWrite
read "NodeFrameCalc" = Just NodeFrameCalc
read "NodeFrameNotebook"
= Just NodeFrameNotebook
read "NodeFrameNotebook" = Just NodeFrameNotebook
read "NodeFrameVisio" = Just NodeFrameVisio
read "NodeFile" = Just NodeFile
read "NodePadagraph" = Just NodePadagraph
-- TODO NodePublic read ?
read _ = Nothing
...
...
@@ -265,6 +268,7 @@ translateFR = case _ of
NodeFrameWrite -> "Éditeur de texte"
NodeFrameVisio -> "Visio"
NodePublic n -> translateFR n
NodePadagraph -> "Padagraph"
translateEN :: NodeType -> String
translateEN = case _ of
...
...
@@ -295,6 +299,7 @@ translateEN = case _ of
NodeFrameWrite -> "Write"
NodeFrameVisio -> "Visio"
NodePublic n -> translateEN n
NodePadagraph -> "Padagraph"
------------------------------------------------------
...
...
@@ -350,6 +355,9 @@ getIcon NodeFrameVisio false = "video-camera"
getIcon (NodePublic nt) b = getIcon nt b
getIcon NodePadagraph true = "line-chart"
getIcon NodePadagraph false = "line-chart"
getIcon _ true = "folder-open"
getIcon _ false = "folder-o"
...
...
@@ -406,6 +414,7 @@ nodeTypePath NodeFrameNotebook = "code"
nodeTypePath NodeFrameVisio = "visio"
nodeTypePath (NodePublic nt) = nodeTypePath nt
nodeTypePath NodeFile = "file"
nodeTypePath NodePadagraph = "padagraph"
------------------------------------------------------------
type CorpusId = Int
...
...
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