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
3e72741e
Commit
3e72741e
authored
Jun 01, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[G.C.F.T.Box] Removing Dispatch type, Just (Action -> Aff Unit) is clearer for the reader.
parent
6563ea3f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+8
-11
No files found.
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
3e72741e
...
@@ -23,16 +23,14 @@ import URI.Extra.QueryPairs as NQP
...
@@ -23,16 +23,14 @@ import URI.Extra.QueryPairs as NQP
import URI.Query as Query
import URI.Query as Query
import Web.File.FileReader.Aff (readAsText)
import Web.File.FileReader.Aff (readAsText)
import Gargantext.Prelude
import Gargantext.AsyncTasks as GAT
import Gargantext.AsyncTasks as GAT
import Gargantext.Components.Forest.Tree.Node (NodeAction(..), SettingsBox(..), glyphiconNodeAction, settingsBox)
import Gargantext.Components.Forest.Tree.Node (NodeAction(..), SettingsBox(..), glyphiconNodeAction, settingsBox)
import Gargantext.Components.Forest.Tree.Node.Action (Action(..), FileType(..), UploadFileContents(..))
import Gargantext.Components.Forest.Tree.Node.Action (Action(..), FileType(..), UploadFileContents(..))
import Gargantext.Components.Forest.Tree.Node.Action.Add (NodePopup(..), addNodeView)
import Gargantext.Components.Forest.Tree.Node.Action.Add (NodePopup(..), addNodeView)
import Gargantext.Components.Forest.Tree.Node.Action.CopyFrom (copyFromCorpusView)
import Gargantext.Components.Forest.Tree.Node.Action.Rename (renameBox)
import Gargantext.Components.Forest.Tree.Node.Action.Rename (renameBox)
import Gargantext.Components.Forest.Tree.Node.Action.Update
import Gargantext.Components.Forest.Tree.Node.Action.Update
import Gargantext.Components.Forest.Tree.Node.Action.Upload (DroppedFile(..), uploadFileView, fileTypeView, uploadTermListView)
import Gargantext.Components.Forest.Tree.Node.Action.Upload (DroppedFile(..), uploadFileView, fileTypeView, uploadTermListView)
import Gargantext.Components.Forest.Tree.Node.Action.CopyFrom (copyFromCorpusView)
import Gargantext.Components.Forest.Tree.Node.ProgressBar (asyncProgressBar, BarType(..))
import Gargantext.Components.Forest.Tree.Node.ProgressBar (asyncProgressBar, BarType(..))
import Gargantext.Components.GraphExplorer.API as GraphAPI
import Gargantext.Components.GraphExplorer.API as GraphAPI
import Gargantext.Components.Lang (allLangs, Lang(EN))
import Gargantext.Components.Lang (allLangs, Lang(EN))
...
@@ -43,6 +41,7 @@ import Gargantext.Components.Search.SearchField (Search, defaultSearch, isIsTex_
...
@@ -43,6 +41,7 @@ import Gargantext.Components.Search.SearchField (Search, defaultSearch, isIsTex_
import Gargantext.Components.Search.Types (DataField(..))
import Gargantext.Components.Search.Types (DataField(..))
import Gargantext.Ends (Frontends, url)
import Gargantext.Ends (Frontends, url)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Prelude
import Gargantext.Routes as Routes
import Gargantext.Routes as Routes
import Gargantext.Sessions (Session, sessionId, post)
import Gargantext.Sessions (Session, sessionId, post)
import Gargantext.Types (NodeType(..), ID, Name, Reload)
import Gargantext.Types (NodeType(..), ID, Name, Reload)
...
@@ -51,11 +50,9 @@ import Gargantext.Utils (glyphicon, glyphiconActive)
...
@@ -51,11 +50,9 @@ import Gargantext.Utils (glyphicon, glyphiconActive)
import Gargantext.Utils.Popover as Popover
import Gargantext.Utils.Popover as Popover
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
type Dispatch = Action -> Aff Unit
type Tasks =
type Tasks =
(
( onTaskAdd :: GT.AsyncTaskWithType -> Effect Unit
onTaskAdd :: GT.AsyncTaskWithType -> Effect Unit
, onTaskFinish :: GT.AsyncTaskWithType -> Effect Unit
, onTaskFinish :: GT.AsyncTaskWithType -> Effect Unit
, tasks :: Array GT.AsyncTaskWithType
, tasks :: Array GT.AsyncTaskWithType
)
)
...
@@ -72,7 +69,7 @@ tasksStruct id (asyncTasks /\ setAsyncTasks) (_ /\ setReload) = { onTaskAdd, onT
...
@@ -72,7 +69,7 @@ tasksStruct id (asyncTasks /\ setAsyncTasks) (_ /\ setReload) = { onTaskAdd, onT
setAsyncTasks $ Map.alter (maybe Nothing $ (\ts -> Just $ GAT.removeTaskFromList ts t)) id
setAsyncTasks $ Map.alter (maybe Nothing $ (\ts -> Just $ GAT.removeTaskFromList ts t)) id
type CommonProps =
type CommonProps =
( dispatch ::
Dispatch
( dispatch ::
Action -> Aff Unit
, session :: Session
, session :: Session
)
)
...
@@ -545,7 +542,7 @@ type NodeProps =
...
@@ -545,7 +542,7 @@ type NodeProps =
type PanelActionProps =
type PanelActionProps =
( id :: ID
( id :: ID
, action :: NodeAction
, action :: NodeAction
, dispatch ::
Dispatch
, dispatch ::
Action -> Aff Unit
, name :: Name
, name :: Name
, nodePopup :: Maybe NodePopup
, nodePopup :: Maybe NodePopup
, nodeType :: GT.NodeType
, nodeType :: GT.NodeType
...
@@ -632,7 +629,7 @@ actionDelete _ dispatch = do
...
@@ -632,7 +629,7 @@ actionDelete _ dispatch = do
, reallyDelete dispatch
, reallyDelete dispatch
]
]
where
where
reallyDelete ::
Dispatch
-> R.Element
reallyDelete ::
(Action -> Aff Unit)
-> R.Element
reallyDelete d = H.div {className: "panel-footer"}
reallyDelete d = H.div {className: "panel-footer"}
[ H.a { type: "button"
[ H.a { type: "button"
, className: "btn glyphicon glyphicon-trash"
, className: "btn glyphicon glyphicon-trash"
...
@@ -646,7 +643,7 @@ actionDelete _ dispatch = do
...
@@ -646,7 +643,7 @@ actionDelete _ dispatch = do
-- | Action : Upload
-- | Action : Upload
actionUpload :: NodeType -> ID -> Session ->
Dispatch
-> R.Hooks R.Element
actionUpload :: NodeType -> ID -> Session ->
(Action -> Aff Unit)
-> R.Hooks R.Element
actionUpload NodeList id session dispatch =
actionUpload NodeList id session dispatch =
pure $ uploadTermListView {dispatch, id, nodeType: GT.NodeList, session}
pure $ uploadTermListView {dispatch, id, nodeType: GT.NodeList, session}
...
...
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