Skip to content

Commit ec49608

Browse files
Add showProgressBar option (#155)
Co-authored-by: Sindre Sorhus <[email protected]>
1 parent 0641a2c commit ec49608

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

index.d.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,19 @@ declare namespace electronDl {
9797
readonly openFolderWhenDone?: boolean;
9898

9999
/**
100-
Shows the file count badge on macOS/Linux dock icons when download is in progress.
100+
Show a file count badge on the macOS/Linux dock/taskbar icon when a download is in progress.
101101
102102
@default true
103103
*/
104104
readonly showBadge?: boolean;
105105

106+
/**
107+
Show a progress bar on the dock/taskbar icon when a download is in progress.
108+
109+
@default true
110+
*/
111+
readonly showProgressBar?: boolean;
112+
106113
/**
107114
Allow downloaded files to overwrite files with the same name in the directory they are saved to.
108115

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ function registerListener(session, options, callback = () => {}) {
5858

5959
options = {
6060
showBadge: true,
61+
showProgressBar: true,
6162
...options
6263
};
6364

@@ -105,7 +106,7 @@ function registerListener(session, options, callback = () => {}) {
105106
app.badgeCount = activeDownloadItems();
106107
}
107108

108-
if (!window_.isDestroyed()) {
109+
if (!window_.isDestroyed() && options.showProgressBar) {
109110
window_.setProgressBar(progressDownloadItems());
110111
}
111112

readme.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,14 @@ Reveal the downloaded file in the system file manager, and if possible, select t
195195
Type: `boolean`\
196196
Default: `true`
197197

198-
Shows the file count badge on macOS/Linux dock icons when download is in progress.
198+
Show a file count badge on the macOS/Linux dock/taskbar icon when a download is in progress.
199+
200+
#### showProgressBar
201+
202+
Type: `boolean`\
203+
Default: `true`
204+
205+
Show a progress bar on the dock/taskbar icon when a download is in progress.
199206

200207
#### overwrite
201208

0 commit comments

Comments
 (0)