mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
undefined bug fix
This commit is contained in:
committed by
Aiden McClelland
parent
d809e175db
commit
b3a4ebcf53
@@ -73,7 +73,7 @@ export class AppListPage {
|
|||||||
},
|
},
|
||||||
statusRendering: renderPkgStatus(pkgs[id].state, pkgs[id].installed?.status),
|
statusRendering: renderPkgStatus(pkgs[id].state, pkgs[id].installed?.status),
|
||||||
sub: null,
|
sub: null,
|
||||||
installProgress: this.installPackageService.transform(pkgs[id]['install-progress']),
|
installProgress: !isEmptyObject(pkgs[id]['install-progress']) ? this.installPackageService.transform(pkgs[id]['install-progress']) : undefined,
|
||||||
}
|
}
|
||||||
// subscribe to pkg
|
// subscribe to pkg
|
||||||
this.pkgs[id].sub = this.patch.watch$('package-data', id).subscribe(pkg => {
|
this.pkgs[id].sub = this.patch.watch$('package-data', id).subscribe(pkg => {
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ export class AppShowPage {
|
|||||||
this.patch.watch$('package-data', this.pkgId)
|
this.patch.watch$('package-data', this.pkgId)
|
||||||
.subscribe(pkg => {
|
.subscribe(pkg => {
|
||||||
this.pkg = pkg
|
this.pkg = pkg
|
||||||
this.installProgress = this.packageLoadingService.transform(this.pkg['install-progress'])
|
console.log('isnt empty', !isEmptyObject(pkg['install-progress']))
|
||||||
|
this.installProgress = !isEmptyObject(pkg['install-progress']) ? this.packageLoadingService.transform(pkg['install-progress']) : undefined
|
||||||
this.rendering = renderPkgStatus(pkg.state, pkg.installed?.status)
|
this.rendering = renderPkgStatus(pkg.state, pkg.installed?.status)
|
||||||
this.mainStatus = { ...pkg.installed?.status.main }
|
this.mainStatus = { ...pkg.installed?.status.main }
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export class PackageLoadingService {
|
|||||||
validateWeight * validated +
|
validateWeight * validated +
|
||||||
unpackWeight * unpacked)
|
unpackWeight * unpacked)
|
||||||
|
|
||||||
const denominator = Math.floor(loadData.size * (downloadWeight + validateWeight + unpackWeight))
|
const denominator = Math.floor(size * (downloadWeight + validateWeight + unpackWeight))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
totalProgress: Math.round(100 * numerator / denominator),
|
totalProgress: Math.round(100 * numerator / denominator),
|
||||||
|
|||||||
Reference in New Issue
Block a user