9219f0baee
This makes the buttons in the UI a little clearer. I'd prefer to enable the barberpole animation for running transfers, but that is jerky looking due to the way the dashboard is updated.
37 lines
1.6 KiB
Text
37 lines
1.6 KiB
Text
<div .span9 ##{ident}>
|
|
$if null transfers
|
|
$else
|
|
<h2>Transfers
|
|
$forall (transfer, info) <- transfers
|
|
$with percent <- maybe "unknown" (showPercentage 0) $ percentComplete transfer info
|
|
<div .row-fluid>
|
|
<div .span10>
|
|
<div .row-fluid>
|
|
<h3>
|
|
$maybe file <- associatedFile info
|
|
#{file}
|
|
$nothing
|
|
#{key2file $ transferKey transfer}
|
|
$case transferDirection transfer
|
|
$of Upload
|
|
→
|
|
$of Download
|
|
←
|
|
<small>#{maybe "unknown" Remote.name $ transferRemote info}</small>
|
|
$with size <- maybe "unknown" (roughSize dataUnits True) $ keySize $ transferKey transfer
|
|
$if isJust $ startedTime info
|
|
$if isrunning info
|
|
<small .pull-right><b>#{percent} of #{size}</b></small>
|
|
$else
|
|
<small .pull-right>paused at #{percent} of #{size}</small>
|
|
$else
|
|
<small .pull-right>queued (#{size})</small>
|
|
<div .row-fluid>
|
|
<div .progress .progress-striped>
|
|
<div .bar style="width: #{percent};">
|
|
<div .btn-group .span2>
|
|
$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"}
|