mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-21 22:54:53 +08:00
"Download all" when receiving multiple files
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user