mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 05:08:05 -06:00
WebUI: Display torrent progress percentage in General tab
This PR adds torrent progress percentage next to pieces bar in General tab, as in the GUI. PR #21756.
This commit is contained in:
@@ -43,6 +43,7 @@ window.qBittorrent.PropGeneral ??= (() => {
|
||||
$("progress").appendChild(piecesBar);
|
||||
|
||||
const clearData = () => {
|
||||
document.getElementById("progressPercentage").textContent = "";
|
||||
$("time_elapsed").textContent = "";
|
||||
$("eta").textContent = "";
|
||||
$("nb_connections").textContent = "";
|
||||
@@ -101,6 +102,8 @@ window.qBittorrent.PropGeneral ??= (() => {
|
||||
if (data) {
|
||||
// Update Torrent data
|
||||
|
||||
document.getElementById("progressPercentage").textContent = window.qBittorrent.Misc.friendlyPercentage(data.progress);
|
||||
|
||||
const timeElapsed = (data.seeding_time > 0)
|
||||
? "QBT_TR(%1 (seeded for %2))QBT_TR[CONTEXT=PropertiesWidget]"
|
||||
.replace("%1", window.qBittorrent.Misc.friendlyDuration(data.time_elapsed))
|
||||
|
||||
Reference in New Issue
Block a user