|
|
|
@ -14,7 +14,7 @@ |
|
|
|
/// limitations under the License.
|
|
|
|
///
|
|
|
|
|
|
|
|
import { Component, Input, OnInit } from '@angular/core'; |
|
|
|
import { Component, Input, OnInit, HostBinding } from '@angular/core'; |
|
|
|
import { coerceBoolean } from '@shared/decorators/coercion'; |
|
|
|
import { AuthService } from '@core/auth/auth.service'; |
|
|
|
import { AppState } from '@core/core.state'; |
|
|
|
@ -30,6 +30,11 @@ import { UrlHolder } from '@shared/pipe/image.pipe'; |
|
|
|
}) |
|
|
|
export class LogoComponent implements OnInit { |
|
|
|
|
|
|
|
@HostBinding('class.login-logo') |
|
|
|
get isLoginLogoClass() { |
|
|
|
return this.isLogin; |
|
|
|
} |
|
|
|
|
|
|
|
@Input() |
|
|
|
@coerceBoolean() |
|
|
|
isLogin: boolean = false; |
|
|
|
@ -45,7 +50,8 @@ export class LogoComponent implements OnInit { |
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
if (!this.isLogin) { |
|
|
|
this.logoLink = this.authService.defaultUrl(true, getCurrentAuthState(this.store)); |
|
|
|
const authState = getCurrentAuthState(this.store); |
|
|
|
this.logoLink = this.authService.defaultUrl(true, authState); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|