From f2b255a33d11432d9726e1b535b7e261b4980c6f Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Thu, 25 Aug 2011 06:18:42 +0000 Subject: [PATCH] (trunk web) #4443 "progress bar colors for queued transfers" -- fixed. --- web/images/progress/progress.png | Bin 478 -> 938 bytes web/javascript/torrent-row.js | 32 +++++++++++++++++++++++-------- web/stylesheets/common.css | 14 +++++++++++++- web/stylesheets/iphone.css | 14 +++++++++++++- 4 files changed, 50 insertions(+), 10 deletions(-) diff --git a/web/images/progress/progress.png b/web/images/progress/progress.png index c5144a6727fdc042a988413fb6ea7f31e742da99..10773b40e65ba9a87113e22bbaabc8ff2f8c8492 100644 GIT binary patch delta 929 zcmV;S177^z1F8p*7k^p^1^@s6xZ8FS00001b5ch_0Itp)=>Px#24YJ`L;(K){{a7> zy{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ipi41r`9aA7Z2c00SyXL_t(o z!_`UeCz%?&H0}@yAeCe_)jdZ-;_yr+jz(>g$lk$=Bg9&AtxDtLM%svvbPx+YjD2 z^k&LgHy$Cp9o~KW;|!Z=@Mem)!#!_1Lb|=Z^*vM6d%&L0=Z!mbPx<=#+SehoGY;q3 z`ApgG_ZyG!aDO(97kV=yWMWvDbwr2d*|$k7_ z?|0spcG~)NZs$zBft@4#^!e37nNUhq1yQbRL{*k!RevzgP(>lMhFQL@&ktt-0YF^W zuqz0lU}WSfSk-5ZX=spw03xVrc%@QazgPM!DnS@i)PHP1VYh-zx~k8|U%#QqAvg6> zl=Aw$(&up;K~!Ya?QqJldaw1F2ZKX0Y1J(*TP$*$Qm#Zt=B zt*N7SHh(krtR^juMIu1d&{d-IFj=Gox3%Zfj}tU*YXpSAPuR7L6f)Ds+Vc=#LzEpf z&4w{D?{+=fr@KwYQaLc88j4R@&+r=6pyl~$u9^@GV7h2fVmqra1PJ!a{ZKm{{ggKh;9<3l9?Gp|K04W*{Xa)!*0)NlcSq&vg15;u_MRUibXpTUunB&)j zZKSAzRVAQ3Cl}vE3=Y-8Lqe^WXKT+Q3L;?HP>XXS1}I{18d|!nWxZ(6r=Q1iv}+4; zn^sz{21T^zapZQog>BQC4Y!t6-DYNn+R1T4^^3mTnG9=Mi1bd$Cc<9Yml~ey^rP%ATJfBdc3#%k00000NkvXXu0mjf DSUAGs delta 465 zcmV;?0WSWk2i^ma7k@km0{{R3QK)KU0002VP)t-sJHSupgM#XXgyVpK>4b#ifq>U~ zdDC}x<$;3Md3oi5f#-sP({^^|f`a9Og64vO+IxCK-COVP??9yVK%(*J=;%9^;L*|1 zLaF=P+uP;kqX*SL8kVwu&_d?`Z|-_N9SKXo95(!fJEL~M&({V z&Q(6iQ_^;Iz4EVvWg2<8L_f_uTD;88Fy{Gg?L- zuR1nu+Um2ds;Z4mo1bVp{ZHETk9_34*t7|uzhe?cv1$JSoVTA~So@Op00000NkvXX Hu0mjf0MPWI 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;