mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
* don't export api params * import from SDK instead of BE --------- Co-authored-by: Aiden McClelland <me@drbonez.dev>
18 lines
467 B
TypeScript
18 lines
467 B
TypeScript
import { Pipe, PipeTransform } from '@angular/core'
|
|
import { ConfigService } from '../../services/config.service'
|
|
import { T } from '@start9labs/start-sdk'
|
|
|
|
@Pipe({
|
|
name: 'isLaunchable',
|
|
})
|
|
export class LaunchablePipe implements PipeTransform {
|
|
constructor(private configService: ConfigService) {}
|
|
|
|
transform(
|
|
state: T.PackageState['state'],
|
|
status: T.MainStatus['status'],
|
|
): boolean {
|
|
return this.configService.isLaunchable(state, status)
|
|
}
|
|
}
|