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
d541f304
Commit
d541f304
authored
Dec 15, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEAT] Text Flow with NoList built as option
parent
198b1db4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
Upload.purs
...Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
+1
-1
ListSelection.purs
src/Gargantext/Components/ListSelection.purs
+6
-4
Types.purs
src/Gargantext/Components/ListSelection/Types.purs
+4
-1
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
View file @
d541f304
...
...
@@ -265,7 +265,7 @@ uploadButtonCpt = here.component "uploadButton" cpt
_ -> do
contents <- case fileFormat' of
Plain -> readUFBAsText blob
ZIP -> readUFBAsBase64 blob
ZIP
-> readUFBAsBase64 blob
dispatch $ UploadFile nodeType fileType' fileFormat' lang' (Just name) contents selection'
liftEffect $ do
T.write_ Nothing mFile
...
...
src/Gargantext/Components/ListSelection.purs
View file @
d541f304
...
...
@@ -40,11 +40,11 @@ selectionCpt = here.component "selection" cpt where
, list: [ MyListsFirst
, OtherListsFirst
, SelectedLists []
, NoList
]
}
[]
,
selectedIds { selection, session } []
, selectedIds { selection, session } []
]
selectedIds :: R2.Component Props
...
...
@@ -88,7 +88,8 @@ type ListTreeProps =
, nodeType :: NodeType
, root :: ID
, selection :: T.Box Selection
, session :: Session )
, session :: Session
)
listTree :: R2.Leaf ListTreeProps
listTree props = R.createElement listTreeCpt props []
...
...
@@ -110,7 +111,8 @@ type ListTreeChildrenProps =
( render :: Render
, root :: ID
, selection :: T.Box Selection
, session :: Session )
, session :: Session
)
listTreeChildren :: R2.Component ListTreeChildrenProps
listTreeChildren = R.createElement listTreeChildrenCpt
...
...
src/Gargantext/Components/ListSelection/Types.purs
View file @
d541f304
...
...
@@ -9,20 +9,23 @@ import Data.Newtype (class Newtype)
import Gargantext.Types (ID, ListId, NodeType)
import Simple.JSON as JSON
data Selection = MyListsFirst | OtherListsFirst | SelectedLists (Array ListId)
data Selection = MyListsFirst | OtherListsFirst | SelectedLists (Array ListId)
| NoList
derive instance Generic Selection _
instance Show Selection where
show MyListsFirst = "My lists first"
show OtherListsFirst = "Other lists first"
show NoList = "NoList"
show (SelectedLists _) = "Selected lists"
instance Eq Selection where eq = genericEq
instance Read Selection where
read "My lists first" = Just MyListsFirst
read "Other lists first" = Just OtherListsFirst
read "Selected lists" = Just $ SelectedLists []
read "NoList" = Just NoList
read _ = Nothing
instance JSON.WriteForeign Selection where
writeImpl MyListsFirst = JSON.writeImpl { "type": "MyListsFirst" }
writeImpl NoList = JSON.writeImpl { "type": "NoList" }
writeImpl OtherListsFirst = JSON.writeImpl { "type": "OtherListsFirst" }
writeImpl (SelectedLists ids) = JSON.writeImpl { "type": "SelectedLists", value: ids }
...
...
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