mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
start
This commit is contained in:
committed by
Aiden McClelland
parent
b7bd147c76
commit
0c6a0218a6
@@ -1,12 +1,19 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core'
|
||||
import { PackageDataEntry } from '../services/patch-db/data-model'
|
||||
import { PatchDbModel } from '../services/patch-db/patch-db.service'
|
||||
import { FEStatus, renderPkgStatus } from '../services/pkg-status-rendering.service'
|
||||
|
||||
@Pipe({
|
||||
name: 'status',
|
||||
})
|
||||
export class StatusPipe implements PipeTransform {
|
||||
transform (pkg: PackageDataEntry): FEStatus {
|
||||
return renderPkgStatus(pkg).feStatus
|
||||
|
||||
constructor (
|
||||
private readonly patch: PatchDbModel,
|
||||
) { }
|
||||
|
||||
transform (pkgId: string): FEStatus {
|
||||
console.log(pkgId)
|
||||
const pkg = this.patch.data['package-data'][pkgId]
|
||||
return renderPkgStatus(pkg.state, pkg.installed.status).feStatus
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user