Fixing download queue

This commit is contained in:
RemixDev 2020-04-14 11:40:03 +02:00
parent 5521ca864c
commit 5e7e53c30a
2 changed files with 28 additions and 20 deletions

View File

@ -260,10 +260,12 @@ div#download_tab{
} }
#download_list > .download_object .download_info_data{ #download_list > .download_object .download_info_data{
width: 100%; width: 100%;
padding-left: 8px; margin-left: 8px;
} }
#download_list > .download_object .download_info_status{ #download_list > .download_object .download_info_status{
margin-left: 8px;
width: 80px; width: 80px;
text-align: right;
} }
#download_list.slim > .download_object .download_info img{ #download_list.slim > .download_object .download_info img{
display: none; display: none;
@ -275,12 +277,12 @@ div#download_tab{
display: inline-block; display: inline-block;
} }
#download_list.slim > .download_object .download_info_data{ #download_list.slim > .download_object .download_info_data{
width: auto; width: calc(80% - 8px);
display: inline-block; display: inline-block;
padding-left: 0px; padding-left: 0px;
} }
#download_list.slim > .download_object .download_info_status{ #download_list.slim > .download_object .download_info_status{
width: auto; width: 20%;
display: inline-block; display: inline-block;
float: right; float: right;
} }
@ -288,6 +290,10 @@ div#download_tab{
display: block; display: block;
} }
.download_object > .download_bar > .queue_icon{
margin-left: 8px;
}
.download_object > .download_bar{ .download_object > .download_bar{
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -58,6 +58,7 @@ socket.on("startDownload", function(uuid){
}) })
socket.on("finishDownload", function(uuid){ socket.on("finishDownload", function(uuid){
if (queue.indexOf(uuid) > -1){
toast(`${queueList[uuid].title} finished downloading.`, 'done') toast(`${queueList[uuid].title} finished downloading.`, 'done')
$('#bar_' + uuid).css('width', '100%') $('#bar_' + uuid).css('width', '100%')
let result_icon = $('#download_'+uuid).find('.queue_icon') let result_icon = $('#download_'+uuid).find('.queue_icon')
@ -76,6 +77,7 @@ socket.on("finishDownload", function(uuid){
if (queue.length <= 0){ if (queue.length <= 0){
toast('All downloads completed!', 'all_done') toast('All downloads completed!', 'all_done')
} }
}
}) })
socket.on("removedAllDownloads", function(){ socket.on("removedAllDownloads", function(){