Skip to content

Commit

Permalink
Fixes somethign
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrolho committed Sep 18, 2016
1 parent a538216 commit b877cde
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
14 changes: 11 additions & 3 deletions _sass/player.scss
Expand Up @@ -24,12 +24,20 @@
}
}

.show-seed {
#status code {
color: $blue;
}

body.is-seed .show-seed {
display: inline;
}

body.is-seed .show-leech {
display: none;
}

#status code {
color: $blue;
.show-seed {
display: none;
}

.is-seed #hero {
Expand Down
1 change: 1 addition & 0 deletions index.html
Expand Up @@ -25,6 +25,7 @@ <h2>Stream torrents directly from your browser</h2>
<div>
<span class="show-leech">Downloading </span>
<span class="show-seed">Seeding </span>
<code id="streamedFileName"></code>
<span class="show-leech"> from </span>
<span class="show-seed"> to </span>
<code id="numPeers">0 peers</code>
Expand Down
5 changes: 4 additions & 1 deletion js/bundle.js
Expand Up @@ -23,6 +23,7 @@ var prettyBytes = require('pretty-bytes')
// HTML elements
var $body = $('body')
var $progressBar = $('#progressBar')
var $streamedFileName = $('#streamedFileName')
var $numPeers = $('#numPeers')
var $downloaded = $('#downloaded')
var $total = $('#total')
Expand Down Expand Up @@ -95,6 +96,8 @@ function onTorrent(torrent) {
largestFile = torrent.files[i]
}

$streamedFileName.html(largestFile.name)

// Stream the file in the browser
largestFile.appendTo('#output')

Expand Down Expand Up @@ -136,7 +139,7 @@ function onTorrent(torrent) {
}

function onDone () {
$body.className += ' is-seed'
$body.addClass('is-seed')
onProgress()
}
}
Expand Down
5 changes: 4 additions & 1 deletion js/webtorrent.js
Expand Up @@ -4,6 +4,7 @@ var prettyBytes = require('pretty-bytes')
// HTML elements
var $body = $('body')
var $progressBar = $('#progressBar')
var $streamedFileName = $('#streamedFileName')
var $numPeers = $('#numPeers')
var $downloaded = $('#downloaded')
var $total = $('#total')
Expand Down Expand Up @@ -76,6 +77,8 @@ function onTorrent(torrent) {
largestFile = torrent.files[i]
}

$streamedFileName.html(largestFile.name)

// Stream the file in the browser
largestFile.appendTo('#output')

Expand Down Expand Up @@ -117,7 +120,7 @@ function onTorrent(torrent) {
}

function onDone () {
$body.className += ' is-seed'
$body.addClass('is-seed')
onProgress()
}
}
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -11,6 +11,7 @@
"url": "https://github.com/ferrolho/magnet-player/issues"
},
"dependencies": {
"clipboard": "^1.5.12",
"moment": "^2.15.0",
"pretty-bytes": "^4.0.2"
},
Expand Down

0 comments on commit b877cde

Please sign in to comment.