Commit 8525b210 authored by Karen Konou's avatar Karen Konou

[Subcorpus] Loading spinner when pending creation

parent c916a1cc
Pipeline #7329 passed with stages
in 20 minutes and 8 seconds
...@@ -25,7 +25,7 @@ import Effect.Aff (launchAff_) ...@@ -25,7 +25,7 @@ import Effect.Aff (launchAff_)
import Effect.Class (liftEffect) import Effect.Class (liftEffect)
import Gargantext.Components.App.Store as Store import Gargantext.Components.App.Store as Store
import Gargantext.Components.Bootstrap as B import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (ButtonVariant(..), ComponentStatus(..), ModalSizing(..), Variant(..)) import Gargantext.Components.Bootstrap.Types (ButtonVariant(..), ComponentStatus(..), ModalSizing(..), Variant(..), SpinnerTheme(..))
import Gargantext.Components.Category (ratingSimple) import Gargantext.Components.Category (ratingSimple)
import Gargantext.Components.Category.Types (Category(..), cat2score, markCategoryChecked) import Gargantext.Components.Category.Types (Category(..), cat2score, markCategoryChecked)
import Gargantext.Components.DocsTable.DocumentFormCreation as DFC import Gargantext.Components.DocsTable.DocumentFormCreation as DFC
...@@ -226,7 +226,7 @@ docViewCpt = R2.hereComponent here "docView" hCpt ...@@ -226,7 +226,7 @@ docViewCpt = R2.hereComponent here "docView" hCpt
] ]
] ]
, H.div { className: "form-group" } , H.div { className: "form-group" }
[ if showSearch then searchBar { query, isSubcorpusModalVisibleBox } [] else H.div {} [] ] [ if showSearch then searchBar { query, isSubcorpusModalVisibleBox, onSubcorpusCreationPending' } [] else H.div {} [] ]
] ]
, R2.row , R2.row
...@@ -321,7 +321,7 @@ docViewCpt = R2.hereComponent here "docView" hCpt ...@@ -321,7 +321,7 @@ docViewCpt = R2.hereComponent here "docView" hCpt
--------------------------------------------------- ---------------------------------------------------
type SearchBarProps = type SearchBarProps =
(query :: T.Box Query, isSubcorpusModalVisibleBox :: T.Box Boolean) (query :: T.Box Query, isSubcorpusModalVisibleBox :: T.Box Boolean, onSubcorpusCreationPending' :: Boolean)
searchBar :: R2.Component SearchBarProps searchBar :: R2.Component SearchBarProps
searchBar = R.createElement searchBarCpt searchBar = R.createElement searchBarCpt
...@@ -329,7 +329,7 @@ searchBar = R.createElement searchBarCpt ...@@ -329,7 +329,7 @@ searchBar = R.createElement searchBarCpt
searchBarCpt :: R.Component SearchBarProps searchBarCpt :: R.Component SearchBarProps
searchBarCpt = here.component "searchBar" cpt searchBarCpt = here.component "searchBar" cpt
where where
cpt { query, isSubcorpusModalVisibleBox } _children = do cpt { query, isSubcorpusModalVisibleBox, onSubcorpusCreationPending' } _children = do
query' <- T.useLive T.unequal query query' <- T.useLive T.unequal query
queryText <- T.useBox query' queryText <- T.useBox query'
queryText' <- T.useLive T.unequal queryText queryText' <- T.useLive T.unequal queryText
...@@ -360,6 +360,12 @@ searchBarCpt = here.component "searchBar" cpt ...@@ -360,6 +360,12 @@ searchBarCpt = here.component "searchBar" cpt
, subCorpusButton isSubcorpusModalVisibleBox queryText' query , subCorpusButton isSubcorpusModalVisibleBox queryText' query
] ]
] ]
, H.div { className: "input-group-append" }
[ R2.when' onSubcorpusCreationPending'
[ B.spinner
{ theme: BorderTheme }
]
]
-- , H.div {className: "col-md-1"} [ searchButton query queryText' ] -- , H.div {className: "col-md-1"} [ searchButton query queryText' ]
] ]
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment