Implements Lazy Loading
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AuthService } from 'src/app/shared/auth/auth.service';
|
||||
import { AuthService } from 'src/app/shared/service/auth.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-callback',
|
||||
@@ -19,15 +19,15 @@ export class CallbackComponent implements OnInit {
|
||||
let auth: 'google' | 'github' = p['auth'];
|
||||
|
||||
switch (auth) {
|
||||
case 'github':
|
||||
this.authService.loginGithubUser(p);
|
||||
break;
|
||||
case 'google':
|
||||
this.authService.loginGoogleUser(p);
|
||||
break;
|
||||
default:
|
||||
console.log(`Unimplemented auth: ${auth}`);
|
||||
break;
|
||||
case 'github':
|
||||
this.authService.loginGithubUser(p);
|
||||
break;
|
||||
case 'google':
|
||||
this.authService.loginGoogleUser(p);
|
||||
break;
|
||||
default:
|
||||
console.log(`Unimplemented auth: ${auth}`);
|
||||
break;
|
||||
}
|
||||
|
||||
this.router.navigate(['/home']);
|
||||
|
||||
@@ -13,7 +13,7 @@ import { MatIconRegistry } from '@angular/material/icon';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { faLock, faUser } from '@fortawesome/free-solid-svg-icons';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { AuthService } from 'src/app/shared/auth/auth.service';
|
||||
import { AuthService } from 'src/app/shared/service/auth.service';
|
||||
import { HttpError } from 'src/app/shared/model/httpError/httpError.model';
|
||||
import HttpErrorChecker from 'src/app/shared/model/httpError/httpErrorChecker';
|
||||
import UserChecker from 'src/app/shared/model/user/user.checker';
|
||||
@@ -99,13 +99,13 @@ const GITHUB_LOGO_SVG = 'assets/img/providers/github.svg';
|
||||
})
|
||||
export class LoginComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
@Input()
|
||||
state: boolean = false;
|
||||
state: boolean = false;
|
||||
|
||||
@Input()
|
||||
ignoreClickOutside!: HTMLDivElement[];
|
||||
ignoreClickOutside!: HTMLDivElement[];
|
||||
|
||||
@Output()
|
||||
stateChange = new EventEmitter<boolean>();
|
||||
stateChange = new EventEmitter<boolean>();
|
||||
|
||||
loginForm!: FormGroup;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
OnInit,
|
||||
Output,
|
||||
} from '@angular/core';
|
||||
import { AuthService } from '../../../shared/auth/auth.service';
|
||||
import { AuthService } from '../../../shared/service/auth.service';
|
||||
import { User } from '../../../shared/model/user/user.model';
|
||||
import {
|
||||
animate,
|
||||
@@ -88,16 +88,16 @@ import { faFileUpload } from '@fortawesome/free-solid-svg-icons';
|
||||
})
|
||||
export class MyProfileComponent implements OnInit {
|
||||
@Input()
|
||||
state: boolean = false;
|
||||
state: boolean = false;
|
||||
|
||||
@Input()
|
||||
user!: User | null;
|
||||
user!: User | null;
|
||||
|
||||
@Input()
|
||||
ignoreClickOutside!: HTMLDivElement[];
|
||||
ignoreClickOutside!: HTMLDivElement[];
|
||||
|
||||
@Output()
|
||||
stateChange = new EventEmitter<boolean>();
|
||||
stateChange = new EventEmitter<boolean>();
|
||||
|
||||
alterForm!: FormGroup;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, Output } from '@angular/core';
|
||||
import { AuthService } from '../../../../shared/auth/auth.service';
|
||||
import { AuthService } from '../../../../shared/service/auth.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-profile-picture-picker',
|
||||
@@ -8,7 +8,7 @@ import { AuthService } from '../../../../shared/auth/auth.service';
|
||||
})
|
||||
export class ProfilePicturePickerComponent {
|
||||
@Output()
|
||||
imageSent = new EventEmitter<boolean>();
|
||||
imageSent = new EventEmitter<boolean>();
|
||||
|
||||
private profilePicture!: File;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
faUser,
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { AuthService } from 'src/app/shared/auth/auth.service';
|
||||
import { AuthService } from 'src/app/shared/service/auth.service';
|
||||
import { HttpError } from 'src/app/shared/model/httpError/httpError.model';
|
||||
import HttpErrorChecker from 'src/app/shared/model/httpError/httpErrorChecker';
|
||||
import UserChecker from 'src/app/shared/model/user/user.checker';
|
||||
@@ -90,13 +90,13 @@ const GITHUB_LOGO_SVG = 'assets/img/providers/github.svg';
|
||||
})
|
||||
export class SignupComponent implements OnInit {
|
||||
@Input()
|
||||
state: boolean = false;
|
||||
state: boolean = false;
|
||||
|
||||
@Input()
|
||||
ignoreClickOutside!: HTMLDivElement[];
|
||||
ignoreClickOutside!: HTMLDivElement[];
|
||||
|
||||
@Output()
|
||||
stateChange = new EventEmitter<boolean>();
|
||||
stateChange = new EventEmitter<boolean>();
|
||||
|
||||
signupForm!: FormGroup;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user