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
b5a59874
Commit
b5a59874
authored
Jul 15, 2021
by
arturo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tree] new node adding: better name and icon
* Issue #309, feedbacks (2)
parent
cfd99a6b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
46 deletions
+46
-46
Types.purs
src/Gargantext/Types.purs
+46
-46
No files found.
src/Gargantext/Types.purs
View file @
b5a59874
...
@@ -229,11 +229,11 @@ instance Read NodeType where
...
@@ -229,11 +229,11 @@ instance Read NodeType where
instance translateNodeType :: Translate NodeType where
instance translateNodeType :: Translate NodeType where
translate l n = case l of
translate l n = case l of
FR ->
_
translateFR n
FR -> translateFR n
_ ->
_
translateEN n
_ -> translateEN n
_
translateFR :: NodeType -> String
translateFR :: NodeType -> String
_
translateFR = case _ of
translateFR = case _ of
Annuaire -> "Annuaire"
Annuaire -> "Annuaire"
Corpus -> "Corpus"
Corpus -> "Corpus"
Dashboard -> "Dashboard"
Dashboard -> "Dashboard"
...
@@ -260,10 +260,10 @@ _translateFR = case _ of
...
@@ -260,10 +260,10 @@ _translateFR = case _ of
NodeFrameNotebook -> "Carnet de notes"
NodeFrameNotebook -> "Carnet de notes"
NodeFrameWrite -> "Éditeur de texte"
NodeFrameWrite -> "Éditeur de texte"
NodeFrameVisio -> "Visio"
NodeFrameVisio -> "Visio"
NodePublic n ->
_
translateFR n
NodePublic n -> translateFR n
_
translateEN :: NodeType -> String
translateEN :: NodeType -> String
_
translateEN = case _ of
translateEN = case _ of
Annuaire -> "Annuaire"
Annuaire -> "Annuaire"
Corpus -> "Corpus"
Corpus -> "Corpus"
Dashboard -> "Dashboard"
Dashboard -> "Dashboard"
...
@@ -290,72 +290,72 @@ _translateEN = case _ of
...
@@ -290,72 +290,72 @@ _translateEN = case _ of
NodeFrameNotebook -> "Notebook"
NodeFrameNotebook -> "Notebook"
NodeFrameWrite -> "Write"
NodeFrameWrite -> "Write"
NodeFrameVisio -> "Visio"
NodeFrameVisio -> "Visio"
NodePublic n ->
_
translateEN n
NodePublic n -> translateEN n
------------------------------------------------------
------------------------------------------------------
_
getIcon :: NodeType -> Boolean -> String
getIcon :: NodeType -> Boolean -> String
_
getIcon NodeUser false = "user-circle"
getIcon NodeUser false = "user-circle"
_
getIcon NodeUser true = "user"
getIcon NodeUser true = "user"
------------------------------------------------------
------------------------------------------------------
_
getIcon Folder false = "folder"
getIcon Folder false = "folder"
_
getIcon Folder true = "folder-open-o"
getIcon Folder true = "folder-open-o"
------------------------------------------------------
------------------------------------------------------
_
getIcon FolderPrivate true = "lock"
getIcon FolderPrivate true = "lock"
_
getIcon FolderPrivate false = "lock-circle"
getIcon FolderPrivate false = "lock-circle"
_
getIcon FolderShared true = "share-alt"
getIcon FolderShared true = "share-alt"
_
getIcon FolderShared false = "share-circle"
getIcon FolderShared false = "share-circle"
_
getIcon Team true = "users"
getIcon Team true = "users"
_
getIcon Team false = "users-closed"
getIcon Team false = "users-closed"
_
getIcon FolderPublic true = "globe-circle"
getIcon FolderPublic true = "globe-circle"
_
getIcon FolderPublic false = "globe"
getIcon FolderPublic false = "globe"
------------------------------------------------------
------------------------------------------------------
_
getIcon Corpus true = "book"
getIcon Corpus true = "book"
_
getIcon Corpus false = "book-circle"
getIcon Corpus false = "book-circle"
_
getIcon Phylo _ = "code-fork"
getIcon Phylo _ = "code-fork"
_
getIcon Graph _ = "hubzilla"
getIcon Graph _ = "hubzilla"
_
getIcon Texts _ = "newspaper-o"
getIcon Texts _ = "newspaper-o"
_
getIcon Dashboard _ = "signal"
getIcon Dashboard _ = "signal"
_
getIcon NodeList _ = "list"
getIcon NodeList _ = "list"
_
getIcon NodeFile _ = "file" -- TODO depending on mime type we can use fa-file-image etc
getIcon NodeFile _ = "file" -- TODO depending on mime type we can use fa-file-image etc
_
getIcon Annuaire true = "address-card-o"
getIcon Annuaire true = "address-card-o"
_
getIcon Annuaire false = "address-card"
getIcon Annuaire false = "address-card"
_
getIcon NodeContact true = "address-card-o"
getIcon NodeContact true = "address-card-o"
_
getIcon NodeContact false = "address-card"
getIcon NodeContact false = "address-card"
_
getIcon NodeFrameWrite true = "file-text-o"
getIcon NodeFrameWrite true = "file-text-o"
_
getIcon NodeFrameWrite false = "file-text"
getIcon NodeFrameWrite false = "file-text"
_
getIcon NodeFrameCalc true = "calculator"
getIcon NodeFrameCalc true = "calculator"
_
getIcon NodeFrameCalc false = "calculator"
getIcon NodeFrameCalc false = "calculator"
_
getIcon NodeFrameNotebook true = "file-code-o"
getIcon NodeFrameNotebook true = "file-code-o"
_
getIcon NodeFrameNotebook false = "code"
getIcon NodeFrameNotebook false = "code"
_
getIcon NodeFrameVisio true = "video-camera"
getIcon NodeFrameVisio true = "video-camera"
_
getIcon NodeFrameVisio false = "video-camera"
getIcon NodeFrameVisio false = "video-camera"
_getIcon (NodePublic nt) b = _
getIcon nt b
getIcon (NodePublic nt) b =
getIcon nt b
_
getIcon _ true = "folder-open"
getIcon _ true = "folder-open"
_
getIcon _ false = "folder-o"
getIcon _ false = "folder-o"
------------------------------------------------------
------------------------------------------------------
fldr :: NodeType -> Boolean -> String
fldr :: NodeType -> Boolean -> String
fldr nt flag = classNamePrefix <>
_
getIcon nt flag
fldr nt flag = classNamePrefix <> getIcon nt flag
charCodeIcon :: NodeType -> Boolean -> String
charCodeIcon :: NodeType -> Boolean -> String
charCodeIcon nt flag = glyphiconToCharCode $
_
getIcon nt flag
charCodeIcon nt flag = glyphiconToCharCode $ getIcon nt flag
publicize :: NodeType -> NodeType
publicize :: NodeType -> NodeType
publicize (NodePublic nt) = NodePublic nt
publicize (NodePublic nt) = NodePublic nt
...
...
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