mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-11-23 23:49:08 -06:00
loading indicator for dashboard widgets
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<app-widget-frame [title]="savedView.name">
|
||||
<app-widget-frame [title]="savedView.name" [loading]="loading">
|
||||
|
||||
<a class="btn-link" header-buttons [routerLink]="[]" (click)="showAll()" i18n>Show all</a>
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ import { QueryParamsService } from 'src/app/services/query-params.service'
|
||||
styleUrls: ['./saved-view-widget.component.scss'],
|
||||
})
|
||||
export class SavedViewWidgetComponent implements OnInit, OnDestroy {
|
||||
loading: boolean = true
|
||||
|
||||
constructor(
|
||||
private documentService: DocumentService,
|
||||
private router: Router,
|
||||
@@ -43,6 +45,7 @@ export class SavedViewWidgetComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
reload() {
|
||||
this.loading = true
|
||||
this.documentService
|
||||
.listFiltered(
|
||||
1,
|
||||
@@ -52,6 +55,7 @@ export class SavedViewWidgetComponent implements OnInit, OnDestroy {
|
||||
this.savedView.filter_rules
|
||||
)
|
||||
.subscribe((result) => {
|
||||
this.loading = false
|
||||
this.documents = result.results
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user