Merge pull request #976 from cmgustavo/feature/01-timeout
Automatically logout wallet after 15 minutes of inactivity
This commit is contained in:
commit
ba504f147d
6 changed files with 24 additions and 3 deletions
|
|
@ -82,4 +82,15 @@ angular.module('copayApp.controllers').controller('SidebarController',
|
|||
// Init socket handlers (with no wallet yet)
|
||||
controllerUtils.setSocketHandlers();
|
||||
|
||||
if ($rootScope.wallet) {
|
||||
$scope.$on('$idleStart', function(a) {
|
||||
notification.warning('Session will be closed', 'Your session is about to expire due to inactivity');
|
||||
});
|
||||
|
||||
$scope.$on('$idleTimeout', function() {
|
||||
$scope.signout();
|
||||
notification.warning('Session closed', 'Session closed because a long time of inactivity');
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue