From 248eb582857260c05c19bdf5d89ba312e7ed2380 Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Tue, 3 Jan 2017 12:44:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BE=D1=81=D0=BD=D0=BE=D0=B2=D0=BD?= =?UTF-8?q?=D1=8B=D1=85=20=D1=82=D0=B8=D0=BF=D0=BE=D0=B2=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=82=D0=B5=D0=BD=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 2 +- src/recent-torrents.js | 75 ++++++++++++++++++++++++++++++++++++++++++ src/torrent-page.js | 6 ++++ 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 05eb1cc..96aa1f1 100644 --- a/index.js +++ b/index.js @@ -91,7 +91,7 @@ io.on('connection', function(socket) filesList: row.filesList, piecelength: row.piecelength, added: row.added.getTime(), - contentCategory: row.contentCategory, + contentType: row.contentType, } } diff --git a/src/recent-torrents.js b/src/recent-torrents.js index 442a253..36c8470 100644 --- a/src/recent-torrents.js +++ b/src/recent-torrents.js @@ -29,6 +29,81 @@ return ( } } + leftIcon={ + (() => { + console.log(torrent.contentType) + switch(torrent.contentType) + { + case 'video': + return ( + + + + + + + ) + case 'audio': + return ( + + + + + + ) + case 'pictures': + return ( + + + + ) + case 'application': + return ( + + + + ) + case 'books': + return ( + + + + + + + + + ) + } + })() + } rightIcon={ { e.preventDefault(); diff --git a/src/torrent-page.js b/src/torrent-page.js index 3047b34..fe893ca 100644 --- a/src/torrent-page.js +++ b/src/torrent-page.js @@ -101,6 +101,12 @@ const TorrentInformation = (props) => { rightIcon={} primaryText="Indexed/Added torrent date" secondaryText={moment(torrent.added).format('MMMM Do YYYY, h:mm:ss')} + /> + } backgroundColor={yellow600} />} + rightIcon={} + primaryText="Content type" + secondaryText={torrent.contentType} /> } backgroundColor={yellow600} />}