diff --git a/frontend/src/app/features/author-browser/components/author-detail/author-detail.component.html b/frontend/src/app/features/author-browser/components/author-detail/author-detail.component.html index 15cbb2cc0..0f43e7218 100644 --- a/frontend/src/app/features/author-browser/components/author-detail/author-detail.component.html +++ b/frontend/src/app/features/author-browser/components/author-detail/author-detail.component.html @@ -1,5 +1,5 @@ - @if (loading) { + @if (loading()) {
@@ -7,7 +7,7 @@
} - @if (!loading && author(); as author) { + @if (!loading() && author(); as author) {
diff --git a/frontend/src/app/features/author-browser/components/author-detail/author-detail.component.spec.ts b/frontend/src/app/features/author-browser/components/author-detail/author-detail.component.spec.ts index 1a9c71257..6124bd4c2 100644 --- a/frontend/src/app/features/author-browser/components/author-detail/author-detail.component.spec.ts +++ b/frontend/src/app/features/author-browser/components/author-detail/author-detail.component.spec.ts @@ -144,7 +144,7 @@ describe('AuthorDetailComponent', () => { expect(getAuthorDetails).toHaveBeenCalledWith(42); expect(component.tab).toBe('series'); - expect(component.loading).toBe(false); + expect(component.loading()).toBe(false); expect(component.author()).toEqual({...baseAuthor, id: 42, name: 'Grace Hopper'}); expect(setPageTitle).toHaveBeenCalledWith('Grace Hopper'); }); @@ -158,7 +158,7 @@ describe('AuthorDetailComponent', () => { component.ngOnInit(); expect(component.tab).toBe('books'); - expect(component.loading).toBe(false); + expect(component.loading()).toBe(false); expect(component.author()).toBeNull(); expect(setPageTitle).not.toHaveBeenCalled(); }); diff --git a/frontend/src/app/features/author-browser/components/author-detail/author-detail.component.ts b/frontend/src/app/features/author-browser/components/author-detail/author-detail.component.ts index d20967be3..15f637764 100644 --- a/frontend/src/app/features/author-browser/components/author-detail/author-detail.component.ts +++ b/frontend/src/app/features/author-browser/components/author-detail/author-detail.component.ts @@ -85,7 +85,7 @@ export class AuthorDetailComponent implements OnInit, AfterViewChecked { private readonly viewportWidth = signal(0); private viewportResizeObserver: ResizeObserver | undefined; - loading = true; + loading = signal(true); tab = 'books'; isExpanded = false; isOverflowing = false; @@ -199,11 +199,11 @@ export class AuthorDetailComponent implements OnInit, AfterViewChecked { this.authorService.getAuthorDetails(authorId).subscribe({ next: (author) => { this.authorState.set(author); - this.loading = false; + this.loading.set(false); this.pageTitle.setPageTitle(author.name); }, error: () => { - this.loading = false; + this.loading.set(false); } }); } diff --git a/frontend/src/app/features/book/components/book-browser/book-browser.component.html b/frontend/src/app/features/book/components/book-browser/book-browser.component.html index 4d7d9068a..e31ace2db 100644 --- a/frontend/src/app/features/book/components/book-browser/book-browser.component.html +++ b/frontend/src/app/features/book/components/book-browser/book-browser.component.html @@ -8,7 +8,7 @@

@if (entityType === EntityType.ALL_BOOKS) { - @if (currentFilterLabel() && rawFilterParamFromUrl) { + @if (currentFilterLabel() && rawFilterParamFromUrl()) { {{ currentFilterLabel() }} } @else if (isFilterActive() || hasSearchTerm()) { {{ computedFilterLabel() }} @@ -70,7 +70,7 @@ + (click)="columnPreferenceService.saveVisibleColumns(visibleColumns())">

} @@ -180,14 +180,14 @@ [pTooltip]="t('tooltip.selectSorting')" tooltipPosition="top"> - @if (sortCriteriaCount > 1) { - + @if (sortCriteriaCount() > 1) { + } @@ -215,7 +215,7 @@ type="text" pInputText [placeholder]="t('placeholder.search')" - [(ngModel)]="bookTitle" + [ngModel]="bookTitle()" (ngModelChange)="onSearchTermChange($event)" class="search-input-full" /> @@ -237,11 +237,11 @@ type="text" pInputText [placeholder]="t('placeholder.search')" - [(ngModel)]="bookTitle" + [ngModel]="bookTitle()" (ngModelChange)="onSearchTermChange($event)" class="search-input" /> - @if (bookTitle) { + @if (bookTitle()) { } @if (currentViewMode() === 'grid') { @@ -330,7 +330,7 @@ [index]="i" [book]="book" [isCheckboxEnabled]="true" - [seriesViewEnabled]="seriesViewEnabled" + [seriesViewEnabled]="seriesViewEnabled()" [onBookSelect]="onBookCardSelect" [isSeriesCollapsed]="seriesCollapseFilter.seriesCollapsed()" (checkboxClick)="onCheckboxClicked($event)" @@ -358,7 +358,7 @@