mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
Feature/new registry (#2612)
* wip * overhaul boot process * wip: new registry * wip * wip * wip * wip * wip * wip * os registry complete * ui fixes * fixes * fixes * more fixes * fix merkle archive
This commit is contained in:
@@ -7,7 +7,8 @@ import { T } from '@start9labs/start-sdk'
|
||||
export class InstallingProgressDisplayPipe implements PipeTransform {
|
||||
transform(progress: T.Progress): string {
|
||||
if (progress === true) return 'finalizing'
|
||||
if (progress === false || !progress.total) return 'unknown %'
|
||||
if (progress === false || progress === null || !progress.total)
|
||||
return 'unknown %'
|
||||
const percentage = Math.round((100 * progress.done) / progress.total)
|
||||
|
||||
return percentage < 99 ? String(percentage) + '%' : 'finalizing'
|
||||
@@ -20,7 +21,7 @@ export class InstallingProgressDisplayPipe implements PipeTransform {
|
||||
export class InstallingProgressPipe implements PipeTransform {
|
||||
transform(progress: T.Progress): number | null {
|
||||
if (progress === true) return 1
|
||||
if (progress === false || !progress.total) return null
|
||||
if (progress === false || progress === null || !progress.total) return null
|
||||
return Number((progress.done / progress.total).toFixed(2))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user