Skip to content

Commit

Permalink
Merge pull request #223 from zowe/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
1000TurquoisePogs committed Apr 24, 2020
2 parents 37a447f + 3544113 commit 80ffa0c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ export class LoginComponent implements OnInit {
}

private isIdle(): boolean {
let idle = (Date.now() - this.lastActive) > ACTIVITY_IDLE_TIMEOUT_MS;
this.logger.debug("ZWED5304I", this.lastActive, Date.now(), idle); //this.logger.debug(`User lastActive=${this.lastActive}, now=${Date.now()}, idle={idle}`);
const lastActive = parseInt(window.localStorage.getItem('ZoweZLUX.lastActive') || '0');
let idle = (Date.now() - lastActive) > ACTIVITY_IDLE_TIMEOUT_MS;
this.logger.debug("ZWED5304I", lastActive, Date.now(), idle); //this.logger.debug(`User lastActive=${lastActive}, now=${Date.now()}, idle={idle}`);
return idle;
}

Expand Down Expand Up @@ -216,6 +217,7 @@ export class LoginComponent implements OnInit {
detectActivity(): void {
this.logger.debug('ZWED5305I'); //this.logger.debug('User activity detected');
this.lastActive = Date.now();
window.localStorage.setItem('ZoweZLUX.lastActive',this.lastActive.toString());
if (this.idleWarnModal) {
this.popupManager.removeReport(this.idleWarnModal.id);
this.idleWarnModal = undefined;
Expand Down

0 comments on commit 80ffa0c

Please sign in to comment.