integrate new name and header. Signin/signout flow

This commit is contained in:
Gustavo Cortez 2014-03-31 12:48:35 -03:00
commit 4cd48b7bb2
12 changed files with 130 additions and 74 deletions

View file

@ -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');
};
});