]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Basic show processing status in UI feature-in-process
authorshamoon <4887959+shamoon@users.noreply.github.com>
Tue, 26 Aug 2025 08:30:50 +0000 (01:30 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Tue, 26 Aug 2025 08:44:58 +0000 (01:44 -0700)
[ci skip]

src-ui/src/app/components/document-detail/document-detail.component.html
src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html
src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html
src-ui/src/app/components/document-list/document-list.component.html
src-ui/src/app/data/document.ts

index c926c82d9ff12703dc563fa331c29e896c2544c0..7b179086b0474869750b2f31a3cf1e0a3837f6a9 100644 (file)
@@ -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">&nbsp;<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>&nbsp;<span i18n>Reprocess</span>
       </button>
 
@@ -58,7 +63,7 @@
         <i-bs width="1em" height="1em" name="diagram-3"></i-bs>&nbsp;<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>&nbsp;<ng-container i18n>PDF Editor</ng-container>
       </button>
     </div>
@@ -90,7 +95,6 @@
       }
     </div>
   </div>
-
 </pngx-page-header>
 
 <div class="row">
index ab9436f0918a097ec47f2abcff332afb6c7625b4..1d6f97e21f0a955d355c4ee58065178d0b62dfec 100644 (file)
       }
 
     </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) {
index b154324c7830193b0ee73619169b461433423550..09ab48d4626b2346e6f27b5a276c577ce792a191 100644 (file)
     }
 
     <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) {
index c58d1ede10bc4dee8044c3a2c08594fccfa9b05e..4f380bee6e93d769aad6e87303f9396f0575b3df 100644 (file)
                 }
                 @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>
index 8aae31945e28e14c6b3924eb198024b916d5b766..b7c7a9678ad350102785367b464a17b7bff49011 100644 (file)
@@ -159,6 +159,8 @@ export interface Document extends ObjectWithPermissions {
 
   page_count?: number
 
+  in_process?: boolean
+
   // Frontend only
   __changedFields?: string[]
 }