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

$maybe file <- associatedFile info #{file} $nothing #{key2file $ transferKey transfer} $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)