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
f3ddb355
Commit
f3ddb355
authored
May 25, 2023
by
Karen Konou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Tree search] styling
parent
62ea7d7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
TreeSearch.purs
src/Gargantext/Components/TreeSearch.purs
+23
-7
No files found.
src/Gargantext/Components/TreeSearch.purs
View file @
f3ddb355
...
@@ -10,7 +10,7 @@ import Data.String (Pattern(..), contains, toLower)
...
@@ -10,7 +10,7 @@ import Data.String (Pattern(..), contains, toLower)
import Effect (Effect)
import Effect (Effect)
import Gargantext.Components.Bootstrap (formSelect')
import Gargantext.Components.Bootstrap (formSelect')
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (
ModalSizing
(..))
import Gargantext.Components.Bootstrap.Types (
ButtonVariant(..), ModalSizing(..), Position(..), TooltipPosition(..), Variant
(..))
import Gargantext.Config.REST (AffRESTError, logRESTError)
import Gargantext.Config.REST (AffRESTError, logRESTError)
import Gargantext.Hooks.LinkHandler (useLinkHandler)
import Gargantext.Hooks.LinkHandler (useLinkHandler)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Hooks.Loader (useLoader)
...
@@ -70,7 +70,7 @@ treeSearchCpt = here.component "treeSearch" cpt where
...
@@ -70,7 +70,7 @@ treeSearchCpt = here.component "treeSearch" cpt where
B.baseModal
B.baseModal
{ isVisibleBox: visible
{ isVisibleBox: visible
, title: Just "Tree Search"
, title: Just "Tree Search"
, size:
ExtraLarge
ModalSize
, size:
Medium
ModalSize
, modalClassName: ""
, modalClassName: ""
}
}
[ treeSearchState {visible, sessions: sessions'} ]
[ treeSearchState {visible, sessions: sessions'} ]
...
@@ -153,11 +153,27 @@ treeSearchRenderCpt = here.component "treeSearchRenderCpt" cpt where
...
@@ -153,11 +153,27 @@ treeSearchRenderCpt = here.component "treeSearchRenderCpt" cpt where
where
where
results s = map searchResult s
results s = map searchResult s
where
where
searchResult sd = H.div {} [H.button { className: "mainleaf"
searchResult sd = H.div
, on: { click: do
{ className: "forest-layout__action"}
T.write_ false visible
[
goToRoute $ fromMaybe Home $ nodeTypeAppRoute sd.type (sessionId session) sd.id}}
B.tooltipContainer
[B.icon {name: getIcon sd.type true} , H.text sd.name]]
{ delayShow: 600
, position: TooltipPosition Right
, tooltipSlot: B.span_ $ show $ fromMaybe Home $ nodeTypeAppRoute sd.type (sessionId session) sd.id
, defaultSlot:
B.button
{ className: "forest-layout__action__button"
, callback: \_ -> do
T.write_ false visible
goToRoute $ fromMaybe Home $ nodeTypeAppRoute sd.type (sessionId session) sd.id
, variant: ButtonVariant Light }
[
B.icon {name: getIcon sd.type true}
, B.wad_ [ "d-inline-block", "w-1" ]
, H.text sd.name
]
}
]
change _ = T.write_ (filter (\val -> contains (Pattern $ toLower $ R2.getInputValue inputRef) (toLower val.name)) searchData) filteredData
change _ = T.write_ (filter (\val -> contains (Pattern $ toLower $ R2.getInputValue inputRef) (toLower val.name)) searchData) filteredData
type LoadProps = ( session :: Session )
type LoadProps = ( session :: 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