Skip to content

Commit

Permalink
Merge pull request #144 from eroamane/patch-1
Browse files Browse the repository at this point in the history
improved progress bar color
  • Loading branch information
binux authored Jun 4, 2020
2 parents 46eef96 + 929cee7 commit 17b09af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ <h2>Settings</h2>
</div>
</div>
<div class="right-area">
<div class="progress">
<div class="progress {{progressStatus}}">
<div class="bar" style="width: {{progress}}%">{{progress}}%</div>
</div>
<div class="progress-info">
Expand Down Expand Up @@ -299,7 +299,7 @@ <h2>Settings</h2>
{{#uploadLength}}<span>(up {{#_v.format_size}}{{uploadLength}}{{/_v.format_size}})</span>{{/uploadLength}}
</div>
<div class="pull-right">
<div class="progress">
<div class="progress {{progressStatus}}">
<div class="bar" style="width: {{progress}}%">{{progress}}%</div>
</div>
</div>
Expand Down
7 changes: 7 additions & 0 deletions js/aria2.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,13 @@ if (typeof ARIA2=="undefined"||!ARIA2) var ARIA2=(function(){
result.progress = (result.completedLength * 1.0 / result.totalLength * 100).toFixed(2);
result.eta = (result.totalLength - result.completedLength)/result.downloadSpeed;

result.progressStatus = {
"active" : "progress-striped",
"complete": "progress-success",
"removed" : "progress-warning",
"error" : "progress-danger"
}[result.status];

result.downloadSpeed = parseInt(result.downloadSpeed);
result.uploadSpeed = parseInt(result.uploadSpeed);
result.uploadLength = parseInt(result.uploadLength);
Expand Down

0 comments on commit 17b09af

Please sign in to comment.