Fix loading indicator
This commit is contained in:
parent
d3747f40f2
commit
014c24b8cf
@ -240,7 +240,7 @@
|
||||
</div>
|
||||
|
||||
<ng-template #previewContent>
|
||||
<div *ngIf="previewLoading" class="w-100 h-100 d-flex align-items-center justify-content-center">
|
||||
<div *ngIf="!metadata" class="w-100 h-100 d-flex align-items-center justify-content-center">
|
||||
<div>
|
||||
<div class="spinner-border spinner-border-sm me-2" role="status"></div>
|
||||
<ng-container i18n>Loading...</ng-container>
|
||||
@ -255,7 +255,6 @@
|
||||
[showBorders]="false"
|
||||
[zoom]="previewZoomSetting"
|
||||
(pagesLoaded)="onPagesLoaded($event)"
|
||||
(pdfLoadingStarts)="onPdfLoadingStarts()"
|
||||
(pdfLoadingFailed)="onPdfLoadingFailed($event)"
|
||||
(beforePrint)="onBeforePrint()"
|
||||
(afterPrint)="onAfterPrint()"
|
||||
|
@ -157,7 +157,6 @@ export class DocumentDetailComponent
|
||||
previewCurrentPage: number = 1
|
||||
previewNumPages: number = 1
|
||||
previewZoomSetting: ZoomSetting = ZoomSetting.Width
|
||||
previewLoading: boolean = true
|
||||
|
||||
printLoadingModal: NgbModalRef
|
||||
|
||||
@ -451,8 +450,6 @@ export class DocumentDetailComponent
|
||||
.subscribe({
|
||||
next: (result) => {
|
||||
this.metadata = result
|
||||
if (this.getContentType() !== 'application/pdf')
|
||||
this.previewLoading = false
|
||||
},
|
||||
error: (error) => {
|
||||
this.metadata = null
|
||||
@ -774,10 +771,6 @@ export class DocumentDetailComponent
|
||||
})
|
||||
}
|
||||
|
||||
onPdfLoadingStarts() {
|
||||
this.previewLoading = false
|
||||
}
|
||||
|
||||
onPagesLoaded(event: PagesLoadedEvent) {
|
||||
this.previewNumPages = event.pagesCount
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user