mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-28 01:26:14 +00:00
Basic show processing status in UI
[ci skip]
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
<pngx-page-header [(title)]="title">
|
||||
@if (document?.in_process) {
|
||||
<span class="badge bg-danger text-dark ms-2 d-flex align-items-center">
|
||||
<div class="spinner-border spinner-border-sm me-1" role="status"></div><span i18n>Processing...</span>
|
||||
</span>
|
||||
}
|
||||
@if (archiveContentRenderType === ContentRenderType.PDF && !useNativePdfViewer) {
|
||||
@if (previewNumPages) {
|
||||
<div class="input-group input-group-sm d-none d-md-flex">
|
||||
@@ -50,7 +55,7 @@
|
||||
<div class="d-none d-sm-inline"> <ng-container i18n>Actions</ng-container></div>
|
||||
</button>
|
||||
<div ngbDropdownMenu aria-labelledby="actionsDropdown" class="shadow">
|
||||
<button ngbDropdownItem (click)="reprocess()" [disabled]="!userCanEdit || !userIsOwner">
|
||||
<button ngbDropdownItem (click)="reprocess()" [disabled]="!userCanEdit || !userIsOwner || document?.in_process">
|
||||
<i-bs width="1em" height="1em" name="arrow-counterclockwise"></i-bs> <span i18n>Reprocess</span>
|
||||
</button>
|
||||
|
||||
@@ -58,7 +63,7 @@
|
||||
<i-bs width="1em" height="1em" name="diagram-3"></i-bs> <span i18n>More like this</span>
|
||||
</button>
|
||||
|
||||
<button ngbDropdownItem (click)="editPdf()" [disabled]="!userIsOwner || !userCanEdit || originalContentRenderType !== ContentRenderType.PDF">
|
||||
<button ngbDropdownItem (click)="editPdf()" [disabled]="!userIsOwner || !userCanEdit || originalContentRenderType !== ContentRenderType.PDF || document?.in_process">
|
||||
<i-bs name="pencil"></i-bs> <ng-container i18n>PDF Editor</ng-container>
|
||||
</button>
|
||||
</div>
|
||||
@@ -90,7 +95,6 @@
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</pngx-page-header>
|
||||
|
||||
<div class="row">
|
||||
|
@@ -15,8 +15,13 @@
|
||||
}
|
||||
|
||||
</div>
|
||||
<div class="col col-md-10">
|
||||
<div class="col col-md-10">
|
||||
<div class="card-body">
|
||||
@if (document?.in_process) {
|
||||
<span class="badge bg-secondary text-light mb-2">
|
||||
<div class="spinner-border spinner-border-sm me-1" role="status"></div><span i18n>Processing...</span>
|
||||
</span>
|
||||
}
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h5 class="card-title w-100">
|
||||
@if (document) {
|
||||
|
@@ -37,6 +37,11 @@
|
||||
}
|
||||
|
||||
<div class="card-body bg-light p-2">
|
||||
@if (document?.in_process) {
|
||||
<span class="badge bg-secondary text-light mb-2">
|
||||
<div class="spinner-border spinner-border-sm me-1" role="status"></div><span i18n>Processing...</span>
|
||||
</span>
|
||||
}
|
||||
<p class="card-text">
|
||||
@if (document) {
|
||||
@if (displayFields.includes(DisplayField.CORRESPONDENT) && document.correspondent) {
|
||||
|
@@ -301,6 +301,11 @@
|
||||
}
|
||||
@if (activeDisplayFields.includes(DisplayField.TITLE) || activeDisplayFields.includes(DisplayField.TAGS)) {
|
||||
<td width="30%">
|
||||
@if (d.in_process) {
|
||||
<span class="badge bg-secondary text-light me-1">
|
||||
<div class="spinner-border spinner-border-sm me-1" role="status"></div><span i18n>Processing...</span>
|
||||
</span>
|
||||
}
|
||||
@if (activeDisplayFields.includes(DisplayField.TITLE)) {
|
||||
<div class="d-inline-block" (mouseleave)="popupPreview.close()">
|
||||
<a routerLink="/documents/{{d.id}}" title="Edit document" i18n-title style="overflow-wrap: anywhere;">{{d.title | documentTitle}}</a>
|
||||
|
@@ -159,6 +159,8 @@ export interface Document extends ObjectWithPermissions {
|
||||
|
||||
page_count?: number
|
||||
|
||||
in_process?: boolean
|
||||
|
||||
// Frontend only
|
||||
__changedFields?: string[]
|
||||
}
|
||||
|
Reference in New Issue
Block a user