migrated PR to mono repo (#2837)

This commit is contained in:
Gbubemi Smith 2022-06-06 18:08:06 +01:00 committed by GitHub
parent 0673782aa9
commit d542d42637
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,4 @@
import { Component, NgZone, OnDestroy, OnInit, SecurityContext } from "@angular/core"; import { Component, Inject, NgZone, OnDestroy, OnInit, SecurityContext } from "@angular/core";
import { DomSanitizer } from "@angular/platform-browser"; import { DomSanitizer } from "@angular/platform-browser";
import { NavigationEnd, Router } from "@angular/router"; import { NavigationEnd, Router } from "@angular/router";
import * as jq from "jquery"; import * as jq from "jquery";
@ -36,6 +36,7 @@ import { SingleOrgPolicy } from "./organizations/policies/single-org.component";
import { TwoFactorAuthenticationPolicy } from "./organizations/policies/two-factor-authentication.component"; import { TwoFactorAuthenticationPolicy } from "./organizations/policies/two-factor-authentication.component";
import { PolicyListService } from "./services/policy-list.service"; import { PolicyListService } from "./services/policy-list.service";
import { RouterService } from "./services/router.service"; import { RouterService } from "./services/router.service";
import { DOCUMENT } from "@angular/common";
const BroadcasterSubscriptionId = "AppComponent"; const BroadcasterSubscriptionId = "AppComponent";
const IdleTimeout = 60000 * 10; // 10 minutes const IdleTimeout = 60000 * 10; // 10 minutes
@ -50,6 +51,7 @@ export class AppComponent implements OnDestroy, OnInit {
private isIdle = false; private isIdle = false;
constructor( constructor(
@Inject(DOCUMENT) private document: Document,
private broadcasterService: BroadcasterService, private broadcasterService: BroadcasterService,
private tokenService: TokenService, private tokenService: TokenService,
private folderService: FolderService, private folderService: FolderService,
@ -78,6 +80,8 @@ export class AppComponent implements OnDestroy, OnInit {
) {} ) {}
ngOnInit() { ngOnInit() {
this.document.documentElement.lang = this.i18nService.locale;
this.ngZone.runOutsideAngular(() => { this.ngZone.runOutsideAngular(() => {
window.onmousemove = () => this.recordActivity(); window.onmousemove = () => this.recordActivity();
window.onmousedown = () => this.recordActivity(); window.onmousedown = () => this.recordActivity();