From 124be19e433206b852bf6fd4ea7d716c5f9fdd09 Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Tue, 5 Dec 2023 23:58:47 +0000 Subject: [PATCH] Format upload speed --- crates/librqbit/webui/src/rqbit-web.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/librqbit/webui/src/rqbit-web.tsx b/crates/librqbit/webui/src/rqbit-web.tsx index 74950b5..8dd4644 100644 --- a/crates/librqbit/webui/src/rqbit-web.tsx +++ b/crates/librqbit/webui/src/rqbit-web.tsx @@ -197,9 +197,12 @@ const Speed: React.FC<{ statsResponse: TorrentStats }> = ({ statsResponse }) => } return <> - {!statsResponse.finished &&

↓ {statsResponse.live.download_speed.human_readable}

} -

↑ {statsResponse.live.upload_speed.human_readable}

- {statsResponse.live.snapshot.uploaded_bytes > 0 &&

Uploaded {formatBytes(statsResponse.live.snapshot.uploaded_bytes)}

} + {!statsResponse.finished && +
↓ {statsResponse.live.download_speed.human_readable}
} +
+ ↑ {statsResponse.live.upload_speed.human_readable} + {statsResponse.live.snapshot.uploaded_bytes > 0 && + (total {formatBytes(statsResponse.live.snapshot.uploaded_bytes)}})
}