wrong nesting ...

This commit is contained in:
glax 2023-06-10 00:01:38 +02:00
parent 2aec884009
commit 02018253bf

View File

@ -367,14 +367,15 @@ function ShowTasksQueue(){
tagTasksRunning.innerText = json.length; tagTasksRunning.innerText = json.length;
json.forEach(task => { json.forEach(task => {
downloadTasksOutput.appendChild(CreateProgressChild(task)); downloadTasksOutput.appendChild(CreateProgressChild(task));
if(task.chapter != undefined){
document.querySelector(`#progress${task.publication.internalId}-${task.chapter.sortNumber}`).value = task.progress;
document.querySelector(`#progressStr${task.publication.internalId}-${task.chapter.sortNumber}`).innerText = task.progress.toLocaleString(undefined,{style: 'percent', minimumFractionDigits:2});
}else{
document.querySelector(`#progress${task.publication.internalId}`).value = task.progress;
document.querySelector(`#progressStr${task.publication.internalId}`).innerText = task.progress.toLocaleString(undefined,{style: 'percent', minimumFractionDigits:2});
}
}); });
if(task.chapter != undefined){
document.querySelector(`#progress${task.publication.internalId}-${task.chapter.sortNumber}`).value = task.progress;
document.querySelector(`#progressStr${task.publication.internalId}-${task.chapter.sortNumber}`).innerText = task.progress.toLocaleString(undefined,{style: 'percent', minimumFractionDigits:2});
}else{
document.querySelector(`#progress${task.publication.internalId}`).value = task.progress;
document.querySelector(`#progressStr${task.publication.internalId}`).innerText = task.progress.toLocaleString(undefined,{style: 'percent', minimumFractionDigits:2});
}
}); });
GetQueue() GetQueue()