From 3c58e1beffb8cdbf0e2ea7980457d973c32f2506 Mon Sep 17 00:00:00 2001 From: Amol Sontakke Date: Thu, 26 Jan 2023 20:22:43 +0530 Subject: [PATCH 1/2] Added missing Id Signed-off-by: Amol Sontakke --- src/app/shared/services/lfx-header.service.ts | 37 ++++++++----------- src/index.html | 2 +- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/src/app/shared/services/lfx-header.service.ts b/src/app/shared/services/lfx-header.service.ts index cb43c5ab..39614ec1 100644 --- a/src/app/shared/services/lfx-header.service.ts +++ b/src/app/shared/services/lfx-header.service.ts @@ -1,27 +1,22 @@ // Copyright The Linux Foundation and each contributor to CommunityBridge. // SPDX-License-Identifier: MIT -import { Injectable } from '@angular/core'; -import { AuthService } from './auth.service'; -import { EnvConfig } from '../../config/cla-env-utils'; -import { AppSettings } from '../../config/app-settings'; +import { Injectable } from "@angular/core"; +import { AuthService } from "./auth.service"; +import { EnvConfig } from "../../config/cla-env-utils"; +import { AppSettings } from "../../config/app-settings"; -const script = document.createElement('script'); -script.setAttribute( - 'src', - EnvConfig.default[AppSettings.LFX_HEADER] -); +const script = document.createElement("script"); +script.setAttribute("src", EnvConfig.default[AppSettings.LFX_HEADER]); document.head.appendChild(script); @Injectable({ - providedIn: 'root' + providedIn: "root", }) export class LfxHeaderService { links: any[]; - constructor( - private auth: AuthService - ) { + constructor(private auth: AuthService) { this.setUserInLFxHeader(); this.setLinks(); this.setCallBackUrl(); @@ -30,24 +25,24 @@ export class LfxHeaderService { setLinks() { this.links = [ { - title: 'Project Login', + title: "Project Login", url: EnvConfig.default[AppSettings.PROJECT_CONSOLE_LINK_V2], }, { - title: 'CLA Manager Login', + title: "CLA Manager Login", url: EnvConfig.default[AppSettings.CORPORATE_CONSOLE_LINK_V2], }, { - title: 'Developer', - url: AppSettings.LEARN_MORE - } + title: "Developer", + url: AppSettings.LEARN_MORE, + }, ]; - const element: any = document.getElementById('lfx-header-v2'); + const element: any = document.getElementById("lfx-header-v2"); element.links = this.links; } setCallBackUrl() { - const lfHeaderEl: any = document.getElementById('lfx-header-v2'); + const lfHeaderEl: any = document.getElementById("lfx-header-v2"); if (lfHeaderEl) { lfHeaderEl.callbackurl = this.auth.auth0Options.callbackUrl; } @@ -55,7 +50,7 @@ export class LfxHeaderService { setUserInLFxHeader(): void { setTimeout(() => { - const lfHeaderEl: any = document.getElementById('lfx-header-v2'); + const lfHeaderEl: any = document.getElementById("lfx-header-v2"); if (lfHeaderEl) { this.auth.userProfile$.subscribe((data) => { if (data) { diff --git a/src/index.html b/src/index.html index e839687f..430217d3 100644 --- a/src/index.html +++ b/src/index.html @@ -27,7 +27,7 @@ Date: Thu, 26 Jan 2023 20:25:12 +0530 Subject: [PATCH 2/2] Added missing Id Signed-off-by: Amol Sontakke --- src/app/shared/services/lfx-header.service.ts | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/app/shared/services/lfx-header.service.ts b/src/app/shared/services/lfx-header.service.ts index 39614ec1..d08c086a 100644 --- a/src/app/shared/services/lfx-header.service.ts +++ b/src/app/shared/services/lfx-header.service.ts @@ -1,17 +1,17 @@ // Copyright The Linux Foundation and each contributor to CommunityBridge. // SPDX-License-Identifier: MIT -import { Injectable } from "@angular/core"; -import { AuthService } from "./auth.service"; -import { EnvConfig } from "../../config/cla-env-utils"; -import { AppSettings } from "../../config/app-settings"; +import { Injectable } from '@angular/core'; +import { AuthService } from './auth.service'; +import { EnvConfig } from '../../config/cla-env-utils'; +import { AppSettings } from '../../config/app-settings'; -const script = document.createElement("script"); -script.setAttribute("src", EnvConfig.default[AppSettings.LFX_HEADER]); +const script = document.createElement('script'); +script.setAttribute('src', EnvConfig.default[AppSettings.LFX_HEADER]); document.head.appendChild(script); @Injectable({ - providedIn: "root", + providedIn: 'root', }) export class LfxHeaderService { links: any[]; @@ -25,24 +25,24 @@ export class LfxHeaderService { setLinks() { this.links = [ { - title: "Project Login", + title: 'Project Login', url: EnvConfig.default[AppSettings.PROJECT_CONSOLE_LINK_V2], }, { - title: "CLA Manager Login", + title: 'CLA Manager Login', url: EnvConfig.default[AppSettings.CORPORATE_CONSOLE_LINK_V2], }, { - title: "Developer", + title: 'Developer', url: AppSettings.LEARN_MORE, }, ]; - const element: any = document.getElementById("lfx-header-v2"); + const element: any = document.getElementById('lfx-header-v2'); element.links = this.links; } setCallBackUrl() { - const lfHeaderEl: any = document.getElementById("lfx-header-v2"); + const lfHeaderEl: any = document.getElementById('lfx-header-v2'); if (lfHeaderEl) { lfHeaderEl.callbackurl = this.auth.auth0Options.callbackUrl; } @@ -50,7 +50,7 @@ export class LfxHeaderService { setUserInLFxHeader(): void { setTimeout(() => { - const lfHeaderEl: any = document.getElementById("lfx-header-v2"); + const lfHeaderEl: any = document.getElementById('lfx-header-v2'); if (lfHeaderEl) { this.auth.userProfile$.subscribe((data) => { if (data) {