Design: torrent list expand and collapse handle
This commit is contained in:
@@ -71,6 +71,7 @@ module.exports = class TorrentList extends React.Component {
|
|||||||
{this.renderTorrentMetadata(torrentSummary)}
|
{this.renderTorrentMetadata(torrentSummary)}
|
||||||
{infoHash ? this.renderTorrentButtons(torrentSummary) : null}
|
{infoHash ? this.renderTorrentButtons(torrentSummary) : null}
|
||||||
{isSelected ? this.renderTorrentDetails(torrentSummary) : null}
|
{isSelected ? this.renderTorrentDetails(torrentSummary) : null}
|
||||||
|
<hr />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -84,17 +85,25 @@ module.exports = class TorrentList extends React.Component {
|
|||||||
|
|
||||||
// If it's downloading/seeding then show progress info
|
// If it's downloading/seeding then show progress info
|
||||||
const prog = torrentSummary.progress
|
const prog = torrentSummary.progress
|
||||||
const progElems = [renderDownloadCheckbox(), renderTorrentStatus()]
|
let progElems
|
||||||
if (torrentSummary.error) {
|
if (torrentSummary.error) {
|
||||||
progElems.push(getErrorMessage(torrentSummary))
|
progElems = [getErrorMessage(torrentSummary)]
|
||||||
} else if (torrentSummary.status !== 'paused' && prog) {
|
} else if (torrentSummary.status !== 'paused' && prog) {
|
||||||
Array.prototype.push.call(progElems,
|
progElems = [
|
||||||
|
renderDownloadCheckbox(),
|
||||||
|
renderTorrentStatus(),
|
||||||
renderProgressBar(),
|
renderProgressBar(),
|
||||||
renderPercentProgress(),
|
renderPercentProgress(),
|
||||||
renderTotalProgress(),
|
renderTotalProgress(),
|
||||||
renderPeers(),
|
renderPeers(),
|
||||||
renderSpeeds(),
|
renderSpeeds(),
|
||||||
renderEta())
|
renderEta()
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
progElems = [
|
||||||
|
renderDownloadCheckbox(),
|
||||||
|
renderTorrentStatus()
|
||||||
|
]
|
||||||
}
|
}
|
||||||
elements.push(
|
elements.push(
|
||||||
<div key='progress-info' className='ellipsis'>
|
<div key='progress-info' className='ellipsis'>
|
||||||
|
|||||||
@@ -398,6 +398,23 @@ textarea,
|
|||||||
margin-bottom: 6px;
|
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
|
* TORRENT LIST: ERRORS
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user