mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
feat: move all frontend projects under the same Angular workspace (#1141)
* feat: move all frontend projects under the same Angular workspace * Refactor/angular workspace (#1154) * update frontend build steps Co-authored-by: waterplea <alexander@inkin.ru> Co-authored-by: Matt Hill <matthewonthemoon@gmail.com> Co-authored-by: Lucy Cifferello <12953208+elvece@users.noreply.github.com>
This commit is contained in:
25
frontend/projects/ui/src/app/pipes/ui.pipe.ts
Normal file
25
frontend/projects/ui/src/app/pipes/ui.pipe.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core'
|
||||
import { InterfaceDef, PackageMainStatus, PackageState } from '../services/patch-db/data-model'
|
||||
import { ConfigService, hasUi } from '../services/config.service'
|
||||
|
||||
@Pipe({
|
||||
name: 'hasUi',
|
||||
})
|
||||
export class HasUiPipe implements PipeTransform {
|
||||
|
||||
transform (interfaces: { [id: string]: InterfaceDef }): boolean {
|
||||
return hasUi(interfaces)
|
||||
}
|
||||
}
|
||||
|
||||
@Pipe({
|
||||
name: 'isLaunchable',
|
||||
})
|
||||
export class LaunchablePipe implements PipeTransform {
|
||||
|
||||
constructor (private configService: ConfigService) { }
|
||||
|
||||
transform (state: PackageState, status: PackageMainStatus, interfaces: { [id: string]: InterfaceDef }): boolean {
|
||||
return this.configService.isLaunchable(state, status, interfaces)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user