mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Prevent overriding other settings
This commit is contained in:
parent
4df7f92a56
commit
0085c8351e
@ -101,21 +101,14 @@ export class SettingsComponent implements OnInit, OnDestroy, DirtyComponent {
|
|||||||
// Initialize dirtyCheck
|
// Initialize dirtyCheck
|
||||||
this.isDirty$ = dirtyCheck(this.settingsForm, this.store.asObservable())
|
this.isDirty$ = dirtyCheck(this.settingsForm, this.store.asObservable())
|
||||||
|
|
||||||
|
// Record dirty in case we need to 'undo' appearance settings if not saved on close
|
||||||
this.isDirty$.subscribe(dirty => {
|
this.isDirty$.subscribe(dirty => {
|
||||||
this.isDirty = dirty
|
this.isDirty = dirty
|
||||||
})
|
})
|
||||||
|
|
||||||
// "Live" visual changes prior to save
|
// "Live" visual changes prior to save
|
||||||
this.settingsForm.get('darkModeUseSystem').valueChanges.subscribe(darkModeUseSystem => {
|
this.settingsForm.valueChanges.subscribe(() => {
|
||||||
this.settings.updateAppearanceSettings(darkModeUseSystem, this.settingsForm.get('darkModeEnabled').value)
|
this.settings.updateAppearanceSettings(this.settingsForm.get('darkModeEnabled').value, this.settingsForm.get('darkModeEnabled').value, this.settingsForm.get('themeColor').value)
|
||||||
})
|
|
||||||
|
|
||||||
this.settingsForm.get('darkModeEnabled').valueChanges.subscribe(darkModeEnabled => {
|
|
||||||
this.settings.updateAppearanceSettings(this.settingsForm.get('darkModeEnabled').value, darkModeEnabled)
|
|
||||||
})
|
|
||||||
|
|
||||||
this.settingsForm.get('themeColor').valueChanges.subscribe(color => {
|
|
||||||
this.settings.updateAppearanceSettings(null, null, color)
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user