mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 17:54:45 +02:00
Rename to normal
This commit is contained in:
parent
67edf4f472
commit
204734914d
@ -4,7 +4,7 @@ namespace App\Enums;
|
||||
|
||||
enum ServerState: string
|
||||
{
|
||||
case None = 'none';
|
||||
case Normal = 'normal';
|
||||
case Installing = 'installing';
|
||||
case InstallFailed = 'install_failed';
|
||||
case ReinstallFailed = 'reinstall_failed';
|
||||
@ -14,7 +14,7 @@ enum ServerState: string
|
||||
public function icon(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::None => 'tabler-heart',
|
||||
self::Normal => 'tabler-heart',
|
||||
self::Installing => 'tabler-heart-bolt',
|
||||
self::InstallFailed => 'tabler-heart-x',
|
||||
self::ReinstallFailed => 'tabler-heart-x',
|
||||
@ -26,7 +26,7 @@ enum ServerState: string
|
||||
public function color(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::None => 'primary',
|
||||
self::Normal => 'primary',
|
||||
self::Installing => 'info',
|
||||
self::InstallFailed => 'danger',
|
||||
self::ReinstallFailed => 'danger',
|
||||
|
@ -72,7 +72,7 @@ class ServerResource extends Resource
|
||||
->helperText('')
|
||||
->hiddenOn('create')
|
||||
->disableOptionWhen(fn ($state, $value) => $state !== $value)
|
||||
->formatStateUsing(fn ($state) => $state ?? 'none')
|
||||
->formatStateUsing(fn ($state) => $state ?? ServerState::Normal)
|
||||
->options(collect(ServerState::cases())->mapWithKeys(
|
||||
fn (ServerState $state) => [$state->value => str($state->value)->replace('_', ' ')->ucwords()]
|
||||
))
|
||||
|
Loading…
x
Reference in New Issue
Block a user