From a2f386d30aef2153307d3dfa5184673b4f584591 Mon Sep 17 00:00:00 2001 From: John Furrow Date: Sun, 22 Nov 2015 16:45:43 -0800 Subject: [PATCH] Add classes for file tree --- .../components/torrent-list/TorrentDetails.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/client/source/scripts/components/torrent-list/TorrentDetails.js b/client/source/scripts/components/torrent-list/TorrentDetails.js index 36107862..f3b2b803 100644 --- a/client/source/scripts/components/torrent-list/TorrentDetails.js +++ b/client/source/scripts/components/torrent-list/TorrentDetails.js @@ -41,7 +41,8 @@ class TorrentDetails extends React.Component { } shouldComponentUpdate(nextProps) { - if (this.props.visible === true || (nextProps.visible !== this.props.visible)) { + if (this.props.visible === true || + (nextProps.visible !== this.props.visible)) { return true; } else { return false; @@ -67,8 +68,10 @@ class TorrentDetails extends React.Component { if (files) { let fileList = files.map(pathItem => { let classes = classNames({ + 'torrent-details__file-data__item': true, 'torrent-details__file-data__filename': true, - [`torrent-details__file-data__depth--${pathItem.pathDepth}`]: pathItem.pathDepth > 0 + [`torrent-details__file-data__depth--${pathItem.pathDepth}`]: + pathItem.pathDepth > 0 }); return (
-
+
{parentDirectory}
{fileList} @@ -88,10 +92,13 @@ class TorrentDetails extends React.Component { } else { return (
-
+
{parentDirectory}
-
+
{filename}