Browser-laptop: Support tray progress bars for downloaded items

Created on 7 Aug 2016  路  5Comments  路  Source: brave/browser-laptop

Test plan

https://github.com/brave/browser-laptop/pull/9864#issue-240606194

  1. Go to https://brave.com/downloads.html
  2. Download one of the builds
  3. Notice the taskbar icon has a progress bar. If macOS, a badge is shown with # of concurrent downloads

Original issue description

BrowserWindow has a way to set progress which shows up in the tray. This is useful for downloading items. We should show the overall progress of all downloads in the try w/ BrowserWindow's setProgressBar

OWindows OmacOS Qchecked-Win64 Qtest-plan-specified featurdownload release-noteinclude shell-integration

Most helpful comment

Hey @bbondy and @bsclifton, I just submitted a PR #9864 for this

All 5 comments

We should also set the electron.app.dock's dock.setBadge with the number of downloads that are active when > 0

Here's a great page for reference, for anyone wanting to tackle this :smile:
http://electron.atom.io/docs/tutorial/desktop-environment-integration/

Hi,

I'd like to attempt a PR for this.

I tried setting the setProgressBar to a hard coded value and I was able to set the progress bar of the icon in the taskbar. The place where I'm guessing we need to add this code is in electronDownloadItem.js inside the updateElectronDownloadItem().

But I'm unable to find the download percent at this location. I would appreciate some help with this.

Please let me know if I'm approaching this the wrong way.

Hey @bbondy and @bsclifton, I just submitted a PR #9864 for this

Was this page helpful?
0 / 5 - 0 ratings