mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-08 15:55:31 +01:00
Feature: support sorting sidebar saved views (#4381)
This commit is contained in:
parent
999ae678c2
commit
9880f9ebc7
18 changed files with 397 additions and 147 deletions
|
|
@ -194,6 +194,9 @@ export class SettingsComponent
|
|||
if (navIDKey) {
|
||||
this.activeNavID = SettingsNavIDs[navIDKey]
|
||||
}
|
||||
if (this.activeNavID === SettingsNavIDs.SavedViews) {
|
||||
this.settings.organizingSidebarSavedViews = true
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -275,11 +278,15 @@ export class SettingsComponent
|
|||
this.router
|
||||
.navigate(['settings', foundNavIDkey.toLowerCase()])
|
||||
.then((navigated) => {
|
||||
this.settings.organizingSidebarSavedViews = false
|
||||
if (!navigated && this.isDirty) {
|
||||
this.activeNavID = navChangeEvent.activeId
|
||||
} else if (navigated && this.isDirty) {
|
||||
this.initialize()
|
||||
}
|
||||
if (this.activeNavID === SettingsNavIDs.SavedViews) {
|
||||
this.settings.organizingSidebarSavedViews = true
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -352,6 +359,7 @@ export class SettingsComponent
|
|||
ngOnDestroy() {
|
||||
if (this.isDirty) this.settings.updateAppearanceSettings() // in case user changed appearance but didnt save
|
||||
this.storeSub && this.storeSub.unsubscribe()
|
||||
this.settings.organizingSidebarSavedViews = false
|
||||
}
|
||||
|
||||
deleteSavedView(savedView: PaperlessSavedView) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue