added mozlog and file exists route
This commit is contained in:
parent
f9c2eb1ae4
commit
900fe32460
9 changed files with 127 additions and 49 deletions
|
@ -1,4 +1,5 @@
|
|||
const FileReceiver = require('./fileReceiver');
|
||||
const $ = require('jquery');
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#send-file').click(() => {
|
||||
|
@ -12,11 +13,6 @@ $(document).ready(function() {
|
|||
let progress = document.createElement('p');
|
||||
let btn = $('#download-btn');
|
||||
|
||||
// li.appendChild(name);
|
||||
// li.appendChild(progress);
|
||||
|
||||
//document.getElementById('downloaded_files').appendChild(li);
|
||||
|
||||
fileReceiver.on('progress', percentComplete => {
|
||||
progress.innerText = `Progress: ${percentComplete}%`;
|
||||
|
||||
|
@ -24,16 +20,6 @@ $(document).ready(function() {
|
|||
fileReceiver.removeAllListeners('progress');
|
||||
btn.text('Download complete!');
|
||||
btn.attr('disabled', 'true');
|
||||
// let finished = document.createElement('p');
|
||||
// finished.innerText = 'Your download has finished.';
|
||||
// li.appendChild(finished);
|
||||
|
||||
// let close = document.createElement('button');
|
||||
// close.innerText = 'Ok';
|
||||
// close.addEventListener('click', () => {
|
||||
// document.getElementById('downloaded_files').removeChild(li);
|
||||
// });
|
||||
// li.appendChild(close);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -46,7 +32,6 @@ $(document).ready(function() {
|
|||
$('#download-btn').hide();
|
||||
$('#expired-img').show();
|
||||
console.log('The file has expired, or has already been deleted.');
|
||||
// document.getElementById('downloaded_files').removeChild(li);
|
||||
return;
|
||||
})
|
||||
.then(([decrypted, fname]) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue