From d806fd502f3e211f08c7dadf026bc870eb6e08fc Mon Sep 17 00:00:00 2001 From: PurgingPanda Date: Fri, 2 Sep 2016 01:43:28 +0400 Subject: [PATCH] Added progress bar to the metadata on the overview (#844) * Added progress bar to Torrent metadata on the overview. * Added progress bar to Torrent metadata on the overview. * Made progress bar smaller As proposed by dcposh. --- src/renderer/pages/TorrentListPage.js | 6 ++++++ static/main.css | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/renderer/pages/TorrentListPage.js b/src/renderer/pages/TorrentListPage.js index 868cbc30..093504ed 100644 --- a/src/renderer/pages/TorrentListPage.js +++ b/src/renderer/pages/TorrentListPage.js @@ -93,6 +93,7 @@ module.exports = class TorrentList extends React.Component { } else if (torrentSummary.status !== 'paused' && prog) { elements.push(
+ {renderProgressBar()} {renderPercentProgress()} {renderTotalProgress()} {renderPeers()} @@ -105,6 +106,11 @@ module.exports = class TorrentList extends React.Component { return (
{elements}
) + function renderProgressBar () { + var progress = Math.floor(100 * prog.progress) + return ({progress}%) + } + function renderPercentProgress () { var progress = Math.floor(100 * prog.progress) return ({progress}%) diff --git a/static/main.css b/static/main.css index bb9e5cf6..fbe3bb6b 100644 --- a/static/main.css +++ b/static/main.css @@ -455,6 +455,11 @@ i:not(.disabled):hover { /* Show they're clickable without pointer: cursor */ line-height: 1.5em; } +progress { + width: 60px; + margin-right: 8px; +} + /* * TORRENT LIST: ERRORS */