From: Jordan Lee Date: Thu, 25 Aug 2011 06:18:42 +0000 (+0000) Subject: (trunk web) #4443 "progress bar colors for queued transfers" -- fixed. X-Git-Tag: 2.40b1~169 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2b255a33d11432d9726e1b535b7e261b4980c6f;p=transmission (trunk web) #4443 "progress bar colors for queued transfers" -- fixed. --- diff --git a/web/images/progress/progress.png b/web/images/progress/progress.png index c5144a672..10773b40e 100644 Binary files a/web/images/progress/progress.png and b/web/images/progress/progress.png differ diff --git a/web/javascript/torrent-row.js b/web/javascript/torrent-row.js index 03fa19dde..c79523683 100644 --- a/web/javascript/torrent-row.js +++ b/web/javascript/torrent-row.js @@ -27,15 +27,20 @@ TorrentRendererHelper.getProgressInfo = function(controller, t) else pct = 100; - var extra; - if (t.isStopped()) + var extra = ''; + var s = t.getStatus(); + if (s == Torrent._StatusStopped) extra = 'paused'; - else if (t.isSeeding()) - extra = 'seeding'; + else if (s == Torrent._StatusDownloadWait) + extra = 'leeching queued'; else if (t.needsMetaData()) extra = 'magnet'; - else + else if (s === Torrent._StatusDownload) extra = 'leeching'; + else if (s == Torrent._StatusSeedWait) + extra = 'seeding queued'; + else if (s == Torrent._StatusSeed) + extra = 'seeding'; return { percent: pct, @@ -271,9 +276,20 @@ TorrentRendererCompact.prototype = var c; if ((c = t.getErrorMessage())) return c; - if (t.isDownloading()) - return [ TorrentRendererHelper.formatDL(t), - TorrentRendererHelper.formatUL(t) ].join(' '); + if (t.isDownloading()) { + var have_dn = t.getDownloadSpeed() > 0; + var have_up = t.getUploadSpeed() > 0; + if (!have_up && !have_dn) + return 'Idle'; + var s = ''; + if (have_dn) + s += TorrentRendererHelper.formatDL(t); + if (have_dn && have_up) + s += ' ' + if (have_up) + s += TorrentRendererHelper.formatUL(t); + return s; + } if (t.isSeeding()) return [ 'Ratio: ', Transmission.fmt.ratioString(t.getUploadRatio()), diff --git a/web/stylesheets/common.css b/web/stylesheets/common.css index c5e41139b..77774a77f 100644 --- a/web/stylesheets/common.css +++ b/web/stylesheets/common.css @@ -380,7 +380,7 @@ ul.torrent_list li.torrent.selected div.torrent_peer_details.error { * is pinned to the left side of the parent and has a higher z-index. * * The progressbar has different colors depending on its state, so there - * are four 'decorator' classNames: magnet, seeding, leeching, and paused. + * are five 'decorator' classNames: paused, queued, magnet, leeching, seeding. */ ul.torrent_list div.torrent_progress_bar_container { @@ -441,14 +441,26 @@ ul.torrent_list div.torrent_progress_bar.complete.leeching { background-position: left 0px; border-color: #3D9DEA; } +ul.torrent_list div.torrent_progress_bar.complete.leeching.queued { + background-position: left -70px; + border-color: #889CA5; +} ul.torrent_list div.torrent_progress_bar.incomplete.leeching { background-position: left -20px; border-color: #CFCFCF; } +ul.torrent_list div.torrent_progress_bar.incomplete.leeching.queued { + background-position: left -80px; + border-color: #C4C4C4; +} ul.torrent_list div.torrent_progress_bar.complete.seeding { background-position: left -40px; border-color: #269E30; } +ul.torrent_list div.torrent_progress_bar.complete.seeding.queued { + background-position: left -60px; + border-color: #8A998D; +} ul.torrent_list div.torrent_progress_bar.incomplete.seeding { background-position: left -10px; border-color: #29AD35; diff --git a/web/stylesheets/iphone.css b/web/stylesheets/iphone.css index edb6289b5..932e10cca 100644 --- a/web/stylesheets/iphone.css +++ b/web/stylesheets/iphone.css @@ -341,7 +341,7 @@ div.torrent_peer_details { * is pinned to the left side of the parent and has a higher z-index. * * The progressbar has different colors depending on its state, so there - * are four 'decorator' classNames: magnet, seeding, leeching, and paused. + * are five 'decorator' classNames: paused, queued, magnet, leeching, seeding. */ ul.torrent_list div.torrent_progress_bar_container { @@ -402,14 +402,26 @@ ul.torrent_list div.torrent_progress_bar.complete.leeching { background-position: left 0px; border-color: #3D9DEA; } +ul.torrent_list div.torrent_progress_bar.complete.leeching.queued { + background-position: left -70px; + border-color: #889CA5; +} ul.torrent_list div.torrent_progress_bar.incomplete.leeching { background-position: left -20px; border-color: #CFCFCF; } +ul.torrent_list div.torrent_progress_bar.incomplete.leeching.queued { + background-position: left -80px; + border-color: #C4C4C4; +} ul.torrent_list div.torrent_progress_bar.complete.seeding { background-position: left -40px; border-color: #269E30; } +ul.torrent_list div.torrent_progress_bar.complete.seeding.queued { + background-position: left -60px; + border-color: #8A998D; +} ul.torrent_list div.torrent_progress_bar.incomplete.seeding { background-position: left -10px; border-color: #29AD35;