Fix shelf
This commit is contained in:
@@ -122,7 +122,6 @@ export class BookService {
|
||||
const url = `/pdf-viewer/book/${book.id}`;
|
||||
window.open(url, '_blank');
|
||||
this.updateLastReadTime(book.id).subscribe({
|
||||
next: () => console.log('Last read time updated successfully'),
|
||||
error: err => console.error('Failed to update last read time', err),
|
||||
});
|
||||
} else if (book.bookType === "EPUB") {
|
||||
@@ -151,7 +150,6 @@ export class BookService {
|
||||
}
|
||||
|
||||
getBookData(bookId: number): Observable<Blob> {
|
||||
console.log('Fetching book data...');
|
||||
return this.http.get<Blob>(`${this.url}/${bookId}/data`, {responseType: 'blob' as 'json'});
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,10 @@ export class ShelfService {
|
||||
private http = inject(HttpClient);
|
||||
private bookService = inject(BookService);
|
||||
|
||||
constructor() {
|
||||
this.loadShelves();
|
||||
}
|
||||
|
||||
private loadShelves(): void {
|
||||
this.http.get<Shelf[]>(this.url).pipe(
|
||||
catchError(error => {
|
||||
|
||||
@@ -72,9 +72,6 @@ export class SettingsComponent implements OnInit {
|
||||
populateSettings(settings: AppSettings): void {
|
||||
if (settings.pdf) {
|
||||
const pdfSettings = settings.pdf;
|
||||
console.log(pdfSettings)
|
||||
|
||||
|
||||
this.selectedSpread = this.spreads.find(s => s.key === pdfSettings.spread)?.key;
|
||||
this.selectedZoom = this.zooms.find(z => z.key === pdfSettings.zoom)?.key;
|
||||
this.showSidebar = pdfSettings.sidebar;
|
||||
@@ -83,8 +80,6 @@ export class SettingsComponent implements OnInit {
|
||||
if (settings.epub) {
|
||||
const epubSettings = settings.epub;
|
||||
this.selectedTheme = this.themes.find(t => t.key === epubSettings.theme)?.key;
|
||||
|
||||
console.log(epubSettings.fontSize)
|
||||
this.fontSize = parseInt(epubSettings.fontSize, 10);
|
||||
this.selectedFont = this.fonts.find(f => f.key === epubSettings.font)?.key;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ export class AppSettingsService {
|
||||
|
||||
this.http.put(this.apiUrl, null, { params }).subscribe({
|
||||
next: () => {
|
||||
console.log('Setting saved successfully');
|
||||
|
||||
},
|
||||
error: (error) => {
|
||||
console.error('Error saving setting:', error);
|
||||
|
||||
@@ -71,7 +71,6 @@ export class FileUploadComponent {
|
||||
this.isUploading = true;
|
||||
this.fileUploadService.uploadFile(file, libraryId, path).subscribe({
|
||||
next: () => {
|
||||
console.log('File uploaded successfully');
|
||||
this.toastService.showSuccess("File uploaded", file.name);
|
||||
this.isUploading = false;
|
||||
this.dynamicDialogRef.close();
|
||||
|
||||
Reference in New Issue
Block a user