From 4a551cbca7992646f7a233d36f476f08ed801776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez?= Date: Sat, 2 Jan 2016 03:36:54 -0500 Subject: [PATCH] v0.10.1 - Disable buttons if using unsupported browser --- _compiled/app.js | 1 + _compiled/index.html | 14 +++++++------- app.coffee | 4 +++- index.jade | 14 +++++++------- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/_compiled/app.js b/_compiled/app.js index 770661c..476ce36 100644 --- a/_compiled/app.js +++ b/_compiled/app.js @@ -66,6 +66,7 @@ var rtc, updateAll; rtc = window.mozRTCPeerConnection || window.RTCPeerConnection || window.webkitRTCPeerConnection; if (rtc == null) { + $scope.disabled = true; ngNotify.set('Please use latest Chrome, Firefox or Opera', { type: 'error', sticky: true diff --git a/_compiled/index.html b/_compiled/index.html index 556aed3..007dd94 100644 --- a/_compiled/index.html +++ b/_compiled/index.html @@ -4,8 +4,8 @@ βTorrent: Browser WebTorrent Client - - + + @@ -16,21 +16,21 @@
-

βTorrent v0.10.0

+

βTorrent v0.10.1

- +
- +
- +
- +
diff --git a/app.coffee b/app.coffee index 5725df1..dd17df6 100644 --- a/app.coffee +++ b/app.coffee @@ -51,7 +51,9 @@ app = angular.module 'BTorrent', ['ui.grid', 'ui.grid.resizeColumns', 'ui.grid.s app.controller 'BTorrentCtrl', ['$scope','$http','$log','$location', 'ngNotify', ($scope, $http, $log, $location, ngNotify) -> rtc = window.mozRTCPeerConnection || window.RTCPeerConnection || window.webkitRTCPeerConnection - if !rtc? then ngNotify.set 'Please use latest Chrome, Firefox or Opera', {type: 'error', sticky: true} + if !rtc? + $scope.disabled = true + ngNotify.set 'Please use latest Chrome, Firefox or Opera', {type: 'error', sticky: true} rtc = null $scope.client = client diff --git a/index.jade b/index.jade index 2d1dbe6..bca6f94 100644 --- a/index.jade +++ b/index.jade @@ -4,8 +4,8 @@ html(ng-app='BTorrent', lang='en') base(href='') meta(charset='UTF-8') title βTorrent: Browser WebTorrent Client - meta(name='description', content='βTorrent: fully-featured Browser WebTorrent Client') - meta(name='keywords', content='βTorrent, btorrent, client, webtorrent, browser, torrent, stream, bittorrent') + meta(name='description', content='βTorrent is the first fully-featured Browser WebTorrent Client') + meta(name='keywords', content='βTorrent, btorrent, client, webtorrent, browser, torrent, stream, bittorrent, torrenting, sharing, filesharing') meta(name='author', content='Diego Rodríguez Baquero - DiegoRBaquero') meta(name='viewport', content='width=device-width, initial-scale=1') script(src='https://cdn.jsdelivr.net/g/webtorrent@0.67.1,momentjs@2.10,angularjs@1.4,angular.ui-grid@3.0,angular.ng-notify@0.7,angular.file-upload@10.1') @@ -17,21 +17,21 @@ html(ng-app='BTorrent', lang='en') header h1 | βTorrent - span.version v0.10.0 + span.version v0.10.1 .container .row .four.columns - input.u-full-width(type='text', placeholder='magnet link or hash', ng-model='torrentInput') + input.u-full-width(type='text', placeholder='magnet link or hash', ng-model='torrentInput', ng-disabled='disabled') .two.columns.download-button - button(ng-click='addMagnet()', ng-disabled='!torrentInput.length', ng-class="{'button-primary': torrentInput.length}") + button(ng-click='addMagnet()', ng-disabled='!torrentInput.length || disabled', ng-class='{"button-primary": torrentInput.length}') i.fa.fa-download | Download .three.columns - button.button-primary(type='file', ngf-select='openTorrentFile($file)') + button(type='file', ngf-select='openTorrentFile($file)', ng-disabled='disabled', ng-class='{"button-primary": !disabled}') i.fa.fa-folder-open | Open torrent file .three.columns.u-pull-right - button.u-pull-right.button-primary(ngf-select='seedFiles($files)', multiple='') + button.u-pull-right(ngf-select='seedFiles($files)', multiple='', ng-disabled='disabled', ng-class='{"button-primary": !disabled}') i.fa.fa-upload | Seed files .row.grid(ui-grid='gridOptions', ui-grid-resize-columns, ui-grid-selection)