Implements Lazy Loading
This commit is contained in:
@@ -22,7 +22,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 { User } from '../../shared/model/user/user.model';
|
||||
import UserChecker from '../../shared/model/user/user.checker';
|
||||
import { HelpComponent } from '../header-popup/help/help.component';
|
||||
@@ -96,25 +96,25 @@ export class HeaderDropdownComponent implements OnInit, OnDestroy {
|
||||
private userSubscription!: Subscription;
|
||||
|
||||
@Input()
|
||||
state: boolean = false;
|
||||
state: boolean = false;
|
||||
|
||||
@Input()
|
||||
ignoreClickOutside!: HTMLDivElement[];
|
||||
ignoreClickOutside!: HTMLDivElement[];
|
||||
|
||||
@Output()
|
||||
clickOutside = new EventEmitter();
|
||||
clickOutside = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
loginPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
loginPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
signupPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
signupPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
helpPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
helpPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
myProfilePopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
myProfilePopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
|
||||
constructor(
|
||||
private viewContainerRef: ViewContainerRef,
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import { faUser } from '@fortawesome/free-solid-svg-icons';
|
||||
import { SliderItemComponent } from 'src/app/shared/components/slider-item/slider-item.component';
|
||||
import UserChecker from '../../../shared/model/user/user.checker';
|
||||
import { User } from '../../../shared/model/user/user.model';
|
||||
import { AuthService } from '../../../shared/auth/auth.service';
|
||||
import { AuthService } from '../../../shared/service/auth.service';
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
@@ -25,14 +25,14 @@ export class NavSliderComponent
|
||||
userIcon = faUser;
|
||||
|
||||
@Input()
|
||||
pages!: { name: string; route: string }[];
|
||||
pages!: { name: string; route: string }[];
|
||||
|
||||
loggedUser!: User | null;
|
||||
|
||||
private userSubscription!: Subscription;
|
||||
|
||||
@Output()
|
||||
profileButtonClicked = new EventEmitter();
|
||||
profileButtonClicked = new EventEmitter();
|
||||
|
||||
constructor(private authService: AuthService) {
|
||||
super();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { AuthService } from 'src/app/shared/auth/auth.service';
|
||||
import { AuthService } from 'src/app/shared/service/auth.service';
|
||||
import { SliderItemComponent } from 'src/app/shared/components/slider-item/slider-item.component';
|
||||
import UserChecker from 'src/app/shared/model/user/user.checker';
|
||||
import { User } from 'src/app/shared/model/user/user.model';
|
||||
@@ -52,16 +52,16 @@ export class UserSliderComponent extends SliderItemComponent implements OnInit {
|
||||
authSubscription!: Subscription;
|
||||
|
||||
@Output()
|
||||
loginPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
loginPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
signupPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
signupPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
helpPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
helpPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
myProfilePopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
myProfilePopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
|
||||
constructor(private authService: AuthService) {
|
||||
super();
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
import { faUser } from '@fortawesome/free-solid-svg-icons';
|
||||
import { LoginComponent } from './header-popup/login/login.component';
|
||||
import { SignupComponent } from './header-popup/signup/signup.component';
|
||||
import { AuthService } from '../shared/auth/auth.service';
|
||||
import { AuthService } from '../shared/service/auth.service';
|
||||
import UserChecker from '../shared/model/user/user.checker';
|
||||
import { User } from '../shared/model/user/user.model';
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
Reference in New Issue
Block a user