From a80826a0e4ba3585078c506b171c222bf628f92a Mon Sep 17 00:00:00 2001 From: deaflynx Date: Mon, 29 Sep 2025 10:50:32 +0300 Subject: [PATCH] Minor fix of tb-logo size. --- .../login/pages/login/login.component.html | 2 +- .../login/pages/login/login.component.scss | 12 ----------- .../app/shared/components/logo.component.scss | 21 ++++++++++++++++++- .../app/shared/components/logo.component.ts | 10 +++++++-- 4 files changed, 29 insertions(+), 16 deletions(-) diff --git a/ui-ngx/src/app/modules/login/pages/login/login.component.html b/ui-ngx/src/app/modules/login/pages/login/login.component.html index 25d860256b..5b4ec4b12f 100644 --- a/ui-ngx/src/app/modules/login/pages/login/login.component.html +++ b/ui-ngx/src/app/modules/login/pages/login/login.component.html @@ -21,7 +21,7 @@
- +
diff --git a/ui-ngx/src/app/modules/login/pages/login/login.component.scss b/ui-ngx/src/app/modules/login/pages/login/login.component.scss index 9453910744..2784335d7b 100644 --- a/ui-ngx/src/app/modules/login/pages/login/login.component.scss +++ b/ui-ngx/src/app/modules/login/pages/login/login.component.scss @@ -38,18 +38,6 @@ .tb-action-button{ padding: 20px 0 16px; } - - .login-logo { - width: 280px; - height: 60px; - text-decoration: none; - border: none; - transform: none; - - &:focus { - outline: 0; - } - } } .oauth-container{ diff --git a/ui-ngx/src/app/shared/components/logo.component.scss b/ui-ngx/src/app/shared/components/logo.component.scss index 84be9a21df..8621cfdbae 100644 --- a/ui-ngx/src/app/shared/components/logo.component.scss +++ b/ui-ngx/src/app/shared/components/logo.component.scss @@ -15,7 +15,26 @@ */ :host { pointer-events: auto; - img { + a img { + display: block; + width: 100%; height: 100%; } } + +:host.login-logo { + display: inline-block; + width: 280px; + height: 60px; + a { + display: inline-block; + width: 100%; + height: 100%; + text-decoration: none; + border: none; + transform: none; + &:focus { + outline: 0; + } + } +} diff --git a/ui-ngx/src/app/shared/components/logo.component.ts b/ui-ngx/src/app/shared/components/logo.component.ts index fa8efb8ff8..4d53ec6ced 100644 --- a/ui-ngx/src/app/shared/components/logo.component.ts +++ b/ui-ngx/src/app/shared/components/logo.component.ts @@ -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); } }