mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
Rework install progress types and pipes for clarity (#1513)
* rework install progress types and pipes for clarity * rework marketplace show display Co-authored-by: Matt Hill <matthill@Matt-M1.local>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { NgModule } from '@angular/core'
|
||||
import { InstallProgressPipe } from './install-progress.pipe'
|
||||
|
||||
@NgModule({
|
||||
declarations: [InstallProgressPipe],
|
||||
exports: [InstallProgressPipe],
|
||||
})
|
||||
export class InstallProgressPipeModule {}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core'
|
||||
import { InstallProgress } from 'src/app/services/patch-db/data-model'
|
||||
import { packageLoadingProgress } from 'src/app/util/package-loading-progress'
|
||||
|
||||
@Pipe({
|
||||
name: 'installProgressDisplay',
|
||||
})
|
||||
export class InstallProgressPipe implements PipeTransform {
|
||||
transform(installProgress?: InstallProgress): string {
|
||||
const totalProgress = packageLoadingProgress(installProgress)?.totalProgress || 0
|
||||
|
||||
return totalProgress < 99 ? totalProgress + '%' : 'finalizing'
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core'
|
||||
import { PackageState } from 'src/app/types/package-state'
|
||||
import {
|
||||
InterfaceDef,
|
||||
PackageMainStatus,
|
||||
PackageState,
|
||||
} from 'src/app/services/patch-db/data-model'
|
||||
import { ConfigService } from '../../services/config.service'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user