Wake Lock (#2444)
This commit is contained in:
parent
1d261a5a7c
commit
65ccdc7301
11 changed files with 375 additions and 590 deletions
|
|
@ -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;">
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue