mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-28 08:49:30 -05:00
when a download completes it is marked as complete (#36)
This commit is contained in:
parent
1cc817db3c
commit
de0e8f9eb0
@ -41,8 +41,15 @@ $(function(){
|
||||
.append($('<span>').addClass('progress'));
|
||||
update($download);
|
||||
} else if(r.type == REQUEST_PROGRESS) {
|
||||
// is the download complete?
|
||||
if(r.data.bytes == onionshare.filesize) {
|
||||
$('#download-'+r.data.id).html(onionshare.strings['download_finished']);
|
||||
}
|
||||
// still in progress
|
||||
else {
|
||||
var percent = Math.floor((r.data.bytes / onionshare.filesize) * 100);
|
||||
$('#download-'+r.data.id+' .progress').html(' '+human_readable_filesize(r.data.bytes)+', '+percent+'%');
|
||||
}
|
||||
} else {
|
||||
if(r.path != '/favicon.ico')
|
||||
update($('<span>').addClass('weblog-error').html(onionshare.strings['other_page_loaded']+': '+r.path));
|
||||
|
@ -69,6 +69,9 @@ ul#log .weblog {
|
||||
color: #009900;
|
||||
font-weight: bold;
|
||||
}
|
||||
ul#log .weblog .progress {
|
||||
color: #0000cc;
|
||||
}
|
||||
|
||||
ul#log .weblog-error {
|
||||
color: #ff0000;
|
||||
|
Loading…
Reference in New Issue
Block a user