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
3072d81a
Commit
3072d81a
authored
Aug 23, 2023
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/511-tree-on-the-right' into dev
parents
4e2a1f07
e0347d4a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
16 deletions
+39
-16
Node.purs
src/Gargantext/Components/Forest/Tree/Node.purs
+39
-16
No files found.
src/Gargantext/Components/Forest/Tree/Node.purs
View file @
3072d81a
...
...
@@ -16,6 +16,7 @@ import Effect (Effect)
import Effect.Aff (Aff, launchAff)
import Effect.Class (liftEffect)
import Gargantext.AsyncTasks as GAT
import Gargantext.Components.App.Store as AppStore
import Gargantext.Components.App.Store (Boxes)
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (ComponentStatus(..), Elevation(..), TooltipEffect(..), Variant(..))
...
...
@@ -35,7 +36,7 @@ import Gargantext.Hooks.Loader (useLoaderEffect)
import Gargantext.Hooks.Version (Version, useVersion)
import Gargantext.Routes as Routes
import Gargantext.Sessions (Session, sessionId)
import Gargantext.Types (ID, Name)
import Gargantext.Types (
Handed(..),
ID, Name)
import Gargantext.Types as GT
import Gargantext.Utils (nbsp, textEllipsisBreak, (?))
import Gargantext.Utils.Reactix as R2
...
...
@@ -419,25 +420,47 @@ type FolderIconProps =
, isLeaf :: Boolean
)
handedPartClassName :: Handed -> String
handedPartClassName = case _ of
LeftHanded -> "angle-left"
RightHanded -> "angle-right"
folderIcon :: R2.Leaf FolderIconProps
folderIcon = R2.leaf folderIconCpt
folderIconCpt :: R.Component FolderIconProps
folderIconCpt = here.component "folderIcon" cpt where
cpt { isLeaf: true } _ = pure $
cpt { isLeaf: true } _ = do
-- | States
-- |
{ handed
} <- AppStore.use
handed' <- R2.useLive' handed
-- | Computed
-- |
pure $
B.icon
{ className: intercalate " "
["mainleaf__folder-icon"
, "mainleaf__folder-icon--leaf"
]
, name: "angle-right"
, name: handedPartClassName handed'
}
cpt { callback, isOpened } _ = pure $
cpt { callback, isOpened } _ = do
-- | States
-- |
{ handed
} <- AppStore.use
handed' <- R2.useLive' handed
-- | Computed
-- |
pure $
B.iconButton
{ className: "mainleaf__folder-icon"
, name: isOpened ? "angle-down" $ "angle-right"
, name: isOpened ? "angle-down" $ handedPartClassName handed'
, overlay: false
, callback
}
...
...
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