From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 8 May 2022 21:17:11 +0000 (-0700) Subject: dashboard loading indicator, remove duplicate call to saved views X-Git-Tag: v1.8.0-beta.rc1~121^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F899%2Fhead;p=thirdparty%2Fpaperless-ngx.git dashboard loading indicator, remove duplicate call to saved views --- diff --git a/src-ui/src/app/components/dashboard/dashboard.component.html b/src-ui/src/app/components/dashboard/dashboard.component.html index cfb25b96e8..4b6bc223bb 100644 --- a/src-ui/src/app/components/dashboard/dashboard.component.html +++ b/src-ui/src/app/components/dashboard/dashboard.component.html @@ -21,9 +21,14 @@
- + +
+ Loading... +
+ + - + diff --git a/src-ui/src/app/components/dashboard/dashboard.component.ts b/src-ui/src/app/components/dashboard/dashboard.component.ts index 3dd6482123..640883f6f2 100644 --- a/src-ui/src/app/components/dashboard/dashboard.component.ts +++ b/src-ui/src/app/components/dashboard/dashboard.component.ts @@ -1,6 +1,5 @@ import { Component, OnInit } from '@angular/core' import { Meta } from '@angular/platform-browser' -import { PaperlessSavedView } from 'src/app/data/paperless-saved-view' import { SavedViewService } from 'src/app/services/rest/saved-view.service' @Component({ @@ -8,8 +7,8 @@ import { SavedViewService } from 'src/app/services/rest/saved-view.service' templateUrl: './dashboard.component.html', styleUrls: ['./dashboard.component.scss'], }) -export class DashboardComponent implements OnInit { - constructor(private savedViewService: SavedViewService, private meta: Meta) {} +export class DashboardComponent { + constructor(public savedViewService: SavedViewService, private meta: Meta) {} get displayName() { let tagFullName = this.meta.getTag('name=full_name') @@ -30,14 +29,4 @@ export class DashboardComponent implements OnInit { return $localize`Welcome to Paperless-ngx!` } } - - savedViews: PaperlessSavedView[] = [] - - ngOnInit(): void { - this.savedViewService.listAll().subscribe((results) => { - this.savedViews = results.results.filter( - (savedView) => savedView.show_on_dashboard - ) - }) - } }