Transfers $if transfersrunning $forall (transfer, info) <- transfers $with percent <- maybe "unknown" (showPercentage 0) $ percentComplete transfer info

#{desc transfer info} $case transferDirection transfer $of Upload → $of Download ← #{maybe "unknown" Remote.name $ transferRemote info} $with size <- maybe "unknown" (roughSize dataUnits True) $ keySize $ transferKey transfer $if isJust $ startedTime info $if isrunning info #{percent} of #{size} $else paused at #{percent} of #{size} $else queued (#{size})
$if isrunning info ^{actionButton (PauseTransferR transfer) Nothing (Just "pause") "btn btn-default btn-sm" "glyphicon-pause"} $else ^{actionButton (StartTransferR transfer) Nothing (Just "continue") "btn btn-default btn-sm" "glyphicon-play"} ^{actionButton (CancelTransferR transfer) Nothing (Just "cancel") "btn btn-default btn-sm" "glyphicon-remove"} $if scanrunning # Scanning for files to transfer $else $if (not transfersrunning) (No file transfers running)