diff --git a/dist/models/client.js b/dist/models/client.js index 3dfe73e5..710cf019 100644 --- a/dist/models/client.js +++ b/dist/models/client.js @@ -233,8 +233,7 @@ client.prototype.getTorrentList = function(callback) { if (torrent['isHashChecking'] === '1') { torrentStatus.push('is-checking'); } else if (torrent['isComplete'] === '1' && torrent['isOpen'] === '1' && torrent['state'] === '1') { - // torrentStatus.push('is-seeding'); - torrentStatus.push('is-completed'); + torrentStatus.push('is-seeding'); } else if (torrent['isComplete'] === '1' && torrent['isOpen'] === '1' && torrent['state'] === '0') { torrentStatus.push('is-paused'); } else if (torrent['isComplete'] === '1' && torrent['isOpen'] === '0' && torrent['state'] === '0') { @@ -291,12 +290,9 @@ client.prototype.stopTorrent = function(hash, callback) { hash = [hash]; } - console.log('stopping: ' + hash); - for (i = 0, len = hash.length; i < len; i++) { - rTorrent.get('d.stop', [hash[i]]).then(function(data) { - console.log('success: ' + data); + rTorrent.get('d.close', [hash[i]]).then(function(data) { callback(null, data); }, function(error) { callback(error, null); diff --git a/dist/models/rtorrent.js b/dist/models/rtorrent.js index bf705772..93d6c488 100644 --- a/dist/models/rtorrent.js +++ b/dist/models/rtorrent.js @@ -16,7 +16,6 @@ rtorrent.get = function(api, array) { try { xml = Serializer.serializeMethodCall(api, array); - console.log(xml); } catch (error) { console.trace(error); } diff --git a/dist/public/scripts/app.js b/dist/public/scripts/app.js index 370f50eb..d25ee4e3 100644 --- a/dist/public/scripts/app.js +++ b/dist/public/scripts/app.js @@ -31911,10 +31911,10 @@ var Torrent = React.createClass({displayName: "Torrent", 'is-stopped': torrent.status.indexOf('is-stopped') > -1, 'is-paused': torrent.status.indexOf('is-paused') > -1, 'is-downloading': torrent.status.indexOf('is-downloading') > -1, - // 'is-seeding': torrent.status.indexOf('is-seeding') > -1, + 'is-seeding': torrent.status.indexOf('is-seeding') > -1, 'is-completed': torrent.status.indexOf('is-completed') > -1, 'is-checking': torrent.status.indexOf('is-checking') > -1, - 'is-active': torrent.status.indexOf('is-active'), + 'is-active': torrent.status.indexOf('is-active') > -1, 'is-inactive': torrent.status.indexOf('is-inactive') > -1 }); diff --git a/dist/public/stylesheets/style.css b/dist/public/stylesheets/style.css index 908483f2..16826e1a 100644 --- a/dist/public/stylesheets/style.css +++ b/dist/public/stylesheets/style.css @@ -816,6 +816,10 @@ body { -webkit-transition: background 0.25s, width 0.25s; -o-transition: background 0.25s, width 0.25s; transition: background 0.25s, width 0.25s; } + .is-completed .progress-bar__fill { + background: #5b585c; } + .is-seeding .progress-bar__fill { + background: #385f7d; } .is-stopped .progress-bar__fill { background: #5b585c; } diff --git a/source/sass/objects/_progress-bar.scss b/source/sass/objects/_progress-bar.scss index fb37d5a0..2138d229 100644 --- a/source/sass/objects/_progress-bar.scss +++ b/source/sass/objects/_progress-bar.scss @@ -9,6 +9,14 @@ height: 100%; transition: background 0.25s, width 0.25s; + .is-completed & { + background: $progress-bar--fill--stopped; + } + + .is-seeding & { + background: $progress-bar--fill--completed; + } + .is-stopped & { background: $progress-bar--fill--stopped; } diff --git a/source/sass/tools/_colors.scss b/source/sass/tools/_colors.scss index 820121b0..3dc911c5 100644 --- a/source/sass/tools/_colors.scss +++ b/source/sass/tools/_colors.scss @@ -51,6 +51,7 @@ $progress-bar--background: #28242a; $progress-bar--fill: #0e8761; $progress-bar--fill--stopped: desaturate(lighten($progress-bar--background, 20%), 5%); +$progress-bar--fill--completed: #385f7d; // modal windows diff --git a/source/scripts/components/torrent-list/Torrent.js b/source/scripts/components/torrent-list/Torrent.js index 17494e09..6893e21f 100644 --- a/source/scripts/components/torrent-list/Torrent.js +++ b/source/scripts/components/torrent-list/Torrent.js @@ -29,10 +29,10 @@ var Torrent = React.createClass({ 'is-stopped': torrent.status.indexOf('is-stopped') > -1, 'is-paused': torrent.status.indexOf('is-paused') > -1, 'is-downloading': torrent.status.indexOf('is-downloading') > -1, - // 'is-seeding': torrent.status.indexOf('is-seeding') > -1, + 'is-seeding': torrent.status.indexOf('is-seeding') > -1, 'is-completed': torrent.status.indexOf('is-completed') > -1, 'is-checking': torrent.status.indexOf('is-checking') > -1, - 'is-active': torrent.status.indexOf('is-active'), + 'is-active': torrent.status.indexOf('is-active') > -1, 'is-inactive': torrent.status.indexOf('is-inactive') > -1 });