dont show indeterminate progress when waiting for phase

This commit is contained in:
Matt Hill
2025-05-01 18:54:14 -06:00
parent 828e13adbb
commit 0f49f54c29

View File

@@ -50,7 +50,7 @@ import { getManifest } from 'src/app/utils/get-package-data'
size="m" size="m"
[max]="100" [max]="100"
[class.g-positive]="phase.progress === true" [class.g-positive]="phase.progress === true"
[value]="isPending(phase.progress) ? undefined : percent" [value]="isIndeterminate(phase.progress) ? undefined : percent"
></progress> ></progress>
</div> </div>
} }
@@ -87,9 +87,10 @@ export class ServiceInstallProgressComponent {
private readonly errorService = inject(ErrorService) private readonly errorService = inject(ErrorService)
private readonly loader = inject(LoadingService) private readonly loader = inject(LoadingService)
isPending(progress: T.Progress): boolean { isIndeterminate(progress: T.Progress): boolean {
return ( return (
!progress || (progress && progress !== true && progress.total === null) progress === false ||
(!!progress && progress !== true && progress.total === null)
) )
} }