mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-10 08:37:19 +01:00
Lovely file upload alerts
This commit is contained in:
parent
5651a03b14
commit
53309f017f
4 changed files with 48 additions and 17 deletions
|
|
@ -16,7 +16,7 @@ export class FileStatus {
|
|||
|
||||
taskId: string
|
||||
|
||||
phase: FileStatusPhase = FileStatusPhase.STARTED
|
||||
phase: FileStatusPhase = FileStatusPhase.STARTED
|
||||
|
||||
currentPhaseProgress: number
|
||||
|
||||
|
|
@ -33,7 +33,8 @@ export class FileStatus {
|
|||
case FileStatusPhase.UPLOADING:
|
||||
return this.currentPhaseProgress / this.currentPhaseMaxProgress * 0.2
|
||||
case FileStatusPhase.PROCESSING:
|
||||
return this.currentPhaseProgress / this.currentPhaseMaxProgress * 0.8 + 0.2
|
||||
if (this.currentPhaseProgress > 100) this.currentPhaseProgress = 0
|
||||
return (this.currentPhaseProgress / this.currentPhaseMaxProgress * 0.8) + 0.2
|
||||
case FileStatusPhase.SUCCESS:
|
||||
case FileStatusPhase.FAILED:
|
||||
return 1.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue