]> granicus.if.org Git - transmission/commitdiff
(trunk web) #4443 "progress bar colors for queued transfers" -- fixed.
authorJordan Lee <jordan@transmissionbt.com>
Thu, 25 Aug 2011 06:18:42 +0000 (06:18 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Thu, 25 Aug 2011 06:18:42 +0000 (06:18 +0000)
web/images/progress/progress.png
web/javascript/torrent-row.js
web/stylesheets/common.css
web/stylesheets/iphone.css

index c5144a6727fdc042a988413fb6ea7f31e742da99..10773b40e65ba9a87113e22bbaabc8ff2f8c8492 100644 (file)
Binary files a/web/images/progress/progress.png and b/web/images/progress/progress.png differ
index 03fa19dde83145e6864079d9c1d3a3e31bdcaed1..c7952368313d8892d03f410574d81a0d5212cbb8 100644 (file)
@@ -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()),
index c5e41139b4a86448cdfc6ad8ead4503e85f61900..77774a77f654d4fdbd546db6e1f85000a976af1d 100644 (file)
@@ -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;
index edb6289b5515de85a2963492271d62394e491e2e..932e10ccad4b81173f33f824600adae189cf427d 100644 (file)
@@ -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;