diff --git a/web/images/progress/progress.png b/web/images/progress/progress.png index 77c724ebb..393a0c3a1 100644 Binary files a/web/images/progress/progress.png and b/web/images/progress/progress.png differ diff --git a/web/javascript/torrent.js b/web/javascript/torrent.js index 51e215cde..dbca73553 100644 --- a/web/javascript/torrent.js +++ b/web/javascript/torrent.js @@ -451,12 +451,6 @@ Torrent.prototype = } else { - // Update the 'in progress' bar - e = root._progress_complete_container; - c = 'torrent_progress_bar'; - c += (this.isActive()) ? ' complete' : ' complete_stopped'; - e.className = c; - // Create the 'progress details' label // Eg: '698.05 MB, uploaded 8.59 GB (Ratio: 12.3)' c = Math.formatBytes( this._size ); @@ -466,12 +460,34 @@ Torrent.prototype = c += Math.round(this._upload_ratio*100)/100; c += ')'; progress_details = c; - - // Hide the 'incomplete' bar - root._progress_incomplete_container.style.display = 'none'; - - // Set progress to maximum - root._progress_complete_container.style.width = MaxBarWidth + '%'; + + var status = this.isActive() ? 'complete' : 'complete_stopped'; + + if(this.isActive() && this.seedRatio() > 0){ + status = 'complete seeding' + var seedRatioRatio = this._upload_ratio / this.seedRatio(); + var seedRatioPercent = Math.round( seedRatioRatio * 100 * MaxBarWidth ) / 100; + + root._progress_incomplete_container.className = 'torrent_progress_bar incomplete seeding' + root._progress_incomplete_container.style.display = 'block'; + root._progress_incomplete_container.style.width = seedRatioPercent + '%'; + + // Set progress to maximum + root._progress_complete_container.style.width = MaxBarWidth - seedRatioPercent + '%'; + } + else + { + // Hide the 'incomplete' bar + root._progress_incomplete_container.className = 'torrent_progress_bar incomplete' + root._progress_incomplete_container.style.display = 'none'; + + // Set progress to maximum + root._progress_complete_container.style.width = MaxBarWidth + '%'; + } + + // Update the 'in progress' bar + e = root._progress_complete_container; + e.className = 'torrent_progress_bar ' + status; } // Update the progress details diff --git a/web/stylesheets/common.css b/web/stylesheets/common.css index 225780034..862c13e0a 100644 --- a/web/stylesheets/common.css +++ b/web/stylesheets/common.css @@ -427,6 +427,11 @@ ul.torrent_list li.torrent div.torrent_progress_bar.complete { background-position: left -10px; border: 1px solid #29AD35; } +ul.torrent_list li.torrent div.torrent_progress_bar.complete.seeding { + background-position: left -40px; + border: 1px solid #269e30; + border-right: none; +} ul.torrent_list li.torrent div.torrent_progress_bar.in_progress { background-position: left 0px; @@ -441,6 +446,11 @@ ul.torrent_list li.torrent div.torrent_progress_bar.incomplete { border-left: none; } +ul.torrent_list li.torrent div.torrent_progress_bar.incomplete.seeding { + background-position: left -10px; + border: 1px solid #29AD35; +} + ul.torrent_list li.torrent div.torrent_progress_bar.incomplete_stopped { background-position: left -30px; border: 1px solid #939393;