Commit 5be8647d authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch 'dev' into 90-dev-wos-zip-parser

parents 9e045c1d 57cb9f70
Pipeline #2538 failed with stage
in 0 seconds
{
"name": "Gargantext",
"version": "0.0.5.6.3",
"version": "0.0.5.6.6",
"scripts": {
"generate-purs-packages-nix": "./nix/generate-purs-packages.nix",
"generate-psc-packages-nix": "./nix/generate-packages-json.bash",
......
......@@ -125,17 +125,6 @@ nodeMainSpanCpt = here.component "nodeMainSpan" cpt
, session } []
, fileTypeView { dispatch, droppedFile, id, isDragOver, nodeType } []
, H.div {} (map (\t -> asyncProgressBar { asyncTask: t
, barType: Pie
, errors
, nodeId: id
, onFinish: onTaskFinish id t
, session } []
) currentTasks'
)
, if nodeType == GT.NodeUser
then GV.versionView { session } []
else H.div {} []
, if showBox then
Popover.popover { arrow: false
......@@ -146,7 +135,21 @@ nodeMainSpanCpt = here.component "nodeMainSpan" cpt
popOverIcon
, mNodePopupView props (onPopoverClose popoverRef)
]
else H.div {} []
else H.div {} []
, H.div { style: { width: "8em" } }
(map (\t -> asyncProgressBar { asyncTask: t
--, barType: Pie
, barType: Bar
, errors
, nodeId: id
, onFinish: onTaskFinish id t
, session } []
) currentTasks'
)
, if nodeType == GT.NodeUser
then GV.versionView { session } []
else H.div {} []
, nodeActions { id
, nodeType
......
......@@ -290,9 +290,9 @@ nodeLinkCpt = here.component "nodeLink" cpt
pure $
H.div { className: "node-link"
, on: { click } }
[ H.a { href, data: { for: tooltipId id, tip: true } }
[ H.a { href, data: { for: name <> "-" <> (tooltipId id), tip: true } }
[ nodeText { isSelected, name }
, ReactTooltip.reactTooltip { effect: "float", id: tooltipId id, type: "dark" }
, ReactTooltip.reactTooltip { effect: "float", id: name <> "-" <> (tooltipId id), type: "dark" }
[ R2.row
[ H.h4 {className: GT.fldr nodeType true}
[ H.text $ GT.prettyNodeType nodeType ]
......
......@@ -2,7 +2,7 @@ module Gargantext.Components.Forest.Tree.Node.Tools.ProgressBar where
import Gargantext.Prelude
import Data.Int (fromNumber)
import Data.Int (floor)
import Data.Maybe (Maybe(..))
import Effect (Effect)
import Effect.Aff (launchAff_)
......@@ -79,13 +79,12 @@ type ProgressIndicatorProps =
progressIndicator :: Record ProgressIndicatorProps -> R.Element
progressIndicator p = R.createElement progressIndicatorCpt p []
progressIndicatorCpt :: R.Component ProgressIndicatorProps
progressIndicatorCpt = here.component "progressIndicator" cpt
where
cpt { barType, label, progress } _ = do
progress' <- T.useLive T.unequal progress
let progressInt = toInt progress'
let progressInt = floor progress'
case barType of
Bar -> pure $
......@@ -93,7 +92,7 @@ progressIndicatorCpt = here.component "progressIndicator" cpt
[ H.div { className: "progress-bar"
, role: "progressbar"
, style: { width: (show $ progressInt) <> "%" }
} [ H.text label ]
} [ ]
]
Pie -> pure $
H.div { className: "progress-pie" }
......@@ -103,11 +102,6 @@ progressIndicatorCpt = here.component "progressIndicator" cpt
]
]
toInt :: Number -> Int
toInt n = case fromNumber n of
Nothing -> 0
Just x -> x
queryProgress :: Record Props -> AffRESTError GT.AsyncProgress
queryProgress { asyncTask: GT.AsyncTaskWithType { task: GT.AsyncTask {id}
, typ
......
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