mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user