Upload list and package creation
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
<label id="ID_WalletReceiveAddress" style="text-align: center; width: inherit;display: block;">...</label>
|
||||
</div>
|
||||
<div class="box" id="renter_info">
|
||||
<h1>Renter Settings <a href="javascript:void(0)" id="ID_Renter_Edit">edit</a></h1>
|
||||
<h1>Renter Settings <a href="javascript:void(0)" id="ID_Renter_Edit">edit</a> <a href="javascript:void(0)" id="ID_Renter_Uploads">uploads</a></h1>
|
||||
<table width="inherit" style="margin: 0 auto">
|
||||
<tr>
|
||||
<td style="text-align: right">Total Funding:</td>
|
||||
@@ -173,5 +173,12 @@
|
||||
<button id="ID_RenterSettingsCancel" type="button">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden-element" id="upload_progress_window">
|
||||
<div class="box">
|
||||
<h1>Upload Progress</h1>
|
||||
<table style="width: 100%" id="ID_UploadProgressTable">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -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