mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-16 21:55:37 -05:00
Enhancement: improved loading visuals (#8435)
This commit is contained in:
@@ -1,25 +1,49 @@
|
||||
<pngx-widget-frame title="Statistics" [loading]="loading" i18n-title>
|
||||
<ng-container content>
|
||||
<div class="list-group border-light">
|
||||
@if (statistics?.documents_inbox !== null) {
|
||||
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" title="Go to inbox" i18n-title href="javascript:void(0)" (click)="goToInbox()">
|
||||
<ng-container i18n>Documents in inbox</ng-container>:
|
||||
<span class="badge rounded-pill" [class.bg-primary]="statistics?.documents_inbox > 0" [class.bg-muted]="statistics?.documents_inbox === 0">{{statistics?.documents_inbox}}</span>
|
||||
</a>
|
||||
}
|
||||
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" title="Go to documents" i18n-title routerLink="/documents/">
|
||||
<ng-container i18n>Total documents</ng-container>:
|
||||
<span class="badge bg-primary rounded-pill">{{statistics?.documents_total}}</span>
|
||||
</a>
|
||||
<div class="list-group-item d-flex justify-content-between align-items-center" routerLink="/documents/">
|
||||
<ng-container i18n>Total characters</ng-container>:
|
||||
<span class="badge bg-secondary text-light rounded-pill">{{statistics?.character_count | number}}</span>
|
||||
</div>
|
||||
@if (statistics?.current_asn) {
|
||||
<div class="list-group-item d-flex justify-content-between align-items-center" routerLink="/documents/">
|
||||
<ng-container i18n>Current ASN</ng-container>:
|
||||
<span class="badge bg-secondary text-light rounded-pill">{{statistics?.current_asn}}</span>
|
||||
<div class="list-group border-light placeholder-glow">
|
||||
@if (loading) {
|
||||
<div class="list-group-item d-flex">
|
||||
<div class="placeholder w-50"></div>
|
||||
<span class="placeholder badge rounded-pill ms-auto" style="width: 25px;"> </span>
|
||||
</div>
|
||||
<div class="list-group-item d-flex">
|
||||
<div class="placeholder w-25"></div>
|
||||
<span class="placeholder badge rounded-pill ms-auto" style="width: 25px;"> </span>
|
||||
</div>
|
||||
<div class="list-group-item d-flex">
|
||||
<div class="placeholder w-25"></div>
|
||||
<span class="placeholder badge rounded-pill ms-auto" style="width: 25px;"> </span>
|
||||
</div>
|
||||
<div class="list-group-item d-flex">
|
||||
<div class="placeholder w-25"></div>
|
||||
<span class="placeholder badge rounded-pill ms-auto" style="width: 25px;"> </span>
|
||||
</div>
|
||||
<div class="list-group-item filetypes">
|
||||
<div class="placeholder w-100 d-block mb-2"></div>
|
||||
<div class="placeholder w-100 d-block mb-2"></div>
|
||||
<div class="placeholder w-100 d-block"></div>
|
||||
</div>
|
||||
} @else {
|
||||
@if (statistics?.documents_inbox !== null) {
|
||||
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" title="Go to inbox" i18n-title href="javascript:void(0)" (click)="goToInbox()">
|
||||
<ng-container i18n>Documents in inbox</ng-container>:
|
||||
<span class="badge rounded-pill" [class.bg-primary]="statistics?.documents_inbox > 0" [class.bg-muted]="statistics?.documents_inbox === 0">{{statistics?.documents_inbox}}</span>
|
||||
</a>
|
||||
}
|
||||
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" title="Go to documents" i18n-title routerLink="/documents/">
|
||||
<ng-container i18n>Total documents</ng-container>:
|
||||
<span class="badge bg-primary rounded-pill">{{statistics?.documents_total}}</span>
|
||||
</a>
|
||||
<div class="list-group-item d-flex justify-content-between align-items-center" routerLink="/documents/">
|
||||
<ng-container i18n>Total characters</ng-container>:
|
||||
<span class="badge bg-secondary text-light rounded-pill">{{statistics?.character_count | number}}</span>
|
||||
</div>
|
||||
@if (statistics?.current_asn) {
|
||||
<div class="list-group-item d-flex justify-content-between align-items-center" routerLink="/documents/">
|
||||
<ng-container i18n>Current ASN</ng-container>:
|
||||
<span class="badge bg-secondary text-light rounded-pill">{{statistics?.current_asn}}</span>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
@if (statistics?.document_file_type_counts?.length > 1) {
|
||||
<div class="list-group-item filetypes">
|
||||
@@ -59,6 +83,11 @@
|
||||
|
||||
<div class="list-group border-light mt-3">
|
||||
<ng-container *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Tag }">
|
||||
@if (loading) {
|
||||
<div class="placeholder-glow list-group-item">
|
||||
<span class="placeholder w-100"></span>
|
||||
</div>
|
||||
}
|
||||
@if (statistics?.tag_count > 0) {
|
||||
<a class="list-group-item d-flex justify-content-between align-items-center" routerLink="/tags/">
|
||||
<ng-container i18n>Tags</ng-container>:
|
||||
@@ -67,6 +96,11 @@
|
||||
}
|
||||
</ng-container>
|
||||
<ng-container *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Correspondent }">
|
||||
@if (loading) {
|
||||
<div class="placeholder-glow list-group-item">
|
||||
<span class="placeholder w-100"></span>
|
||||
</div>
|
||||
}
|
||||
@if (statistics?.correspondent_count > 0) {
|
||||
<a class="list-group-item d-flex justify-content-between align-items-center" routerLink="/correspondents/">
|
||||
<ng-container i18n>Correspondents</ng-container>:
|
||||
@@ -75,6 +109,11 @@
|
||||
}
|
||||
</ng-container>
|
||||
<ng-container *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.DocumentType }">
|
||||
@if (loading) {
|
||||
<div class="placeholder-glow list-group-item">
|
||||
<span class="placeholder w-100"></span>
|
||||
</div>
|
||||
}
|
||||
@if (statistics?.document_type_count > 0) {
|
||||
<a class="list-group-item d-flex justify-content-between align-items-center" routerLink="/documenttypes/">
|
||||
<ng-container i18n>Document Types</ng-container>:
|
||||
@@ -83,6 +122,11 @@
|
||||
}
|
||||
</ng-container>
|
||||
<ng-container *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.StoragePath }">
|
||||
@if (loading) {
|
||||
<div class="placeholder-glow list-group-item">
|
||||
<span class="placeholder w-100"></span>
|
||||
</div>
|
||||
}
|
||||
@if (statistics?.storage_path_count > 0) {
|
||||
<a class="list-group-item d-flex justify-content-between align-items-center" routerLink="/storagepaths/">
|
||||
<ng-container i18n>Storage Paths</ng-container>:
|
||||
|
Reference in New Issue
Block a user