mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-02-09 23:49:29 -06:00
Refactor: loading component
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { Subject } from 'rxjs'
|
||||
import { ComponentWithPermissions } from '../with-permissions/with-permissions.component'
|
||||
import { Directive, OnDestroy } from '@angular/core'
|
||||
|
||||
@Directive()
|
||||
export abstract class LoadingComponentWithPermissions
|
||||
extends ComponentWithPermissions
|
||||
implements OnDestroy
|
||||
{
|
||||
public loading: boolean = true
|
||||
public reveal: boolean = false
|
||||
|
||||
protected unsubscribeNotifier: Subject<any> = new Subject()
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.unsubscribeNotifier.next(this)
|
||||
this.unsubscribeNotifier.complete()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user