add maxPeer check
This commit is contained in:
parent
9eadda0ed3
commit
0780879205
6 changed files with 73 additions and 30 deletions
|
|
@ -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 = {};
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue