mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-07-08 21:15:09 +00:00
Ok first real chunk of zoneless pngx
document list dashboard / widget frame stats
This commit is contained in:
+1
-1
@@ -67,11 +67,11 @@ export class StoragePathEditDialogComponent
|
||||
private testDocument: Document
|
||||
public testResult: string
|
||||
public testFailed: boolean = false
|
||||
public loading = false
|
||||
public testLoading = false
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
this.loading = false
|
||||
this.service = inject(StoragePathService)
|
||||
this.userService = inject(UserService)
|
||||
this.settingsService = inject(SettingsService)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, inject, Input } from '@angular/core'
|
||||
import { Component, inject, Input, signal } from '@angular/core'
|
||||
import { Tag } from 'src/app/data/tag'
|
||||
import {
|
||||
PermissionAction,
|
||||
@@ -16,16 +16,16 @@ export class TagComponent {
|
||||
private permissionsService = inject(PermissionsService)
|
||||
private tagService = inject(TagService)
|
||||
|
||||
private _tag: Tag
|
||||
private tagSignal = signal<Tag>(null)
|
||||
private _tagID: number
|
||||
|
||||
@Input()
|
||||
public set tag(tag: Tag) {
|
||||
this._tag = tag
|
||||
this.tagSignal.set(tag)
|
||||
}
|
||||
|
||||
public get tag(): Tag {
|
||||
return this._tag
|
||||
return this.tagSignal()
|
||||
}
|
||||
|
||||
@Input()
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
DragDropModule,
|
||||
moveItemInArray,
|
||||
} from '@angular/cdk/drag-drop'
|
||||
import { Component, inject } from '@angular/core'
|
||||
import { Component, inject, signal } from '@angular/core'
|
||||
import { RouterModule } from '@angular/router'
|
||||
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
|
||||
import { TourNgBootstrap, TourService } from 'ngx-ui-tour-ng-bootstrap'
|
||||
@@ -47,7 +47,15 @@ export class DashboardComponent extends ComponentWithPermissions {
|
||||
private tourService = inject(TourService)
|
||||
private toastService = inject(ToastService)
|
||||
|
||||
public dashboardViews: SavedView[] = []
|
||||
private dashboardViewsSignal = signal<SavedView[]>([])
|
||||
|
||||
get dashboardViews(): SavedView[] {
|
||||
return this.dashboardViewsSignal()
|
||||
}
|
||||
|
||||
set dashboardViews(value: SavedView[]) {
|
||||
this.dashboardViewsSignal.set(value)
|
||||
}
|
||||
constructor() {
|
||||
super()
|
||||
|
||||
|
||||
+18
-3
@@ -1,6 +1,6 @@
|
||||
import { DecimalPipe } from '@angular/common'
|
||||
import { HttpClient } from '@angular/common/http'
|
||||
import { Component, inject, OnDestroy, OnInit } from '@angular/core'
|
||||
import { Component, inject, OnDestroy, OnInit, signal } from '@angular/core'
|
||||
import { RouterModule } from '@angular/router'
|
||||
import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'
|
||||
import * as mimeTypeNames from 'mime-names'
|
||||
@@ -55,9 +55,24 @@ export class StatisticsWidgetComponent
|
||||
private websocketConnectionService = inject(WebsocketStatusService)
|
||||
private documentListViewService = inject(DocumentListViewService)
|
||||
|
||||
loading: boolean = false
|
||||
private loadingSignal = signal(false)
|
||||
private statisticsSignal = signal<Statistics>({})
|
||||
|
||||
statistics: Statistics = {}
|
||||
get loading(): boolean {
|
||||
return this.loadingSignal()
|
||||
}
|
||||
|
||||
set loading(value: boolean) {
|
||||
this.loadingSignal.set(value)
|
||||
}
|
||||
|
||||
get statistics(): Statistics {
|
||||
return this.statisticsSignal()
|
||||
}
|
||||
|
||||
set statistics(value: Statistics) {
|
||||
this.statisticsSignal.set(value)
|
||||
}
|
||||
|
||||
subscription: Subscription
|
||||
private unsubscribeNotifer: Subject<any> = new Subject()
|
||||
|
||||
@@ -16,13 +16,20 @@ export class WidgetFrameComponent
|
||||
{
|
||||
constructor() {
|
||||
super()
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
@Input()
|
||||
title: string
|
||||
|
||||
@Input()
|
||||
loading: boolean = false
|
||||
override set loading(value: boolean) {
|
||||
super.loading = value
|
||||
}
|
||||
|
||||
override get loading(): boolean {
|
||||
return super.loading
|
||||
}
|
||||
|
||||
@Input()
|
||||
draggable: any
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Directive, OnDestroy } from '@angular/core'
|
||||
import { Directive, OnDestroy, signal } from '@angular/core'
|
||||
import { Subject } from 'rxjs'
|
||||
import { ComponentWithPermissions } from '../with-permissions/with-permissions.component'
|
||||
|
||||
@@ -7,8 +7,24 @@ export abstract class LoadingComponentWithPermissions
|
||||
extends ComponentWithPermissions
|
||||
implements OnDestroy
|
||||
{
|
||||
public loading: boolean = true
|
||||
public show: boolean = false
|
||||
private loadingSignal = signal(true)
|
||||
private showSignal = signal(false)
|
||||
|
||||
public get loading(): boolean {
|
||||
return this.loadingSignal()
|
||||
}
|
||||
|
||||
public set loading(value: boolean) {
|
||||
this.loadingSignal.set(value)
|
||||
}
|
||||
|
||||
public get show(): boolean {
|
||||
return this.showSignal()
|
||||
}
|
||||
|
||||
public set show(value: boolean) {
|
||||
this.showSignal.set(value)
|
||||
}
|
||||
|
||||
protected unsubscribeNotifier: Subject<any> = new Subject()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user