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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
purescript-gargantext
Commits
4ed9119b
Commit
4ed9119b
authored
Mar 04, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Get List.
parent
eaaa8328
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
13 deletions
+15
-13
Upload.purs
...Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
+7
-7
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+6
-4
Types.purs
src/Gargantext/Types.purs
+2
-2
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
View file @
4ed9119b
...
...
@@ -142,11 +142,11 @@ uploadButtonCpt = R.hooksComponent "G.C.F.T.N.A.U.uploadButton" cpt
-- START File Type View
type FileTypeProps =
( action :: Action -> Aff Unit
( action
:: Action -> Aff Unit
, droppedFile :: R.State (Maybe DroppedFile)
, id :: ID
, isDragOver :: R.State Boolean
, nodeType :: GT.NodeType
, id
:: ID
, isDragOver
:: R.State Boolean
, nodeType
:: GT.NodeType
)
fileTypeView :: Record FileTypeProps -> R.Element
...
...
@@ -246,9 +246,9 @@ uploadFile session nodeType id fileType {mName, contents: UploadFileContents con
--p = NodeAPI GT.Corpus (Just id) $ "add/file/async/nobody" <> Q.print (toQuery q)
p = GR.NodeAPI nodeType (Just id) $ GT.asyncTaskTypePath GT.Form
bodyParams = [
Tuple "_wf_data" (Just contents)
Tuple "_wf_data"
(Just contents)
, Tuple "_wf_filetype" (Just $ show fileType)
, Tuple "_wf_name" mName
, Tuple "_wf_name"
mName
]
uploadTermListView :: Record Props -> R.Element
...
...
@@ -273,7 +273,7 @@ uploadTermListViewCpt = R.hooksComponent "G.C.F.T.N.A.U.UploadTermListView" cpt
onChangeContents :: forall e. R.State (Maybe UploadFile) -> E.SyntheticEvent_ e -> Effect Unit
onChangeContents (mFile /\ setMFile) e = do
let mF = R2.inputFileNameWithBlob 0 e
E.preventDefault e
E.preventDefault
e
E.stopPropagation e
case mF of
Nothing -> pure unit
...
...
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
4ed9119b
...
...
@@ -418,11 +418,13 @@ panelActionCpt = R.hooksComponent "G.C.F.T.N.B.panelAction" cpt
cpt {action: Upload, dispatch, id, nodeType, session} _ = do
pure $ uploadFileView {dispatch, id, nodeType, session}
cpt {action: Download, id, nodeType: NodeList, session} _ = do
let href = url session $ Routes.NodeAPI GT.Node (Just id) ""
let href = url session $ Routes.NodeAPI GT.Node
List
(Just id) ""
pure $ R.fragment [
H.span { className: "row" } [
H.a { className: "col-md-12", href, target: "_blank" } [ H.text "Download file" ]
]
H.span { className: "row" }
[ H.a { className: "col-md-12"
, href
, target: "_blank" } [ H.text "Download file" ]
]
]
cpt {action: Download} _ = do
pure $ fragmentPT "Soon, you will be able to dowload your file here"
...
...
src/Gargantext/Types.purs
View file @
4ed9119b
...
...
@@ -153,7 +153,7 @@ instance showNodeType :: Show NodeType where
show Folder = "NodeFolder"
show FolderPrivate = "NodeFolderPrivate" -- Node Private Worktop
show FolderShared
= "NodeFolderShared"
-- Node Share Worktop
show FolderShared
= "NodeFolderShared"
-- Node Share Worktop
show FolderPublic = "NodeFolderPublic" -- Node Public Worktop
show Annuaire = "NodeAnnuaire"
...
...
@@ -453,7 +453,7 @@ data AsyncTaskType = Form | Query
derive instance genericAsyncTaskType :: Generic AsyncTaskType _
asyncTaskTypePath :: AsyncTaskType -> String
asyncTaskTypePath Form = "add/form/async/"
asyncTaskTypePath Form
= "add/form/async/"
asyncTaskTypePath Query = "add/query/async/"
type AsyncTaskID = String
...
...
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