WebP Support (#581)
* Added trackby so when series scan event comes through, cards can update too * Added chapter boundary toasts on book reader * Handle closing the reader when in a reading list * Somehow the trackby save didn't happen * Fixed an issue where after opening a chapter info modal, then trying to open another in specials tab it would fail due to a pass by reference issue with our factory. * When a series update occurs, if we loose specials tab, but we were on it, reselect volumes/chapters tab * Fixed an issue where older releases would show as available, even though they were already installed. * Converted tabs within modals to use vertical orientation (except on mobile) * Implemented webp support. Only Safari does not support this format natively. MacOS users can use an alternative browser. * Refactored ScannerService and MetadataService to be fully async
This commit is contained in:
parent
d92cfb0b2b
commit
2725e6042b
17 changed files with 102 additions and 65 deletions
|
|
@ -172,8 +172,6 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
*/
|
||||
lastSeenScrollPartPath: string = '';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Hack: Override background color for reader and restore it onDestroy
|
||||
*/
|
||||
|
|
@ -479,10 +477,10 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
if (this.nextChapterId === CHAPTER_ID_NOT_FETCHED || this.nextChapterId === this.chapterId) {
|
||||
this.readerService.getNextChapter(this.seriesId, this.volumeId, this.chapterId, this.readingListId).pipe(take(1)).subscribe(chapterId => {
|
||||
this.nextChapterId = chapterId;
|
||||
this.loadChapter(chapterId, 'next');
|
||||
this.loadChapter(chapterId, 'Next');
|
||||
});
|
||||
} else {
|
||||
this.loadChapter(this.nextChapterId, 'next');
|
||||
this.loadChapter(this.nextChapterId, 'Next');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -502,14 +500,14 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
if (this.prevChapterId === CHAPTER_ID_NOT_FETCHED || this.prevChapterId === this.chapterId) {
|
||||
this.readerService.getPrevChapter(this.seriesId, this.volumeId, this.chapterId, this.readingListId).pipe(take(1)).subscribe(chapterId => {
|
||||
this.prevChapterId = chapterId;
|
||||
this.loadChapter(chapterId, 'prev');
|
||||
this.loadChapter(chapterId, 'Prev');
|
||||
});
|
||||
} else {
|
||||
this.loadChapter(this.prevChapterId, 'prev');
|
||||
this.loadChapter(this.prevChapterId, 'Prev');
|
||||
}
|
||||
}
|
||||
|
||||
loadChapter(chapterId: number, direction: 'next' | 'prev') {
|
||||
loadChapter(chapterId: number, direction: 'Next' | 'Prev') {
|
||||
if (chapterId >= 0) {
|
||||
this.chapterId = chapterId;
|
||||
this.continuousChaptersStack.push(chapterId);
|
||||
|
|
@ -517,11 +515,12 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
const newRoute = this.readerService.getNextChapterUrl(this.router.url, this.chapterId, this.incognitoMode, this.readingListMode, this.readingListId);
|
||||
window.history.replaceState({}, '', newRoute);
|
||||
this.init();
|
||||
this.toastr.info(direction + ' chapter loaded', '', {timeOut: 3000});
|
||||
} else {
|
||||
// This will only happen if no actual chapter can be found
|
||||
this.toastr.warning('Could not find ' + direction + ' chapter');
|
||||
this.isLoading = false;
|
||||
if (direction === 'prev') {
|
||||
if (direction === 'Prev') {
|
||||
this.prevPageDisabled = true;
|
||||
} else {
|
||||
this.nextPageDisabled = true;
|
||||
|
|
@ -535,7 +534,11 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
}
|
||||
|
||||
closeReader() {
|
||||
this.location.back();
|
||||
if (this.readingListMode) {
|
||||
this.router.navigateByUrl('lists/' + this.readingListId);
|
||||
} else {
|
||||
this.location.back();
|
||||
}
|
||||
}
|
||||
|
||||
resetSettings() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue