Remove individual spinners from dashboard page
This commit is contained in:
+3
-7
@@ -1,17 +1,13 @@
|
||||
<p class="dashboard-scroller-title">{{ title }}</p>
|
||||
|
||||
<div *ngIf="isLoading">
|
||||
<p-progressSpinner></p-progressSpinner>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-scroller-no-books" *ngIf="!isLoading && (!books || books.length === 0)">
|
||||
<div class="dashboard-scroller-no-books" *ngIf="!books || books.length === 0">
|
||||
<p class="text-sm">
|
||||
{{ bookListType === 'lastRead' ? "You haven't read any books yet!" : "No books have been added to BookLore!" }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-scroller-infinite"
|
||||
*ngIf="!isLoading && books"
|
||||
*ngIf="books"
|
||||
infiniteScroll
|
||||
[infiniteScrollDistance]="2"
|
||||
[infiniteScrollThrottle]="50"
|
||||
@@ -24,6 +20,6 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="!isLoading && books === null">
|
||||
<div *ngIf=" books === null">
|
||||
<p class="text-sm">Failed to load books! :(</p>
|
||||
</div>
|
||||
|
||||
+1
-15
@@ -18,7 +18,7 @@ import {Book} from '../../../book/model/book.model';
|
||||
],
|
||||
standalone: true
|
||||
})
|
||||
export class DashboardScrollerComponent implements OnInit, OnChanges {
|
||||
export class DashboardScrollerComponent {
|
||||
|
||||
@Input() bookListType: 'lastRead' | null = null;
|
||||
@Input() title: string = 'Last Read Books';
|
||||
@@ -26,18 +26,4 @@ export class DashboardScrollerComponent implements OnInit, OnChanges {
|
||||
|
||||
@ViewChild('scrollContainer') scrollContainer!: ElementRef;
|
||||
|
||||
|
||||
isLoading = true;
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.books !== undefined) {
|
||||
this.isLoading = false;
|
||||
}
|
||||
}
|
||||
|
||||
ngOnChanges(): void {
|
||||
if (this.books !== undefined) {
|
||||
this.isLoading = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user