1
0

Upload list and package creation

This commit is contained in:
Scott E. Graves
2017-04-15 01:05:41 -05:00
parent f74b4c7aad
commit 37629d124a
13 changed files with 135 additions and 14 deletions

View File

@@ -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>';
}
}
}
};
})();