Update app.js

This commit is contained in:
Diego Rodríguez Baquero 2022-05-13 17:26:54 -05:00 committed by GitHub
parent 4d237879bd
commit 68a6952b2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

5
app.js
View file

@ -36,7 +36,7 @@ const dbg = function (string, item, color) {
const er = function (err, item) { dbg(err, item, '#FF0000') } const er = function (err, item) { dbg(err, item, '#FF0000') }
dbg(`Starting... v${VERSION}`) dbg(`Starting v${VERSION}. WebTorrent ${WebTorrent.VERSION}`)
const client = new WebTorrent({ const client = new WebTorrent({
tracker: trackerOpts tracker: trackerOpts
@ -66,13 +66,14 @@ const app = angular.module('BTorrent',
app.controller('BTorrentCtrl', ['$scope', '$rootScope', '$http', '$log', '$location', 'ngNotify', function ($scope, $rootScope, $http, $log, $location, ngNotify) { app.controller('BTorrentCtrl', ['$scope', '$rootScope', '$http', '$log', '$location', 'ngNotify', function ($scope, $rootScope, $http, $log, $location, ngNotify) {
let updateAll let updateAll
$rootScope.version = VERSION $rootScope.version = VERSION
$rootScope.webtorrentVersion = WebTorrent.VERSION
ngNotify.config({ ngNotify.config({
duration: 5000, duration: 5000,
html: true html: true
}) })
if (!WebTorrent.WEBRTC_SUPPORT) { if (!WebTorrent.WEBRTC_SUPPORT) {
$rootScope.disabled = true $rootScope.disabled = true
ngNotify.set('Please use latest Chrome, Firefox or Opera', { ngNotify.set('Please use a WebRTC compatible browser', {
type: 'error', type: 'error',
sticky: true, sticky: true,
button: false button: false