mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-22 13:24:22 +00:00
Enhancement: add upload count to button, link to tray, reduce notifications (#14501)
This commit is contained in:
1 parent
f8e93a535a
commit
3374debd6a
10 files changed
+125
-18
No files matched your search
@@ -119,7 +119,7 @@ describe('FileDropComponent', () => {
|
||||
}
|
||||
component.onDrop(dragEvent as DragEvent)
|
||||
advanceTimers(3000)
|
||||
expect(toastSpy).toHaveBeenCalled()
|
||||
expect(toastSpy).not.toHaveBeenCalled()
|
||||
expect(uploadSpy).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
@@ -159,7 +159,7 @@ describe('FileDropComponent', () => {
|
||||
component.onDrop(dragEvent as DragEvent)
|
||||
await flushPromises()
|
||||
advanceTimers(3000)
|
||||
expect(toastSpy).toHaveBeenCalled()
|
||||
expect(toastSpy).not.toHaveBeenCalled()
|
||||
expect(uploadSpy).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
@@ -227,7 +227,7 @@ describe('FileDropComponent', () => {
|
||||
}
|
||||
component.onDrop(dragEvent as DragEvent)
|
||||
advanceTimers(3000)
|
||||
expect(toastSpy).toHaveBeenCalled()
|
||||
expect(toastSpy).not.toHaveBeenCalled()
|
||||
expect(uploadSpy).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
|
||||
@@ -134,7 +134,6 @@ export class FileDropComponent {
|
||||
Promise.all(promises)
|
||||
.then((results) => {
|
||||
files.push(...[].concat(...results))
|
||||
this.toastService.showInfo($localize`Initiating upload...`, 3000)
|
||||
this.uploadDocumentsService.uploadFiles(files)
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -143,7 +142,6 @@ export class FileDropComponent {
|
||||
)
|
||||
})
|
||||
} else if (files.length) {
|
||||
this.toastService.showInfo($localize`Initiating upload...`, 3000)
|
||||
this.uploadDocumentsService.uploadFiles(files)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user