Chore/unexport api ts (#2585)

* don't export api params

* import from SDK instead of BE

---------

Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
Matt Hill
2024-04-01 14:47:03 -06:00
committed by GitHub
parent f021ad9b0a
commit 71b83245b4
105 changed files with 88 additions and 464 deletions

View File

@@ -1,11 +1,11 @@
import { Pipe, PipeTransform } from '@angular/core'
import { Progress } from '../../../../../../../core/startos/bindings/Progress'
import { T } from '@start9labs/start-sdk'
@Pipe({
name: 'installingProgressString',
})
export class InstallingProgressDisplayPipe implements PipeTransform {
transform(progress: Progress): string {
transform(progress: T.Progress): string {
if (progress === true) return 'finalizing'
if (progress === false || !progress.total) return 'unknown %'
const percentage = Math.round((100 * progress.done) / progress.total)
@@ -18,7 +18,7 @@ export class InstallingProgressDisplayPipe implements PipeTransform {
name: 'installingProgress',
})
export class InstallingProgressPipe implements PipeTransform {
transform(progress: Progress): number | null {
transform(progress: T.Progress): number | null {
if (progress === true) return 1
if (progress === false || !progress.total) return null
return Number((progress.done / progress.total).toFixed(2))