mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
fix start bug in service dashboard
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { AsyncPipe } from '@angular/common'
|
||||||
import {
|
import {
|
||||||
ChangeDetectionStrategy,
|
ChangeDetectionStrategy,
|
||||||
Component,
|
Component,
|
||||||
@@ -6,6 +7,7 @@ import {
|
|||||||
Input,
|
Input,
|
||||||
} from '@angular/core'
|
} from '@angular/core'
|
||||||
import { i18nPipe } from '@start9labs/shared'
|
import { i18nPipe } from '@start9labs/shared'
|
||||||
|
import { TuiLet } from '@taiga-ui/cdk'
|
||||||
import { TuiButton } from '@taiga-ui/core'
|
import { TuiButton } from '@taiga-ui/core'
|
||||||
import { map } from 'rxjs'
|
import { map } from 'rxjs'
|
||||||
import { ControlsService } from 'src/app/services/controls.service'
|
import { ControlsService } from 'src/app/services/controls.service'
|
||||||
@@ -40,9 +42,10 @@ import { getManifest } from 'src/app/utils/get-package-data'
|
|||||||
|
|
||||||
@if (status === 'stopped') {
|
@if (status === 'stopped') {
|
||||||
<button
|
<button
|
||||||
|
*tuiLet="hasUnmet() | async as hasUnmet"
|
||||||
tuiButton
|
tuiButton
|
||||||
iconStart="@tui.play"
|
iconStart="@tui.play"
|
||||||
(click)="controls.start(manifest(), !!hasUnmet())"
|
(click)="controls.start(manifest(), !!hasUnmet)"
|
||||||
>
|
>
|
||||||
{{ 'Start' | i18n }}
|
{{ 'Start' | i18n }}
|
||||||
</button>
|
</button>
|
||||||
@@ -83,7 +86,7 @@ import { getManifest } from 'src/app/utils/get-package-data'
|
|||||||
],
|
],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [TuiButton, i18nPipe],
|
imports: [TuiButton, i18nPipe, TuiLet, AsyncPipe],
|
||||||
})
|
})
|
||||||
export class ServiceControlsComponent {
|
export class ServiceControlsComponent {
|
||||||
private readonly errors = inject(DepErrorService)
|
private readonly errors = inject(DepErrorService)
|
||||||
@@ -98,7 +101,6 @@ export class ServiceControlsComponent {
|
|||||||
|
|
||||||
readonly controls = inject(ControlsService)
|
readonly controls = inject(ControlsService)
|
||||||
|
|
||||||
// @TODO Alex observable in signal?
|
|
||||||
readonly hasUnmet = computed(() =>
|
readonly hasUnmet = computed(() =>
|
||||||
this.errors.getPkgDepErrors$(this.manifest().id).pipe(
|
this.errors.getPkgDepErrors$(this.manifest().id).pipe(
|
||||||
map(errors =>
|
map(errors =>
|
||||||
|
|||||||
Reference in New Issue
Block a user