Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
small usability improvements to the navbar downloads btn
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrazee committed Sep 12, 2016
1 parent 688b50a commit e8d5eb0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/shell-window/ui/navbar/downloads.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ export class DownloadsNavbarBtn {
render() {
// show active, then inactive, with a limit of 5 items
var activeDownloads = (
this.downloads.filter(d => d.state == 'progressing')
.concat(this.downloads.filter(d => d.state != 'progressing'))
this.downloads.filter(d => d.state == 'progressing').reverse()
.concat(this.downloads.filter(d => d.state != 'progressing').reverse())
).slice(0,5)

// render the progress bar if downloading anything
var progressEl = ''
if (this.sumProgress && activeDownloads.length) {
if (this.sumProgress && this.sumProgress.receivedBytes < this.sumProgress.totalBytes) {
progressEl = yo`<progress value=${this.sumProgress.receivedBytes} max=${this.sumProgress.totalBytes}></progress>`
}

Expand Down

0 comments on commit e8d5eb0

Please sign in to comment.