Skip to content

Commit

Permalink
Update PowerButtons.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
kokofixcomputers authored Oct 6, 2024
1 parent cdccaf9 commit 75eaa4e
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions resources/scripts/components/server/console/PowerButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ export default ({ className }: PowerButtonProps) => {
Forcibly stopping a server can lead to data corruption.
</Dialog.Confirm>
<Can action={'control.start'}>
<Button.Success
<Button
className={'flex-1'}
disabled={status !== 'offline'}
onClick={onButtonClick.bind(this, 'start')}
>
Start
</Button.Success>
</Button>
</Can>
<Can action={'control.restart'}>
<Button.Text className={'flex-1'} disabled={!status} onClick={onButtonClick.bind(this, 'restart')}>
Expand All @@ -66,9 +66,18 @@ export default ({ className }: PowerButtonProps) => {
<Button.Danger
className={'flex-1'}
disabled={status === 'offline'}
onClick={onButtonClick.bind(this, killable ? 'kill' : 'stop')}
onClick={onButtonClick.bind(this, killable ? 'stop' : 'stop')}
>
{killable ? 'Kill' : 'Stop'}
{killable ? 'Stop' : 'Stop'}
</Button.Danger>
</Can>
<Can action={'control.kill'}>
<Button.Danger
className={'flex-1'}
disabled={status === 'offline'}
onClick={onButtonClick.bind(this, killable ? 'kill' : 'kill')}
>
{killable ? 'Kill' : 'Kill'}
</Button.Danger>
</Can>
</div>
Expand Down

0 comments on commit 75eaa4e

Please sign in to comment.