Upload list and package creation
This commit is contained in:
@@ -79,6 +79,27 @@
|
||||
setInnerText('ID_RenterCalcStorage', '~' + res);
|
||||
});
|
||||
}
|
||||
},
|
||||
setUploadProgress: (items) => {
|
||||
const table = document.getElementById('ID_UploadProgressTable');
|
||||
while (table.rows.length > items.length) {
|
||||
table.deleteRow(table.rows.length - 1);
|
||||
}
|
||||
for (const item of items) {
|
||||
const siaPath = item['SiaPath'];
|
||||
const progress = item['Progress'];
|
||||
const row = table.getElementById('ID_Progress_' + btoa(siaPath));
|
||||
if (row) {
|
||||
row.cells[1].firstChild.value = progress;
|
||||
} else {
|
||||
const row = table.insertRow(table.rows.length);
|
||||
row.id = 'ID_Progress_' + btoa(siaPath);
|
||||
let cell = row.insertCell(0);
|
||||
cell.innerText = siaPath;
|
||||
cell = row.insertCell(1);
|
||||
cell.innerHTML = '<progress value="' + progress + '" max="100"></progress>';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
Reference in New Issue
Block a user