Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-peruzzo committed Oct 9, 2024
1 parent 9cc69d4 commit 6e1435f
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/account/containers/template/template.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class DynamicPageInjectorComponent {

@Component({
selector: 'kc-root',
templateUrl: './template.component.html',
templateUrl: 'template.component.html',
standalone: true,
imports: [AsyncPipe, KcSanitizePipe, NgTemplateOutlet, KcClassDirective, NgClass, DynamicPageInjectorComponent],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type { I18n } from '@keycloakify/angular/login/i18n';
standalone: true,
imports: [KcClassDirective],
changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: './logout-other-sessions.component.html',
templateUrl: 'logout-other-sessions.component.html',
providers: [
{
provide: ComponentReference,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type { I18n } from '@keycloakify/angular/login/i18n';
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [KcClassDirective, AsyncPipe],
templateUrl: './password-wrapper.component.html',
templateUrl: 'password-wrapper.component.html',
providers: [
{
provide: ComponentReference,
Expand Down
14 changes: 7 additions & 7 deletions src/login/containers/template/template.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class DynamicPageInjectorComponent {

@Component({
selector: 'kc-root',
templateUrl: './template.component.html',
templateUrl: 'template.component.html',
standalone: true,
imports: [AsyncPipe, KcSanitizePipe, NgTemplateOutlet, KcClassDirective, DynamicPageInjectorComponent],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down Expand Up @@ -128,14 +128,14 @@ export class TemplateComponent extends ComponentReference implements OnInit {
}

onComponentCreated(compRef: object) {
if ('displayInfo' in compRef && compRef.displayInfo) {
this.displayInfo = compRef.displayInfo as boolean;
if ('displayInfo' in compRef) {
this.displayInfo = !!compRef.displayInfo as boolean;
}
if ('displayMessage' in compRef && compRef.displayMessage) {
this.displayMessage = compRef.displayMessage as boolean;
if ('displayMessage' in compRef) {
this.displayMessage = !!compRef.displayMessage as boolean;
}
if ('displayRequiredFields' in compRef && compRef.displayRequiredFields) {
this.displayRequiredFields = compRef.displayRequiredFields as boolean;
if ('displayRequiredFields' in compRef) {
this.displayRequiredFields = !!compRef.displayRequiredFields as boolean;
}
if ('documentTitle' in compRef && compRef.documentTitle) {
this.documentTitle = compRef.documentTitle as string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ChangeDetectionStrategy, Component, forwardRef, inject, type TemplateRef, viewChild } from '@angular/core';
import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';
import { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';
import { TemplateComponent } from '@keycloakify/angular/login/containers/template';
import { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';
import type { I18n } from '@keycloakify/angular/login/i18n';
import type { KcContext } from '@keycloakify/angular/login/KcContext';
Expand All @@ -12,7 +11,7 @@ import type { ClassKey } from 'keycloakify/login/lib/kcClsx';

@Component({
standalone: true,
imports: [TemplateComponent, KcClassDirective],
imports: [KcClassDirective],
selector: 'kc-delete-account-confirm',
templateUrl: 'delete-account-confirm.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
2 changes: 1 addition & 1 deletion src/login/pages/login-username/login-username.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type { ClassKey } from 'keycloakify/login/lib/kcClsx';

@Component({
selector: 'kc-login-username',
templateUrl: './login-username.component.html',
templateUrl: 'login-username.component.html',
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [KcClassDirective, AsyncPipe, KcSanitizePipe, NgClass],
Expand Down
2 changes: 1 addition & 1 deletion src/login/pages/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type { ClassKey } from 'keycloakify/login/lib/kcClsx';

@Component({
selector: 'kc-login',
templateUrl: './login.component.html',
templateUrl: 'login.component.html',
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [KcClassDirective, AsyncPipe, KcSanitizePipe, PasswordWrapperComponent, NgClass, CommonModule],
Expand Down
2 changes: 1 addition & 1 deletion src/login/pages/register/register.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import type { ClassKey } from 'keycloakify/login/lib/kcClsx';

@Component({
selector: 'kc-register',
templateUrl: './register.component.html',
templateUrl: 'register.component.html',
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [KcClassDirective, AsyncPipe, KcSanitizePipe, NgClass, NgComponentOutlet],
Expand Down

0 comments on commit 6e1435f

Please sign in to comment.