mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
dont show indeterminate progress when waiting for phase
This commit is contained in:
@@ -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)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user