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
81bcc365
Commit
81bcc365
authored
Jun 10, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX|REFACT] warnings + icons
parent
d1b90d3f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
32 deletions
+29
-32
Action.purs
src/Gargantext/Components/Forest/Tree/Node/Action.purs
+21
-11
Rename.purs
...Gargantext/Components/Forest/Tree/Node/Action/Rename.purs
+0
-1
Update.purs
...Gargantext/Components/Forest/Tree/Node/Action/Update.purs
+6
-16
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+1
-1
Tools.purs
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
+1
-3
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action.purs
View file @
81bcc365
...
...
@@ -13,6 +13,7 @@ import Gargantext.Routes (SessionRoute(..))
import Gargantext.Routes as GR
import Gargantext.Sessions (Session, get, put, post, delete)
import Gargantext.Types as GT
import Gargantext.Components.Forest.Tree.Node (NodeAction(..), glyphiconNodeAction)
type Props =
( dispatch :: Action -> Aff Unit
...
...
@@ -21,7 +22,7 @@ type Props =
, session :: Session
)
data Action = AddNode String GT.NodeType
data Action = AddNode
String GT.NodeType
| DeleteNode
| UpdateNode GT.AsyncTaskWithType
| RenameNode String
...
...
@@ -30,6 +31,7 @@ data Action = AddNode String GT.NodeType
| RefreshTree
| ShareNode String
instance showShow :: Show Action where
show DeleteNode = "DeleteNode"
show RefreshTree = "RefreshTree"
...
...
@@ -42,19 +44,27 @@ instance showShow :: Show Action where
-----------------------------------------------------------------------
icon :: Action -> String
icon DeleteNode = "trash"
icon (AddNode _ _) = "plus"
icon _ = "hand-o-right"
icon (AddNode _ _) = glyphiconNodeAction (Add [])
icon DeleteNode = glyphiconNodeAction Delete
icon (UpdateNode _) = glyphiconNodeAction Refresh
icon (RenameNode _) = glyphiconNodeAction Config
icon (DoSearch _) = glyphiconNodeAction SearchBox
icon (UploadFile _ _ _ _) = glyphiconNodeAction Upload
icon RefreshTree = glyphiconNodeAction Refresh
icon (ShareNode _) = glyphiconNodeAction Share
-- icon _ = "hand-o-right"
text :: Action -> String
text DeleteNode = "Delete !"
text (AddNode _ _) = "Add !"
text (UpdateNode _) = "Update !"
text (RenameNode _) = "Rename !"
text (DoSearch _) = "Launch search !"
text DeleteNode = "Delete !"
text RefreshTree = "Refresh Tree !"
text (AddNode _ _ )= "Add !"
text (UpdateNode _ )= "Update !"
text (RenameNode _ )= "Rename !"
text (DoSearch _ )= "Launch search !"
text (ShareNode _ )= "Share !"
text (UploadFile _ _ _ _)= "Upload File !"
text RefreshTree = "Refresh Tree !"
text (ShareNode _) = "Share !"
-----------------------------------------------------------------------
-- TODO move code below elsewhere
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Rename.purs
View file @
81bcc365
...
...
@@ -4,7 +4,6 @@ import Data.Argonaut (class EncodeJson, jsonEmptyObject, (:=), (~>))
import Data.Maybe (Maybe(..))
import Effect.Aff (Aff)
import Prelude (($))
import Reactix as R
import Gargantext.Components.Forest.Tree.Node.Action
import Gargantext.Types as GT
import Gargantext.Types (ID)
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Update.purs
View file @
81bcc365
module Gargantext.Components.Forest.Tree.Node.Action.Update where
import Data.Array (length, head)
import Data.Argonaut (class DecodeJson, class EncodeJson, decodeJson, jsonEmptyObject, (.:), (:=), (~>))
import Data.Maybe (Maybe(..), fromMaybe)
-- import Data.Newtype (class Newtype)
import Data.Tuple.Nested ((/\))
import Effect.Aff (Aff, launchAff)
import Effect.Uncurried (mkEffectFn1)
import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node (SettingsBox(..), settingsBox)
import Gargantext.Types (NodeType(..), readNodeType)
import Gargantext.Utils.Reactix as R2
import Gargantext.Sessions (Session, post)
import Gargantext.Routes as GR
import Data.Argonaut (class EncodeJson, jsonEmptyObject, (:=), (~>))
import Effect.Aff (Aff)
import Gargantext.Components.Forest.Tree.Node.Action (Action)
import Gargantext.Types (NodeType)
import Gargantext.Types as GT
import Prelude (Unit, bind, const, discard, map, pure, show, ($), (<>), (>), (<<<))
import Reactix as R
import Reactix.DOM.HTML as H
import Gargantext.Prelude (Unit)
{-
updateNode :: Session -> ID -> UpdateNodeParams -> Aff (Array ID)
...
...
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
81bcc365
...
...
@@ -180,7 +180,7 @@ fldr nt open = if open
color FolderPublic = ""
color FolderShared = " text-warning"
color _ = " text-danger"
-}
-}
-- START node text
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
View file @
81bcc365
...
...
@@ -7,7 +7,7 @@ import Effect.Uncurried (mkEffectFn1)
import Gargantext.Components.Forest.Tree.Node.Action
import Gargantext.Types (ID)
import Gargantext.Utils.Reactix as R2
import Gargantext.Prelude (Unit, bind, const, discard,
identity, map, pure, show, unit, void, ($), (+), (<>), (==), (<<<
))
import Gargantext.Prelude (Unit, bind, const, discard,
pure, show, ($), (<<<), (<>
))
import Reactix as R
import Reactix.DOM.HTML as H
...
...
@@ -83,5 +83,3 @@ submitButton action dispatch =
]
]
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