mirror of
https://github.com/booklore-app/booklore.git
synced 2026-02-18 00:17:53 +01:00
no message
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<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">
|
||||
Looks like you haven't added a library yet. Let's add one!
|
||||
</h1>
|
||||
|
||||
@@ -28,13 +28,15 @@ export class MainDashboardComponent implements OnInit {
|
||||
ref: DynamicDialogRef | undefined;
|
||||
|
||||
private bookService = inject(BookService);
|
||||
private libraryService = inject(LibraryService);
|
||||
private dialogService = inject(DialogService);
|
||||
|
||||
lastReadBooks$: Observable<Book[]> | undefined;
|
||||
latestAddedBooks$: 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 {
|
||||
this.bookService.loadBooks();
|
||||
|
||||
Reference in New Issue
Block a user