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(..))
...
@@ -13,6 +13,7 @@ import Gargantext.Routes (SessionRoute(..))
import Gargantext.Routes as GR
import Gargantext.Routes as GR
import Gargantext.Sessions (Session, get, put, post, delete)
import Gargantext.Sessions (Session, get, put, post, delete)
import Gargantext.Types as GT
import Gargantext.Types as GT
import Gargantext.Components.Forest.Tree.Node (NodeAction(..), glyphiconNodeAction)
type Props =
type Props =
( dispatch :: Action -> Aff Unit
( dispatch :: Action -> Aff Unit
...
@@ -21,7 +22,7 @@ type Props =
...
@@ -21,7 +22,7 @@ type Props =
, session :: Session
, session :: Session
)
)
data Action = AddNode String GT.NodeType
data Action = AddNode
String GT.NodeType
| DeleteNode
| DeleteNode
| UpdateNode GT.AsyncTaskWithType
| UpdateNode GT.AsyncTaskWithType
| RenameNode String
| RenameNode String
...
@@ -30,6 +31,7 @@ data Action = AddNode String GT.NodeType
...
@@ -30,6 +31,7 @@ data Action = AddNode String GT.NodeType
| RefreshTree
| RefreshTree
| ShareNode String
| ShareNode String
instance showShow :: Show Action where
instance showShow :: Show Action where
show DeleteNode = "DeleteNode"
show DeleteNode = "DeleteNode"
show RefreshTree = "RefreshTree"
show RefreshTree = "RefreshTree"
...
@@ -42,19 +44,27 @@ instance showShow :: Show Action where
...
@@ -42,19 +44,27 @@ instance showShow :: Show Action where
-----------------------------------------------------------------------
-----------------------------------------------------------------------
icon :: Action -> String
icon :: Action -> String
icon DeleteNode = "trash"
icon (AddNode _ _) = glyphiconNodeAction (Add [])
icon (AddNode _ _) = "plus"
icon DeleteNode = glyphiconNodeAction Delete
icon _ = "hand-o-right"
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 :: Action -> String
text DeleteNode = "Delete !"
text DeleteNode = "Delete !"
text (AddNode _ _) = "Add !"
text RefreshTree = "Refresh Tree !"
text (UpdateNode _) = "Update !"
text (AddNode _ _ )= "Add !"
text (RenameNode _) = "Rename !"
text (UpdateNode _ )= "Update !"
text (DoSearch _) = "Launch search !"
text (RenameNode _ )= "Rename !"
text (DoSearch _ )= "Launch search !"
text (ShareNode _ )= "Share !"
text (UploadFile _ _ _ _)= "Upload File !"
text (UploadFile _ _ _ _)= "Upload File !"
text RefreshTree = "Refresh Tree !"
text (ShareNode _) = "Share !"
-----------------------------------------------------------------------
-----------------------------------------------------------------------
-- TODO move code below elsewhere
-- 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, (:=), (~>))
...
@@ -4,7 +4,6 @@ import Data.Argonaut (class EncodeJson, jsonEmptyObject, (:=), (~>))
import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe(..))
import Effect.Aff (Aff)
import Effect.Aff (Aff)
import Prelude (($))
import Prelude (($))
import Reactix as R
import Gargantext.Components.Forest.Tree.Node.Action
import Gargantext.Components.Forest.Tree.Node.Action
import Gargantext.Types as GT
import Gargantext.Types as GT
import Gargantext.Types (ID)
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
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.Argonaut (class EncodeJson, jsonEmptyObject, (:=), (~>))
import Data.Maybe (Maybe(..), fromMaybe)
import Effect.Aff (Aff)
-- import Data.Newtype (class Newtype)
import Gargantext.Components.Forest.Tree.Node.Action (Action)
import Data.Tuple.Nested ((/\))
import Gargantext.Types (NodeType)
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 Gargantext.Types as GT
import Gargantext.Types as GT
import Prelude (Unit, bind, const, discard, map, pure, show, ($), (<>), (>), (<<<))
import Gargantext.Prelude (Unit)
import Reactix as R
import Reactix.DOM.HTML as H
{-
{-
updateNode :: Session -> ID -> UpdateNodeParams -> Aff (Array ID)
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
...
@@ -180,7 +180,7 @@ fldr nt open = if open
color FolderPublic = ""
color FolderPublic = ""
color FolderShared = " text-warning"
color FolderShared = " text-warning"
color _ = " text-danger"
color _ = " text-danger"
-}
-}
-- START node text
-- START node text
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
View file @
81bcc365
...
@@ -7,7 +7,7 @@ import Effect.Uncurried (mkEffectFn1)
...
@@ -7,7 +7,7 @@ import Effect.Uncurried (mkEffectFn1)
import Gargantext.Components.Forest.Tree.Node.Action
import Gargantext.Components.Forest.Tree.Node.Action
import Gargantext.Types (ID)
import Gargantext.Types (ID)
import Gargantext.Utils.Reactix as R2
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 as R
import Reactix.DOM.HTML as H
import Reactix.DOM.HTML as H
...
@@ -83,5 +83,3 @@ submitButton action dispatch =
...
@@ -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