no message
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
<div class="dashboard">
|
<div class="dashboard">
|
||||||
|
|
||||||
<div class="dashboard-no-library" *ngIf="libraryState$ | async; else dashboardScroller">
|
<div class="dashboard-no-library" *ngIf="isLibrariesEmpty$ | async; else dashboardScroller">
|
||||||
<h1 class="no-library-header">
|
<h1 class="no-library-header">
|
||||||
Looks like you haven't added a library yet. Let's add one!
|
Looks like you haven't added a library yet. Let's add one!
|
||||||
</h1>
|
</h1>
|
||||||
|
|||||||
@@ -28,13 +28,15 @@ export class MainDashboardComponent implements OnInit {
|
|||||||
ref: DynamicDialogRef | undefined;
|
ref: DynamicDialogRef | undefined;
|
||||||
|
|
||||||
private bookService = inject(BookService);
|
private bookService = inject(BookService);
|
||||||
private libraryService = inject(LibraryService);
|
|
||||||
private dialogService = inject(DialogService);
|
private dialogService = inject(DialogService);
|
||||||
|
|
||||||
lastReadBooks$: Observable<Book[]> | undefined;
|
lastReadBooks$: Observable<Book[]> | undefined;
|
||||||
latestAddedBooks$: Observable<Book[]> | undefined;
|
latestAddedBooks$: Observable<Book[]> | undefined;
|
||||||
randomBooks$: Observable<Book[]> | undefined;
|
randomBooks$: Observable<Book[]> | undefined;
|
||||||
libraryState$: Observable<LibraryState> | undefined = this.libraryService.libraryState$;
|
|
||||||
|
isLibrariesEmpty$: Observable<boolean> = inject(LibraryService).libraryState$.pipe(
|
||||||
|
map(state => !state.libraries || state.libraries.length === 0)
|
||||||
|
);
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.bookService.loadBooks();
|
this.bookService.loadBooks();
|
||||||
|
|||||||
Reference in New Issue
Block a user