mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Settings navigation warning dialog
This commit is contained in:
@@ -32,9 +32,9 @@ export class SettingsComponent implements OnInit, OnDestroy, DirtyComponent {
|
||||
|
||||
savedViews: PaperlessSavedView[]
|
||||
|
||||
store: BehaviorSubject<any>;
|
||||
storeSub: Subscription;
|
||||
isDirty$: Observable<boolean>;
|
||||
store: BehaviorSubject<any>
|
||||
storeSub: Subscription
|
||||
isDirty$: Observable<boolean>
|
||||
|
||||
get computedDateLocale(): string {
|
||||
return this.settingsForm.value.dateLocale || this.settingsForm.value.displayLanguage
|
||||
@@ -82,10 +82,10 @@ export class SettingsComponent implements OnInit, OnDestroy, DirtyComponent {
|
||||
|
||||
this.storeSub = this.store.asObservable().subscribe(state => {
|
||||
this.settingsForm.patchValue(state, { emitEvent: false })
|
||||
});
|
||||
})
|
||||
|
||||
// Initialize dirtyCheck
|
||||
this.isDirty$ = dirtyCheck(this.settingsForm, this.store.asObservable());
|
||||
this.isDirty$ = dirtyCheck(this.settingsForm, this.store.asObservable())
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user