feat: chapter changing and manga scaling

This commit is contained in:
2024-07-07 22:18:13 +03:00
parent 8f5f12ad30
commit 29fb7fd04d
9 changed files with 209 additions and 39 deletions

View File

@@ -27,6 +27,7 @@ export class DetailComponent implements AfterViewInit {
});
this.searchService.getChapters(url).subscribe((data) => {
this.chapters = data;
console.log(data);
});
}
@@ -41,13 +42,13 @@ export class DetailComponent implements AfterViewInit {
});
}
goToReader() {
//TODO: Not only first chapter
goToReader(chapter: string = "1", volume: string = "1") {
console.log(chapter, volume);
this.router.navigate(["/", "reader"], {
queryParams: {
url: this.detail_item?.slug_url,
chapter: this.chapters.data[0].number,
volume: this.chapters.data[0].volume,
chapter: +chapter,
volume: +volume,
},
});
}