Minor update

This commit is contained in:
Diego Rodríguez 2018-02-27 11:23:58 -05:00
parent 445f715038
commit c60cdfe9c1
No known key found for this signature in database
GPG key ID: A0370F1B3280FC1B
2 changed files with 26 additions and 25 deletions

14
app.js
View file

@ -1,6 +1,6 @@
/* global WebTorrent, angular, moment, prompt */ /* global WebTorrent, angular, moment, prompt */
const VERSION = '0.17.6' const VERSION = '0.17.7'
const trackers = ['wss://tracker.btorrent.xyz', 'wss://tracker.openwebtorrent.com', 'wss://tracker.fastcast.nz'] const trackers = ['wss://tracker.btorrent.xyz', 'wss://tracker.openwebtorrent.com', 'wss://tracker.fastcast.nz']
@ -21,13 +21,13 @@ const trackerOpts = {
rtcConfig: rtcConfig rtcConfig: rtcConfig
} }
const debug = window.localStorage.getItem('debug') != null const debug = window.localStorage.getItem('debug') !== null
const dbg = function (string, item, color) { const dbg = function (string, item, color) {
color = color != null ? color : '#333333' color = color !== null ? color : '#333333'
if (debug) { if (debug) {
if ((item != null) && item.name) { if (item && item.name) {
return console.debug(`%cβTorrent:${item.infoHash != null ? 'torrent ' : 'torrent ' + item._torrent.name + ':file '}${item.name}${item.infoHash != null ? ' (' + item.infoHash + ')' : ''} %c${string}`, 'color: #33C3F0', `color: ${color}`) return console.debug(`%cβTorrent:${item.infoHash !== null ? 'torrent ' : 'torrent ' + item._torrent.name + ':file '}${item.name}${item.infoHash !== null ? ' (' + item.infoHash + ')' : ''} %c${string}`, 'color: #33C3F0', `color: ${color}`)
} else { } else {
return console.debug(`%cβTorrent:client %c${string}`, 'color: #33C3F0', `color: ${color}`) return console.debug(`%cβTorrent:client %c${string}`, 'color: #33C3F0', `color: ${color}`)
} }
@ -70,7 +70,7 @@ app.controller('BTorrentCtrl', ['$scope', '$rootScope', '$http', '$log', '$locat
duration: 5000, duration: 5000,
html: true html: true
}) })
if (WebTorrent.WEBRTC_SUPPORT == null) { if (!WebTorrent.WEBRTC_SUPPORT) {
$rootScope.disabled = true $rootScope.disabled = true
ngNotify.set('Please use latest Chrome, Firefox or Opera', { ngNotify.set('Please use latest Chrome, Firefox or Opera', {
type: 'error', type: 'error',
@ -371,4 +371,4 @@ app.filter('humanTime', function () {
} }
}) })
app.filter('progress', function () { return function (num) { `${(100 * num).toFixed(1)}%` } }) app.filter('progress', function () { return function (num) { return `${(100 * num).toFixed(1)}%` } })

View file

@ -1,6 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html ng-app="BTorrent" lang="en"> <html ng-app="BTorrent" lang="en">
<head> <head>
<base href=""> <base href="">
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>βTorrent: Browser WebTorrent Client</title> <title>βTorrent: Browser WebTorrent Client</title>
@ -13,21 +13,22 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/fontawesome/4.6/css/font-awesome.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/fontawesome/4.6/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/angular.ui-grid/3.1/ui-grid.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/angular.ui-grid/3.1/ui-grid.min.css">
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
</head> </head>
<body ng-controller="BTorrentCtrl" ng-cloak=""> <body ng-controller="BTorrentCtrl" ng-cloak="">
<header> <header>
<h1>βTorrent<span class="version"> v{{$root.version}}</span></h1> <h1>βTorrent<span class="version"> v{{$root.version}}</span></h1>
<div class="views" ng-show="$root.client.torrents.length == 0"><a ng-href="/#">Full</a> | <a ng-href="/download">Single Download</a> | <a ng-href="/view">Stream / View</a></div> <div class="views" ng-show="$root.client.torrents.length == 0"><a ng-href="/#">Full</a> | <a ng-href="/download">Single Download</a> | <a ng-href="/view">Stream / View</a></div>
</header> </header>
<div id="viewer" ng-style="$root.viewerStyle"></div> <div id="viewer" ng-style="$root.viewerStyle"></div>
<div id="view" ng-view></div> <div id="view" ng-view></div>
<footer> <footer>
<a class="button" href="https://github.com/DiegoRBaquero/BTorrent/issues" target="_blank"><i class="fa fa-github"></i> Suggest a feature / Report a bug <i class="fa fa-comment"></i></a><br> <a class="button" href="https://github.com/DiegoRBaquero/BTorrent/issues" target="_blank"><i class="fa fa-github"></i> Suggest a feature / Report a bug <i class="fa fa-comment"></i></a><br>
<b>βTorrent is an Open-Source project by <a href="https://diegorbaquero.com" target="_blank">DiegoRBaquero</a></b><br> <b>βTorrent is an Open-Source project by <a href="https://diegorbaquero.com" target="_blank">DiegoRBaquero</a></b><br>
<b> <a href="https://tracker.btorrent.xyz/stats" target="_blank">βTorrent's Tracker Stats</a></b><br> <b> <a href="https://tracker.btorrent.xyz/stats" target="_blank">βTorrent's Tracker Stats</a></b><br>
Powered by <a href="https://github.com/feross/webtorrent" target="_blank">WebTorrent</a><br> Powered by <a href="https://github.com/webtorrent/webtorrent" target="_blank">WebTorrent</a><br>
</footer> <a href="https://www.vultr.com/?ref=6823526"><img src="https://www.vultr.com/media/banner_2.png" width="468" height="60"></a>
<div class="spinner" ng-show="client.processing"><i class="fa fa-spinner fa-spin spinner-icon"></i></div> </footer>
<script src="app.js"></script> <div class="spinner" ng-show="client.processing"><i class="fa fa-spinner fa-spin spinner-icon"></i></div>
</body> <script src="app.js"></script>
</body>
</html> </html>