mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Code cleanup
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
			
		||||
import { Component, OnInit } from '@angular/core';
 | 
			
		||||
import { Component } from '@angular/core';
 | 
			
		||||
import { FormControl } from '@angular/forms';
 | 
			
		||||
import { ActivatedRoute, Router, Params } from '@angular/router';
 | 
			
		||||
import { from, Observable, Subscription, BehaviorSubject } from 'rxjs';
 | 
			
		||||
@@ -18,7 +18,7 @@ import { FILTER_FULLTEXT_QUERY } from 'src/app/data/filter-rule-type';
 | 
			
		||||
  templateUrl: './app-frame.component.html',
 | 
			
		||||
  styleUrls: ['./app-frame.component.scss']
 | 
			
		||||
})
 | 
			
		||||
export class AppFrameComponent implements OnInit {
 | 
			
		||||
export class AppFrameComponent {
 | 
			
		||||
 | 
			
		||||
  constructor (
 | 
			
		||||
    public router: Router,
 | 
			
		||||
@@ -102,14 +102,13 @@ export class AppFrameComponent implements OnInit {
 | 
			
		||||
        while (route.firstChild) {
 | 
			
		||||
          route = route.firstChild
 | 
			
		||||
        }
 | 
			
		||||
        if (route.component == DocumentDetailComponent) {
 | 
			
		||||
        if (route.component === DocumentDetailComponent) {
 | 
			
		||||
          this.router.navigate([""])
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  ngOnInit() {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  get displayName() {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
 | 
			
		||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
 | 
			
		||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
 | 
			
		||||
import { Subject } from 'rxjs';
 | 
			
		||||
 | 
			
		||||
@@ -7,7 +7,7 @@ import { Subject } from 'rxjs';
 | 
			
		||||
  templateUrl: './confirm-dialog.component.html',
 | 
			
		||||
  styleUrls: ['./confirm-dialog.component.scss']
 | 
			
		||||
})
 | 
			
		||||
export class ConfirmDialogComponent implements OnInit {
 | 
			
		||||
export class ConfirmDialogComponent {
 | 
			
		||||
 | 
			
		||||
  constructor(public activeModal: NgbActiveModal) { }
 | 
			
		||||
 | 
			
		||||
@@ -35,7 +35,7 @@ export class ConfirmDialogComponent implements OnInit {
 | 
			
		||||
  confirmButtonEnabled = true
 | 
			
		||||
  seconds = 0
 | 
			
		||||
 | 
			
		||||
  subject: Subject<boolean>
 | 
			
		||||
  confirmSubject: Subject<boolean>
 | 
			
		||||
 | 
			
		||||
  delayConfirm(seconds: number) {
 | 
			
		||||
    this.confirmButtonEnabled = false
 | 
			
		||||
@@ -49,18 +49,15 @@ export class ConfirmDialogComponent implements OnInit {
 | 
			
		||||
    }, 1000)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  ngOnInit(): void {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  cancel() {
 | 
			
		||||
    this.subject?.next(false)
 | 
			
		||||
    this.subject?.complete()
 | 
			
		||||
    this.confirmSubject?.next(false)
 | 
			
		||||
    this.confirmSubject?.complete()
 | 
			
		||||
    this.activeModal.close()
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  confirm() {
 | 
			
		||||
    this.confirmClicked.emit()
 | 
			
		||||
    this.subject?.next(true)
 | 
			
		||||
    this.subject?.complete()
 | 
			
		||||
    this.confirmSubject?.next(true)
 | 
			
		||||
    this.confirmSubject?.complete()
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user