mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-21 07:18:13 +00:00
Enhancement: notifications improvements (#14500)
This commit is contained in:
1 parent
c657fceea5
commit
98fb7c3b63
77 files changed
+1535
-627
No files matched your search
@@ -11,7 +11,7 @@ import { takeUntil, tap } from 'rxjs'
|
||||
import { Document } from 'src/app/data/document'
|
||||
import { SETTINGS_KEYS } from 'src/app/data/ui-settings'
|
||||
import { SettingsService } from 'src/app/services/settings.service'
|
||||
import { ToastService } from 'src/app/services/toast.service'
|
||||
import { ToastLevel, ToastService } from 'src/app/services/toast.service'
|
||||
import { TrashService } from 'src/app/services/trash.service'
|
||||
import { ConfirmDialogComponent } from '../../common/confirm-dialog/confirm-dialog.component'
|
||||
import { PageHeaderComponent } from '../../common/page-header/page-header.component'
|
||||
@@ -87,9 +87,11 @@ export class TrashComponent
|
||||
modal.componentInstance.buttonsEnabled.set(false)
|
||||
this.trashService.emptyTrash([document.id]).subscribe({
|
||||
next: () => {
|
||||
this.toastService.showInfo(
|
||||
$localize`Document "${document.title}" deleted`
|
||||
)
|
||||
this.toastService.show({
|
||||
content: $localize`Document "${document.title}" deleted`,
|
||||
delay: 5000,
|
||||
level: ToastLevel.Success,
|
||||
})
|
||||
modal.close()
|
||||
this.reload()
|
||||
},
|
||||
@@ -122,7 +124,11 @@ export class TrashComponent
|
||||
.emptyTrash(documents ? Array.from(documents) : null)
|
||||
.subscribe({
|
||||
next: () => {
|
||||
this.toastService.showInfo($localize`Document(s) deleted`)
|
||||
this.toastService.show({
|
||||
content: $localize`Document(s) deleted`,
|
||||
delay: 5000,
|
||||
level: ToastLevel.Success,
|
||||
})
|
||||
this.allToggled.set(false)
|
||||
modal.close()
|
||||
this.reload()
|
||||
@@ -144,6 +150,7 @@ export class TrashComponent
|
||||
this.toastService.show({
|
||||
content: $localize`Document "${document.title}" restored`,
|
||||
delay: 5000,
|
||||
level: ToastLevel.Success,
|
||||
actionName: $localize`Open document`,
|
||||
action: () => {
|
||||
this.router.navigate(['documents', document.id])
|
||||
@@ -165,7 +172,11 @@ export class TrashComponent
|
||||
.restoreDocuments(documents ? Array.from(documents) : null)
|
||||
.subscribe({
|
||||
next: () => {
|
||||
this.toastService.showInfo($localize`Document(s) restored`)
|
||||
this.toastService.show({
|
||||
content: $localize`Document(s) restored`,
|
||||
delay: 5000,
|
||||
level: ToastLevel.Success,
|
||||
})
|
||||
this.allToggled.set(false)
|
||||
this.reload()
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user