Browse Source

Minor fix of tb-logo size.

pull/14057/head
deaflynx 1 year ago
parent
commit
a80826a0e4
  1. 2
      ui-ngx/src/app/modules/login/pages/login/login.component.html
  2. 12
      ui-ngx/src/app/modules/login/pages/login/login.component.scss
  3. 21
      ui-ngx/src/app/shared/components/logo.component.scss
  4. 10
      ui-ngx/src/app/shared/components/logo.component.ts

2
ui-ngx/src/app/modules/login/pages/login/login.component.html

@ -21,7 +21,7 @@
<form class="tb-login-form" [formGroup]="loginFormGroup" (ngSubmit)="login()">
<fieldset class="flex flex-col">
<div class="flex flex-col items-center justify-start" style="padding: 15px 0;">
<tb-logo isLogin class="login-logo"></tb-logo>
<tb-logo isLogin></tb-logo>
</div>
<mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">
</mat-progress-bar>

12
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{

21
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;
}
}
}

10
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);
}
}

Loading…
Cancel
Save