|
|
|
@ -25,6 +25,18 @@ export class LoginComponent implements OnInit {
|
|
|
|
|
constructor(private authService: AuthService, private router: Router, private notify: NotificationService, private status: StatusService,
|
|
|
|
|
private fb: FormBuilder, private settingsService: SettingsService, private images: ImageService, private sanitizer: DomSanitizer,
|
|
|
|
|
private route: ActivatedRoute) {
|
|
|
|
|
this.route.params
|
|
|
|
|
.subscribe(params => {
|
|
|
|
|
this.landingFlag = params.landing;
|
|
|
|
|
if (this.landingFlag === false) {
|
|
|
|
|
this.settingsService.getLandingPage().subscribe(x => {
|
|
|
|
|
if (x.enabled && !this.landingFlag) {
|
|
|
|
|
this.router.navigate(["landingpage"]);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.form = this.fb.group({
|
|
|
|
|
username: ["", [Validators.required]],
|
|
|
|
|
password: ["", [Validators.required]],
|
|
|
|
@ -36,19 +48,9 @@ export class LoginComponent implements OnInit {
|
|
|
|
|
this.router.navigate(["Wizard"]);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.route.params
|
|
|
|
|
.subscribe(params => {
|
|
|
|
|
this.landingFlag = params.landing;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ngOnInit() {
|
|
|
|
|
this.settingsService.getLandingPage().subscribe(x => {
|
|
|
|
|
if (x.enabled && !this.landingFlag) {
|
|
|
|
|
this.router.navigate(["landingpage"]);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.settingsService.getCustomization().subscribe(x => this.customizationSettings = x);
|
|
|
|
|
this.images.getRandomBackground().subscribe(x => {
|
|
|
|
|
this.background = this.sanitizer.bypassSecurityTrustStyle("linear-gradient(-10deg, transparent 20%, rgba(0,0,0,0.7) 20.0%, rgba(0,0,0,0.7) 80.0%, transparent 80%),url(" + x.url + ")");
|
|
|
|
|