add maxPeer check

This commit is contained in:
Matias Alejo Garcia 2014-04-09 11:05:25 -03:00
commit 0780879205
6 changed files with 73 additions and 30 deletions

View file

@ -32,9 +32,12 @@ angular.module('copay.header').controller('HeaderController',
};
$scope.signout = function() {
$rootScope.isLogged = false;
Network.disconnect(function() {
$location.path('signin');
});
};
$scope.clearFlashMessage = function() {
$rootScope.flashMessage = {};
};
});

View file

@ -38,9 +38,16 @@ angular.module('copay.signin').controller('SigninController',
if (cid) {
Network.init(function() {
Network.connect(cid, function() {
$location.path('peer');
$rootScope.$digest();
Network.connect(cid,
function() {
$location.path('peer');
$rootScope.$digest();
}, function() {
console.log('[signin.js.46] SETTING MESSAGE'); //TODO
$rootScope.flashMessage = { message: 'Connection refussed', type: 'error'};
$location.path('home');
$rootScope.$digest();
});
});
}