From 33e0bf80a6ceedd58a96533dad5542e67660c07f Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Wed, 3 Dec 2014 00:36:44 -0300 Subject: [PATCH] lock also in header --- js/controllers/head.js | 8 +++++++- views/includes/head.html | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/js/controllers/head.js b/js/controllers/head.js index 899d445b1..375efc91e 100644 --- a/js/controllers/head.js +++ b/js/controllers/head.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('HeadController', function($scope, $rootScope, $filter, $timeout, notification, identityService, balanceService) { +angular.module('copayApp.controllers').controller('HeadController', function($scope, $rootScope, $filter, $timeout, notification, identityService, balanceService, pinService) { $scope.username = $rootScope.iden.getName(); $scope.hoverMenu = false; @@ -39,7 +39,13 @@ angular.module('copayApp.controllers').controller('HeadController', function($sc window.onbeforeunload = undefined; }); + // TODO put this on init() if ($rootScope.wallet) { + pinService.check(function(err, value) { + $scope.hasPin = value; + }); + + $scope.$on('$idleStart', function() { }); $scope.$on('$idleWarn', function(a, countdown) { diff --git a/views/includes/head.html b/views/includes/head.html index 68736f757..de6fb38d0 100644 --- a/views/includes/head.html +++ b/views/includes/head.html @@ -39,7 +39,10 @@ {{'Profile'|translate}} [ Needs Backup ]
  • - {{'Close'|translate}}
  • + {{'Close'|translate}} + {{'Lock'|translate}} + +