integrate new name and header. Signin/signout flow
This commit is contained in:
parent
28247a87c6
commit
4cd48b7bb2
12 changed files with 130 additions and 74 deletions
|
|
@ -1,10 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copay.header').controller('HeaderController',
|
||||
function($scope, $rootScope, $location) {
|
||||
function($scope, $rootScope, $location, Network) {
|
||||
$scope.menu = [{
|
||||
'title': 'Home',
|
||||
'link': '#/'
|
||||
'link': '#/home'
|
||||
}, {
|
||||
'title': 'Transactions',
|
||||
'link': '#/transactions'
|
||||
|
|
@ -16,6 +16,10 @@ angular.module('copay.header').controller('HeaderController',
|
|||
'link': '#/backup'
|
||||
}];
|
||||
|
||||
if (!$rootScope.peerId) {
|
||||
$location.path('signin');
|
||||
}
|
||||
|
||||
$scope.isActive = function(item) {
|
||||
if (item.link.replace('#','') == $location.path()) {
|
||||
return true;
|
||||
|
|
@ -29,7 +33,7 @@ angular.module('copay.header').controller('HeaderController',
|
|||
|
||||
$scope.signout = function() {
|
||||
$rootScope.isLogged = false;
|
||||
|
||||
Network.disconnect();
|
||||
$location.path('signin');
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue