mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
a couple adjustments for the document viewer.
This commit is contained in:
parent
e77be6a2ed
commit
1c4d19198f
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 col-xl-4 mb-4">
|
<div class="col mb-4">
|
||||||
|
|
||||||
<form [formGroup]='documentForm' (ngSubmit)="save()">
|
<form [formGroup]='documentForm' (ngSubmit)="save()">
|
||||||
|
|
||||||
@ -172,8 +172,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6 col-xl-8 mb-3">
|
<div class="col-md-6 col-xl-8 mb-3">
|
||||||
<div class="pdf-viewer-container">
|
<div class="pdf-viewer-container" *ngIf="getContentType() == 'application/pdf'">
|
||||||
<pdf-viewer [src]="previewUrl" [original-size]="false" [show-borders]="false"></pdf-viewer>
|
<pdf-viewer [src]="previewUrl" [original-size]="false" [show-borders]="true"></pdf-viewer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,7 +2,5 @@
|
|||||||
height: calc(100vh - 160px);
|
height: calc(100vh - 160px);
|
||||||
top: 70px;
|
top: 70px;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
padding: 10px;
|
|
||||||
background-color: gray;
|
background-color: gray;
|
||||||
overflow-y: scroll;
|
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,10 @@ export class DocumentDetailComponent implements OnInit {
|
|||||||
private documentListViewService: DocumentListViewService,
|
private documentListViewService: DocumentListViewService,
|
||||||
private titleService: Title) { }
|
private titleService: Title) { }
|
||||||
|
|
||||||
|
getContentType() {
|
||||||
|
return this.metadata?.has_archive_version ? 'application/pdf' : this.metadata?.original_mime_type
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.documentForm.valueChanges.subscribe(wow => {
|
this.documentForm.valueChanges.subscribe(wow => {
|
||||||
Object.assign(this.document, this.documentForm.value)
|
Object.assign(this.document, this.documentForm.value)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user