lock also in header

This commit is contained in:
Matias Alejo Garcia 2014-12-03 00:36:44 -03:00 committed by Gustavo Maximiliano Cortez
parent 74d6f76d8e
commit 33e0bf80a6
2 changed files with 11 additions and 2 deletions

View File

@ -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) {

View File

@ -39,7 +39,10 @@
<i class="icon-person size-18 m10r"></i> {{'Profile'|translate}}<span class="size-10 text-warning" ng-if="!$root.needsEmailConfirmation && $root.iden.backupNeeded"> [ Needs Backup ]</span></a>
</li>
<li><a href="#!/" title="Close" ng-click="signout()">
<i class="icon-power size-18 m10r"></i> {{'Close'|translate}}</a></li>
<span ng-if="!hasPin"><i class="icon-power size-18 m10r"></i> {{'Close'|translate}}</span>
<span ng-if="hasPin"><i class="icon-power size-18 m10r"></i> {{'Lock'|translate}}</span>
</a></li>
</ul>
</div>