banner for unsupported browsers

This commit is contained in:
Matias Alejo Garcia 2014-05-12 12:00:25 -03:00
parent be83729223
commit 030e10a3b6
2 changed files with 29 additions and 4 deletions

View File

@ -40,6 +40,7 @@
<span ng-if="!$root.loading">{{availableBalance || 0}}</span>
<i class="fi-bitcoin"></i>
</div>
</div>
</div>
@ -578,8 +579,23 @@
</div>
</script>
<!-- / <div class="large-4 columns box-backup">Backup to Dropbox</div>
// <div class="large-4 columns box-backup">Backup to email</div> -->
<!-- UNSUPPORTED -->
<script type="text/ng-template" id="unsupported.html">
<h2 class="text-center">Browser unsupported</h2>
<h3 class="text-center">
Copay uses webRTC for peer-to-peer communications,
but your browser does not support it.
Please use
a current version of Google Chrome, Mozilla Firefox, or Opera.
<br><br>
For more information
on supported browsers please check <a href="http://www.webrtc.org/">http://www.webrtc.org/</a>
</h3>
</script>
<!-- NOT FOUND -->
<script type="text/ng-template" id="404.html">
<h2 class="text-center">404</h2>

View File

@ -42,6 +42,9 @@ angular
templateUrl: 'backup.html',
validate: true
})
.when('/unsupported', {
templateUrl: 'unsupported.html'
})
.otherwise({
templateUrl: '404.html'
});
@ -57,8 +60,14 @@ angular
})
.run(function($rootScope, $location) {
$rootScope.$on('$routeChangeStart', function(event, next, current) {
if ((!$rootScope.wallet || !$rootScope.wallet.id) && next.validate) {
$location.path('signin');
if (!util.supports.data) {
$location.path('unsupported');
}
else {
if ((!$rootScope.wallet || !$rootScope.wallet.id) && next.validate) {
$location.path('signin');
}
}
});
});