Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed Apr 22, 2024
1 parent 0fd5209 commit 3f70e01
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 316 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@if(card) {
<div class="card-image-container" *ngIf="display === 'images'">
<ion-img [src]="card.image" class="card-image" [ngClass]="[size]"></ion-img>
</div>
Expand All @@ -16,3 +17,4 @@
</ion-card-content>
</ion-card>
</div>
}
5 changes: 2 additions & 3 deletions src/app/_shared/components/cardicon/cardicon.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<ion-img [src]="'assets/icon/' + type.toLowerCase() + '.webp'"
[style.width]="size + 'px'"
[style.height]="size + 'px'"></ion-img>
<ion-img [src]="'assets/icon/' + type().toLowerCase() + '.webp'" [style.width]="size + 'px'"
[style.height]="size + 'px'"></ion-img>
6 changes: 3 additions & 3 deletions src/app/_shared/components/cardicon/cardicon.component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Component, Input } from '@angular/core';
import { Component, input } from '@angular/core';

@Component({
selector: 'app-cardicon',
templateUrl: './cardicon.component.html',
styleUrls: ['./cardicon.component.scss'],
})
export class CardIconComponent {
@Input() size = 24;
@Input() type = null;
public size = input<number>(24);
public type = input.required<string>();

constructor() {}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<ion-searchbar #search class="search themed" [ngClass]="[big() ? 'big' : '']" [debounce]="1000"
(ionChange)="type.emit(search.value)" searchIcon="''" (keyup.enter)="enter.emit(search.value)" [(ngModel)]="query"
placeholder="Search all of Leder Games..."></ion-searchbar>
(ionChange)="type.emit(searchFieldValue)" searchIcon="''" (keyup.enter)="enter.emit(searchFieldValue)"
[(ngModel)]="query" placeholder="Search all of Leder Games..."></ion-searchbar>
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
import { Component, effect, input, output } from '@angular/core';
import { Component, effect, input, output, ViewChild } from '@angular/core';
import { IonSearchbar } from '@ionic/angular';

@Component({
selector: 'app-omnisearch',
templateUrl: './omnisearch.component.html',
styleUrls: ['./omnisearch.component.scss'],
})
export class OmnisearchComponent {
@ViewChild(IonSearchbar) searchField!: IonSearchbar;

public query = '';

public big = input<boolean>(false);
public initialQuery = input<string>('');
public type = output<string>();
public enter = output<string>();

public get searchFieldValue(): string {
return this.searchField.value ?? '';
}

constructor() {
effect(() => {
this.query = this.initialQuery();
Expand Down
Loading

0 comments on commit 3f70e01

Please sign in to comment.