add pause/start and cancel buttons to transfer display
This commit is contained in:
parent
fb4b19deed
commit
96950a3b40
3 changed files with 33 additions and 21 deletions
|
@ -5,21 +5,33 @@
|
|||
$forall (transfer, info) <- transfers
|
||||
$with percent <- maybe "unknown" (showPercentage 0) $ percentComplete transfer info
|
||||
<div .row-fluid>
|
||||
<h3>
|
||||
$maybe file <- associatedFile info
|
||||
#{file}
|
||||
$nothing
|
||||
#{show $ 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
|
||||
<small .pull-right><b>#{percent} of #{size}</b></small>
|
||||
$else
|
||||
<small .pull-right>queued (#{size})</small>
|
||||
<div .progress .progress-striped>
|
||||
<div .bar style="width: #{percent};">
|
||||
<div .span10>
|
||||
<div .row-fluid>
|
||||
<h3>
|
||||
$maybe file <- associatedFile info
|
||||
#{file}
|
||||
$nothing
|
||||
#{show $ 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
|
||||
<small .pull-right><b>#{percent} of #{size}</b></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 isNothing (startedTime info)
|
||||
<button .btn>
|
||||
<i .icon-play title="start"></i>
|
||||
$else
|
||||
<button .btn>
|
||||
<i .icon-pause title="pause"></i>
|
||||
<button .btn>
|
||||
<i .icon-remove title="cancel"></i>
|
||||
|
|
|
@ -14,4 +14,4 @@
|
|||
Its development was made possible by #
|
||||
<a href="http://git-annex.branchable.com/design/assistant/thanks/">
|
||||
many excellent people
|
||||
. <i class="icon-heart"></i>
|
||||
. <i .icon-heart></i>
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
$case icon
|
||||
$of Nothing
|
||||
$of Just name
|
||||
<i class="icon-#{name}"></i> #
|
||||
<i .icon-#{name}></i> #
|
||||
#{h}
|
||||
$else
|
||||
$case icon
|
||||
$of Nothing
|
||||
$of Just name
|
||||
<i class="icon-#{name}"></i> #
|
||||
<i .icon-#{name}></i> #
|
||||
<strong>#{h}</strong> #
|
||||
#{message}
|
||||
|
|
Loading…
Reference in a new issue