fix button display for paused transfer

This commit is contained in:
Joey Hess 2012-08-10 18:50:21 -04:00
parent 8ba9830653
commit 37eed5d8d0
2 changed files with 6 additions and 3 deletions

View file

@ -52,6 +52,9 @@ transfersDisplay warnNoScript = do
, $(widgetFile "dashboard/transfers")
)
else $(widgetFile "dashboard/transfers")
where
isrunning info = not $
transferPaused info || isNothing (startedTime info)
{- Called by client to get a display of currently in process transfers.
-

View file

@ -27,8 +27,8 @@
<div .progress .progress-striped>
<div .bar style="width: #{percent};">
<div .btn-group .span2>
$if isNothing (startedTime info)
^{actionButton (StartTransferR transfer) Nothing "btn" "icon-play"}
$else
$if isrunning info
^{actionButton (PauseTransferR transfer) Nothing "btn" "icon-pause"}
$else
^{actionButton (StartTransferR transfer) Nothing "btn" "icon-play"}
^{actionButton (CancelTransferR transfer) Nothing "btn" "icon-remove"}