A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Remove metadata API calls
Michael Shamoone61f0425476c
diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.htmlindex 71dac6a57..cf969ddbe 100644--- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html+++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html@@ -52,12 +52,7 @@</svg> <span class="d-block d-md-inline" i18n>View</span></a><ng-template #previewContent>- <ng-container *ngIf="getContentType() == 'application/pdf'">- <object [data]="previewUrl | safe" class="preview" width="100%"></object>- </ng-container>- <ng-container *ngIf="getContentType() == 'text/plain'">- <object [data]="previewUrl | safe" type="text/plain" class="preview" width="100%"></object>- </ng-container>+ <object [data]="previewUrl | safe" class="preview" width="100%"></object></ng-template><a class="btn btn-sm btn-outline-secondary" [href]="getDownloadUrl()"><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-download" fill="currentColor" xmlns="http://www.w3.org/2000/svg">diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.tsindex bf42c4235..10457054f 100644--- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts+++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts@@ -1,7 +1,6 @@import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';import { DomSanitizer } from '@angular/platform-browser';import { PaperlessDocument } from 'src/app/data/paperless-document';-import { PaperlessDocumentMetadata } from 'src/app/data/paperless-document-metadata';import { DocumentService } from 'src/app/services/rest/document.service';import { SettingsService, SETTINGS_KEYS } from 'src/app/services/settings.service';import { NgbPopover } from '@ng-bootstrap/ng-bootstrap';@@ -48,8 +47,6 @@ export class DocumentCardLargeComponent implements OnInit {mouseOnPreview = falsepopoverHidden = true- metadata: PaperlessDocumentMetadata-get searchScoreClass() {if (this.searchScore > 0.7) {return "success"@@ -61,9 +58,6 @@ export class DocumentCardLargeComponent implements OnInit {}ngOnInit(): void {- this.documentService.getMetadata(this.document?.id).subscribe(result => {- this.metadata = result- })}getIsThumbInverted() {@@ -95,10 +89,6 @@ export class DocumentCardLargeComponent implements OnInit {return this.documentService.getPreviewUrl(this.document.id)}- getContentType() {- return this.metadata?.has_archive_version ? 'application/pdf' : this.metadata?.original_mime_type- }-mouseEnterPreview() {this.mouseOnPreview = trueif (!this.popover.isOpen()) {diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.htmlindex 1dde0c9d4..aa0aa9225 100644--- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html+++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html@@ -46,12 +46,7 @@</svg></a><ng-template #previewContent>- <ng-container *ngIf="getContentType() == 'application/pdf'">- <object [data]="previewUrl | safe" class="preview" width="100%"></object>- </ng-container>- <ng-container *ngIf="getContentType() == 'text/plain'">- <object [data]="previewUrl | safe" type="text/plain" class="preview" width="100%"></object>- </ng-container>+ <object [data]="previewUrl | safe" class="preview" width="100%"></object></ng-template><a [href]="getDownloadUrl()" class="btn btn-sm btn-outline-secondary" title="Download" (click)="$event.stopPropagation()" i18n-title><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-download" fill="currentColor" xmlns="http://www.w3.org/2000/svg">diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.tsindex 033abab27..e025e4e25 100644--- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts+++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts@@ -1,7 +1,6 @@import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';import { map } from 'rxjs/operators';import { PaperlessDocument } from 'src/app/data/paperless-document';-import { PaperlessDocumentMetadata } from 'src/app/data/paperless-document-metadata';import { DocumentService } from 'src/app/services/rest/document.service';import { SettingsService, SETTINGS_KEYS } from 'src/app/services/settings.service';import { NgbPopover } from '@ng-bootstrap/ng-bootstrap';@@ -37,12 +36,7 @@ export class DocumentCardSmallComponent implements OnInit {mouseOnPreview = falsepopoverHidden = true- metadata: PaperlessDocumentMetadata-ngOnInit(): void {- this.documentService.getMetadata(this.document?.id).subscribe(result => {- this.metadata = result- })}getIsThumbInverted() {@@ -74,10 +68,6 @@ export class DocumentCardSmallComponent implements OnInit {)}- getContentType() {- return this.metadata?.has_archive_version ? 'application/pdf' : this.metadata?.original_mime_type- }-mouseEnterPreview() {this.mouseOnPreview = trueif (!this.popover.isOpen()) {