This commit is contained in:
Joe Milazzo 2023-11-20 07:03:34 -06:00 committed by GitHub
parent 1d261a5a7c
commit 65ccdc7301
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 375 additions and 590 deletions

View file

@ -1,5 +1,5 @@
<ng-container *transloco="let t; read: 'pdf-reader'">
<div class="{{theme}}" *ngIf="accountService.currentUser$ | async as user">
<div class="{{theme}}" *ngIf="accountService.currentUser$ | async as user" #container>
<ng-container *ngIf="isLoading">
<div class="loading mx-auto" style="min-width: 200px; width: 600px;">

View file

@ -1,10 +1,10 @@
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
Component, ElementRef,
HostListener,
inject, OnDestroy,
OnInit
OnInit, ViewChild
} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { NgxExtendedPdfViewerService, PageViewModeType, ProgressBarEvent, NgxExtendedPdfViewerModule } from 'ngx-extended-pdf-viewer';
@ -33,6 +33,8 @@ import {translate, TranslocoDirective} from "@ngneat/transloco";
})
export class PdfReaderComponent implements OnInit, OnDestroy {
@ViewChild('container') container!: ElementRef;
libraryId!: number;
seriesId!: number;
volumeId!: number;
@ -111,6 +113,7 @@ export class PdfReaderComponent implements OnInit, OnDestroy {
this.navService.showNavBar();
this.navService.showSideNav();
this.readerService.disableWakeLock();
}
ngOnInit(): void {
@ -166,7 +169,7 @@ export class PdfReaderComponent implements OnInit, OnDestroy {
}
this.cdRef.markForCheck();
});
this.readerService.enableWakeLock(this.container.nativeElement);
}
/**