Skip to content

Commit 1d97855

Browse files
feat: added lf login
Signed-off-by: Amol Sontakke <amols@proximabiz.com>
1 parent 9462d03 commit 1d97855

File tree

24 files changed

+160
-383
lines changed

24 files changed

+160
-383
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,5 +139,6 @@
139139
"xmlhttprequest-ssl": "^1.6.3",
140140
"@babel/traverse": "^7.23.2",
141141
"postcss": "^8.4.31"
142-
}
142+
},
143+
"packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72"
143144
}

src/app/app-routing.module.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,14 @@ import { IndividualDashboardComponent } from './modules/individual-contributor/c
99
import { CorporateDashboardComponent } from './modules/corporate-contributor/container/corporate-dashboard/corporate-dashboard.component';
1010
import { ClaRequestAuthorizationComponent } from './modules/corporate-contributor/container/cla-request-authorization/cla-request-authorization.component';
1111
import { GerritDashboardComponent } from './modules/dashboard/container/gerrit-dashboard/gerrit-dashboard.component';
12-
import { AuthComponent } from './shared/components/auth/auth.component';
12+
import { AuthDashboardComponent } from './modules/dashboard/container/auth-dashboard/auth-dashboard.component';
1313

1414

1515
const routes: Routes = [
1616
{
1717
path: '',
1818
pathMatch: 'full',
19-
redirectTo: '/cla'
20-
},
21-
{
22-
path: 'auth',
23-
pathMatch: 'full',
24-
component: AuthComponent
19+
component: AuthDashboardComponent
2520
},
2621
{
2722
path: 'cla/project/:projectId/user/:userId',

src/app/app.component.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
import { Component } from '@angular/core';
55
import { environment } from 'src/environments/environment';
6+
import { AuthService } from './shared/services/auth.service';
7+
import { ActivatedRoute } from '@angular/router';
68

79
@Component({
810
selector: 'app-root',
@@ -14,13 +16,16 @@ export class AppComponent {
1416
hasExpanded: boolean;
1517
links: any[];
1618

19+
constructor(private auth:AuthService, private route: ActivatedRoute){}
20+
1721
onToggled() {
1822
this.hasExpanded = !this.hasExpanded;
1923
}
2024

2125
ngOnInit() {
2226
this.mountHeader();
2327
this.hasExpanded = true;
28+
console.log(this.isIncognito())
2429
}
2530

2631
private mountHeader(): void {
@@ -29,4 +34,14 @@ export class AppComponent {
2934
script.setAttribute('async', 'true');
3035
document.head.appendChild(script);
3136
}
37+
38+
private isIncognito():boolean {
39+
try {
40+
localStorage.setItem('test', 'test');
41+
localStorage.removeItem('test');
42+
return false; // If no error, likely not incognito
43+
} catch (e) {
44+
return true; // If an error occurs, likely incognito
45+
}
46+
}
3247
}

src/app/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { InterceptorService } from './shared/services/interceptor.service';
3232
DashboardModule,
3333
IndividualContributorModule,
3434
CorporateContributorModule,
35-
FormsModule
35+
FormsModule,
3636
],
3737
providers: [
3838
{

src/app/modules/corporate-contributor/component/configure-cla-manager-modal/configure-cla-manager-modal.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@ export class ConfigureClaManagerModalComponent implements OnInit {
282282
this.modalService.dismissAll();
283283
this.loaderService.show();
284284
const corporateUrl = this.claContributorService.getLFXCorporateURL();
285-
console.log('corporateURL: ', corporateUrl);
286285
if (corporateUrl !== '') {
287286
this.storageService.removeItem(AppSettings.ACTION_TYPE);
288287
window.open(corporateUrl, '_self');

src/app/modules/corporate-contributor/container/cla-request-authorization/cla-request-authorization.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- Copyright The Linux Foundation and each contributor to CommunityBridge.
22
SPDX-License-Identifier: MIT -->
33

4-
<app-project-title [projectId]="projectId" [userId]="userId"></app-project-title>
4+
<app-project-title></app-project-title>
55

66
<div class="col-12 corporate-dashboard">
77
<div class="container">

src/app/modules/corporate-contributor/container/corporate-dashboard/corporate-dashboard.component.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
<!-- Copyright The Linux Foundation and each contributor to CommunityBridge.
22
SPDX-License-Identifier: MIT -->
33

4-
<app-project-title
5-
[projectId]="projectId"
6-
[userId]="userId"
7-
></app-project-title>
8-
94
<div class="col-12 corporate-dashboard">
105
<div class="container">
116
<div class="row justify-content-center align-items-center">
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>auth-dashboard works!</p>

src/app/modules/dashboard/container/auth-dashboard/auth-dashboard.component.scss

Whitespace-only changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { AuthDashboardComponent } from './auth-dashboard.component';
4+
5+
describe('AuthDashboardComponent', () => {
6+
let component: AuthDashboardComponent;
7+
let fixture: ComponentFixture<AuthDashboardComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
declarations: [ AuthDashboardComponent ]
12+
})
13+
.compileComponents();
14+
});
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(AuthDashboardComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});

0 commit comments

Comments
 (0)