"Download all" when receiving multiple files

This commit is contained in:
RobinLinus 2020-12-20 21:30:28 +01:00
parent 2c6ea6e008
commit 26352be478
3 changed files with 26 additions and 3 deletions

View file

@ -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
}
}