mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-24 16:56:16 -04:00
"Download all" when receiving multiple files
This commit is contained in:
parent
2c6ea6e008
commit
26352be478
3 changed files with 26 additions and 3 deletions
|
@ -261,6 +261,11 @@ class ReceiveDialog extends Dialog {
|
|||
$a.href = url;
|
||||
$a.download = file.name;
|
||||
|
||||
if(this._autoDownload()){
|
||||
$a.click()
|
||||
return
|
||||
}
|
||||
|
||||
this.$el.querySelector('#fileName').textContent = file.name;
|
||||
this.$el.querySelector('#fileSize').textContent = this._formatFileSize(file.size);
|
||||
this.show();
|
||||
|
@ -289,6 +294,11 @@ class ReceiveDialog extends Dialog {
|
|||
super.hide();
|
||||
this._dequeueFile();
|
||||
}
|
||||
|
||||
|
||||
_autoDownload(){
|
||||
return !this.$el.querySelector('#autoDownload').checked
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue