mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
finalizing bug fix
This commit is contained in:
committed by
Aiden McClelland
parent
82602af601
commit
6c3e99f3e1
@@ -109,7 +109,9 @@
|
||||
<ion-text *ngIf="(pkg.manifest.version | compareEmver : localPkg.manifest.version) === 1" color="warning">Update Available</ion-text>
|
||||
</p>
|
||||
<p *ngIf="[PackageState.Installing, PackageState.Updating] | includes : localPkg.state">
|
||||
<ion-text color="primary">{{ localPkg.state | titlecase }}...{{ (localPkg['install-progress'] | installState).totalProgress }}%</ion-text>
|
||||
<ion-text color="primary">{{ localPkg.state | titlecase }}...
|
||||
<span>{{ (localPkg['install-progress'] | installState).display }}</span>
|
||||
</ion-text>
|
||||
</p>
|
||||
<p *ngIf="localPkg.state === PackageState.Removing">
|
||||
<ion-text color="warning">{{ localPkg.state | titlecase }}</ion-text>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</p>
|
||||
<!-- installing, updating -->
|
||||
<p *ngIf="[PackageState.Installing, PackageState.Updating] | includes : localPkg.state">
|
||||
<ion-text color="primary">{{ localPkg.state | titlecase }}...{{ (localPkg['install-progress'] | installState).totalProgress }}%</ion-text>
|
||||
<ion-text color="primary">{{ localPkg.state | titlecase }}...{{ (localPkg['install-progress'] | installState).display }}</ion-text>
|
||||
</p>
|
||||
<!-- removing -->
|
||||
<p *ngIf="localPkg.state === PackageState.Removing">
|
||||
|
||||
@@ -31,13 +31,14 @@ export function packageLoadingProgress (
|
||||
const denominator = Math.floor(
|
||||
size * (downloadWeight + validateWeight + unpackWeight),
|
||||
)
|
||||
|
||||
const totalProgress = Math.floor(100 * numerator / denominator)
|
||||
return {
|
||||
totalProgress: Math.floor((100 * numerator) / denominator),
|
||||
totalProgress,
|
||||
downloadProgress: Math.floor((100 * downloaded) / size),
|
||||
validateProgress: Math.floor((100 * validated) / size),
|
||||
unpackProgress: Math.floor((100 * unpacked) / size),
|
||||
isComplete: downloadComplete && validationComplete && unpackComplete,
|
||||
display: totalProgress > 98 ? 'Finalizing' : `${totalProgress}%`,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,4 +48,5 @@ export interface ProgressData {
|
||||
validateProgress: number
|
||||
unpackProgress: number
|
||||
isComplete: boolean
|
||||
display: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user