Skip to content

Commit

Permalink
stop while starting or restarting (#2460)
Browse files Browse the repository at this point in the history
  • Loading branch information
MattDHill authored Oct 16, 2023
1 parent edcd1a3 commit 5164c21
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@
<ion-grid>
<ion-row style="padding-left: 12px">
<ion-col>
<ion-button
*ngIf="canStop"
class="action-button"
color="danger"
(click)="tryStop()"
>
<ion-icon slot="start" name="stop-outline"></ion-icon>
Stop
</ion-button>
<ng-container *ngIf="isRunning">
<ion-button class="action-button" color="danger" (click)="tryStop()">
<ion-icon slot="start" name="stop-outline"></ion-icon>
Stop
</ion-button>
<ion-button
class="action-button"
color="tertiary"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ export class AppShowStatusComponent {
return this.status.primary === PrimaryStatus.Running
}

get canStop(): boolean {
return [
PrimaryStatus.Running,
PrimaryStatus.Starting,
PrimaryStatus.Restarting,
].includes(this.status.primary)
}

get isStopped(): boolean {
return this.status.primary === PrimaryStatus.Stopped
}
Expand Down

0 comments on commit 5164c21

Please sign in to comment.