From 739c1f705e11f79138e0eb4ce136943befa92a88 Mon Sep 17 00:00:00 2001 From: DC Date: Sun, 25 Sep 2016 17:51:13 -0700 Subject: [PATCH] Design: torrent list expand and collapse handle --- src/renderer/pages/torrent-list-page.js | 17 +++++++++++++---- static/main.css | 17 +++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/renderer/pages/torrent-list-page.js b/src/renderer/pages/torrent-list-page.js index 31bea29c..6d0ca8d7 100644 --- a/src/renderer/pages/torrent-list-page.js +++ b/src/renderer/pages/torrent-list-page.js @@ -71,6 +71,7 @@ module.exports = class TorrentList extends React.Component { {this.renderTorrentMetadata(torrentSummary)} {infoHash ? this.renderTorrentButtons(torrentSummary) : null} {isSelected ? this.renderTorrentDetails(torrentSummary) : null} +
) } @@ -84,17 +85,25 @@ module.exports = class TorrentList extends React.Component { // If it's downloading/seeding then show progress info const prog = torrentSummary.progress - const progElems = [renderDownloadCheckbox(), renderTorrentStatus()] + let progElems if (torrentSummary.error) { - progElems.push(getErrorMessage(torrentSummary)) + progElems = [getErrorMessage(torrentSummary)] } else if (torrentSummary.status !== 'paused' && prog) { - Array.prototype.push.call(progElems, + progElems = [ + renderDownloadCheckbox(), + renderTorrentStatus(), renderProgressBar(), renderPercentProgress(), renderTotalProgress(), renderPeers(), renderSpeeds(), - renderEta()) + renderEta() + ] + } else { + progElems = [ + renderDownloadCheckbox(), + renderTorrentStatus() + ] } elements.push(
diff --git a/static/main.css b/static/main.css index 2a400ff0..1f1bd9be 100644 --- a/static/main.css +++ b/static/main.css @@ -398,6 +398,23 @@ textarea, margin-bottom: 6px; } +.torrent hr { + position: absolute; + bottom: 5px; + left: calc(50% - 20px); + width: 40px; + height: 1px; + background: #ccc; + display: none; + margin: 0; + padding: 0; + border: none; +} + +.torrent:hover hr { + display: block; +} + /* * TORRENT LIST: ERRORS */