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
Hide 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
instance translateNodeType :: Translate NodeType where
translate l n = case l of
FR ->
_
translateFR n
_ ->
_
translateEN n
FR -> translateFR n
_ -> translateEN n
_
translateFR :: NodeType -> String
_
translateFR = case _ of
translateFR :: NodeType -> String
translateFR = case _ of
Annuaire -> "Annuaire"
Corpus -> "Corpus"
Dashboard -> "Dashboard"
...
...
@@ -260,10 +260,10 @@ _translateFR = case _ of
NodeFrameNotebook -> "Carnet de notes"
NodeFrameWrite -> "Éditeur de texte"
NodeFrameVisio -> "Visio"
NodePublic n ->
_
translateFR n
NodePublic n -> translateFR n
_
translateEN :: NodeType -> String
_
translateEN = case _ of
translateEN :: NodeType -> String
translateEN = case _ of
Annuaire -> "Annuaire"
Corpus -> "Corpus"
Dashboard -> "Dashboard"
...
...
@@ -290,72 +290,72 @@ _translateEN = case _ of
NodeFrameNotebook -> "Notebook"
NodeFrameWrite -> "Write"
NodeFrameVisio -> "Visio"
NodePublic n ->
_
translateEN n
NodePublic n -> translateEN n
------------------------------------------------------
_
getIcon :: NodeType -> Boolean -> String
_
getIcon NodeUser false = "user-circle"
_
getIcon NodeUser true = "user"
getIcon :: NodeType -> Boolean -> String
getIcon NodeUser false = "user-circle"
getIcon NodeUser true = "user"
------------------------------------------------------
_
getIcon Folder false = "folder"
_
getIcon Folder true = "folder-open-o"
getIcon Folder false = "folder"
getIcon Folder true = "folder-open-o"
------------------------------------------------------
_
getIcon FolderPrivate true = "lock"
_
getIcon FolderPrivate false = "lock-circle"
getIcon FolderPrivate true = "lock"
getIcon FolderPrivate false = "lock-circle"
_
getIcon FolderShared true = "share-alt"
_
getIcon FolderShared false = "share-circle"
_
getIcon Team true = "users"
_
getIcon Team false = "users-closed"
getIcon FolderShared true = "share-alt"
getIcon FolderShared false = "share-circle"
getIcon Team true = "users"
getIcon Team false = "users-closed"
_
getIcon FolderPublic true = "globe-circle"
_
getIcon FolderPublic false = "globe"
getIcon FolderPublic true = "globe-circle"
getIcon FolderPublic false = "globe"
------------------------------------------------------
_
getIcon Corpus true = "book"
_
getIcon Corpus false = "book-circle"
getIcon Corpus true = "book"
getIcon Corpus false = "book-circle"
_
getIcon Phylo _ = "code-fork"
getIcon Phylo _ = "code-fork"
_
getIcon Graph _ = "hubzilla"
_
getIcon Texts _ = "newspaper-o"
_
getIcon Dashboard _ = "signal"
_
getIcon NodeList _ = "list"
_
getIcon NodeFile _ = "file" -- TODO depending on mime type we can use fa-file-image etc
getIcon Graph _ = "hubzilla"
getIcon Texts _ = "newspaper-o"
getIcon Dashboard _ = "signal"
getIcon NodeList _ = "list"
getIcon NodeFile _ = "file" -- TODO depending on mime type we can use fa-file-image etc
_
getIcon Annuaire true = "address-card-o"
_
getIcon Annuaire false = "address-card"
getIcon Annuaire true = "address-card-o"
getIcon Annuaire false = "address-card"
_
getIcon NodeContact true = "address-card-o"
_
getIcon NodeContact false = "address-card"
getIcon NodeContact true = "address-card-o"
getIcon NodeContact false = "address-card"
_
getIcon NodeFrameWrite true = "file-text-o"
_
getIcon NodeFrameWrite false = "file-text"
getIcon NodeFrameWrite true = "file-text-o"
getIcon NodeFrameWrite false = "file-text"
_
getIcon NodeFrameCalc true = "calculator"
_
getIcon NodeFrameCalc false = "calculator"
getIcon NodeFrameCalc true = "calculator"
getIcon NodeFrameCalc false = "calculator"
_
getIcon NodeFrameNotebook true = "file-code-o"
_
getIcon NodeFrameNotebook false = "code"
getIcon NodeFrameNotebook true = "file-code-o"
getIcon NodeFrameNotebook false = "code"
_
getIcon NodeFrameVisio true = "video-camera"
_
getIcon NodeFrameVisio false = "video-camera"
getIcon NodeFrameVisio true = "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 _ false = "folder-o"
getIcon _ true = "folder-open"
getIcon _ false = "folder-o"
------------------------------------------------------
fldr :: NodeType -> Boolean -> String
fldr nt flag = classNamePrefix <>
_
getIcon nt flag
fldr nt flag = classNamePrefix <> getIcon nt flag
charCodeIcon :: NodeType -> Boolean -> String
charCodeIcon nt flag = glyphiconToCharCode $
_
getIcon nt flag
charCodeIcon nt flag = glyphiconToCharCode $ getIcon nt flag
publicize :: NodeType -> NodeType
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