mirror of
https://github.com/pelican-dev/panel.git
synced 2026-05-04 18:00:48 +03:00
Compare commits
1 Commits
boy132/reo
...
boy132/rep
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
670a9c1a97 |
@@ -41,17 +41,8 @@ enum ContainerStatus: string implements HasColor, HasIcon, HasLabel
|
||||
};
|
||||
}
|
||||
|
||||
public function getColor(bool $hex = false): string
|
||||
public function getColor(): string
|
||||
{
|
||||
if ($hex) {
|
||||
return match ($this) {
|
||||
self::Created, self::Restarting => '#2563EB',
|
||||
self::Starting, self::Paused, self::Removing, self::Stopping => '#D97706',
|
||||
self::Running => '#22C55E',
|
||||
self::Exited, self::Missing, self::Dead, self::Offline => '#EF4444',
|
||||
};
|
||||
}
|
||||
|
||||
return match ($this) {
|
||||
self::Created => 'primary',
|
||||
self::Starting => 'warning',
|
||||
|
||||
@@ -25,16 +25,8 @@ enum ServerState: string implements HasColor, HasIcon, HasLabel
|
||||
};
|
||||
}
|
||||
|
||||
public function getColor(bool $hex = false): string
|
||||
public function getColor(): string
|
||||
{
|
||||
if ($hex) {
|
||||
return match ($this) {
|
||||
self::Installing, self::RestoringBackup => '#2563EB',
|
||||
self::Suspended => '#D97706',
|
||||
self::InstallFailed, self::ReinstallFailed => '#EF4444',
|
||||
};
|
||||
}
|
||||
|
||||
return match ($this) {
|
||||
self::Installing => 'primary',
|
||||
self::InstallFailed => 'danger',
|
||||
|
||||
@@ -103,7 +103,6 @@ class CreateEgg extends CreateRecord
|
||||
->live()
|
||||
->columnSpanFull()
|
||||
->required()
|
||||
->reorderable()
|
||||
->addActionLabel(trans('admin/egg.add_startup'))
|
||||
->keyLabel(trans('admin/egg.startup_name'))
|
||||
->keyPlaceholder('Default')
|
||||
@@ -136,7 +135,6 @@ class CreateEgg extends CreateRecord
|
||||
->live()
|
||||
->columnSpanFull()
|
||||
->required()
|
||||
->reorderable()
|
||||
->addActionLabel(trans('admin/egg.add_image'))
|
||||
->keyLabel(trans('admin/egg.docker_name'))
|
||||
->keyPlaceholder('Java 21')
|
||||
@@ -178,6 +176,7 @@ class CreateEgg extends CreateRecord
|
||||
->grid()
|
||||
->relationship('variables')
|
||||
->orderColumn()
|
||||
->reorderAction(fn (Action $action) => $action->hiddenLabel()->tooltip(fn () => $action->getLabel()))
|
||||
->collapsible()->collapsed()
|
||||
->columnSpan(2)
|
||||
->defaultItems(0)
|
||||
|
||||
@@ -118,7 +118,6 @@ class EditEgg extends EditRecord
|
||||
->live()
|
||||
->columnSpanFull()
|
||||
->required()
|
||||
->reorderable()
|
||||
->addActionLabel(trans('admin/egg.add_startup'))
|
||||
->keyLabel(trans('admin/egg.startup_name'))
|
||||
->valueLabel(trans('admin/egg.startup_command'))
|
||||
@@ -146,7 +145,6 @@ class EditEgg extends EditRecord
|
||||
->live()
|
||||
->columnSpanFull()
|
||||
->required()
|
||||
->reorderable()
|
||||
->addActionLabel(trans('admin/egg.add_image'))
|
||||
->keyLabel(trans('admin/egg.docker_name'))
|
||||
->valueLabel(trans('admin/egg.docker_uri'))
|
||||
@@ -184,6 +182,7 @@ class EditEgg extends EditRecord
|
||||
->grid()
|
||||
->relationship('variables')
|
||||
->orderColumn()
|
||||
->reorderAction(fn (Action $action) => $action->hiddenLabel()->tooltip(fn () => $action->getLabel()))
|
||||
->collapsible()->collapsed()
|
||||
->addActionLabel(trans('admin/egg.add_new_variable'))
|
||||
->itemLabel(fn (array $state) => $state['name'])
|
||||
|
||||
@@ -97,35 +97,15 @@ class FilamentServiceProvider extends ServiceProvider
|
||||
|
||||
Select::configureUsing(fn (Select $select) => $select->native(false));
|
||||
|
||||
KeyValue::configureUsing(fn (KeyValue $keyValue) => $keyValue
|
||||
->addAction(function (Action $action) {
|
||||
$action->tooltip(fn () => $action->getLabel());
|
||||
$action->iconSize(IconSize::Large);
|
||||
})
|
||||
->deleteAction(function (Action $action) {
|
||||
$action->tooltip(fn () => $action->getLabel());
|
||||
$action->iconSize(IconSize::Large);
|
||||
})
|
||||
->reorderAction(function (Action $action) {
|
||||
$action->tooltip(fn () => $action->getLabel());
|
||||
$action->iconSize(IconSize::Large);
|
||||
})
|
||||
);
|
||||
KeyValue::configureUsing(fn (KeyValue $keyValue) => $keyValue->deleteAction(function (Action $action) {
|
||||
$action->tooltip(fn () => $action->getLabel());
|
||||
$action->iconSize(IconSize::Large);
|
||||
}));
|
||||
|
||||
Repeater::configureUsing(fn (Repeater $repeater) => $repeater
|
||||
->addAction(function (Action $action) {
|
||||
$action->tooltip(fn () => $action->getLabel());
|
||||
$action->iconSize(IconSize::Large);
|
||||
})
|
||||
->deleteAction(function (Action $action) {
|
||||
$action->tooltip(fn () => $action->getLabel());
|
||||
$action->iconSize(IconSize::Large);
|
||||
})
|
||||
->reorderAction(function (Action $action) {
|
||||
$action->tooltip(fn () => $action->getLabel());
|
||||
$action->iconSize(IconSize::Large);
|
||||
})
|
||||
);
|
||||
Repeater::configureUsing(fn (Repeater $repeater) => $repeater->deleteAction(function (Action $action) {
|
||||
$action->tooltip(fn () => $action->getLabel());
|
||||
$action->iconSize(IconSize::Large);
|
||||
}));
|
||||
|
||||
ShowPasswordAction::configureUsing(function (ShowPasswordAction $action) {
|
||||
$action->tooltip(fn () => $action->getLabel());
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="relative cursor-pointer"
|
||||
x-on:click="{{ $component->redirectUrl() }}"
|
||||
x-on:auxclick.prevent="if ($event.button === 1) {{ $component->redirectUrl(true) }}">
|
||||
<div class="absolute left-0 top-1 bottom-0 w-1 rounded-lg" style="background-color: #D97706;"></div>
|
||||
<div class="absolute left-0 top-1 bottom-0 w-1 rounded-lg fi-color fi-color-warning fi-bg-color-600" style="background-color: var(--bg);"></div>
|
||||
|
||||
<div class="flex-1 dark:bg-gray-800 dark:text-white rounded-lg overflow-hidden p-3">
|
||||
@if($backgroundImage)
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
x-on:click="{{ $component->redirectUrl() }}"
|
||||
x-on:auxclick.prevent="if ($event.button === 1) {{ $component->redirectUrl(true) }}">
|
||||
|
||||
<div class="absolute left-0 top-1 bottom-0 w-1 rounded-lg"
|
||||
style="background-color: {{ $server->condition->getColor(true) }};">
|
||||
</div>
|
||||
<div class="absolute left-0 top-1 bottom-0 w-1 rounded-lg fi-color fi-color-{{ $server->condition->getColor() }} fi-bg-color-600" style="background-color: var(--bg);"> </div>
|
||||
|
||||
<div class="flex-1 dark:bg-gray-800 dark:text-white rounded-lg overflow-hidden p-3">
|
||||
@if($backgroundImage)
|
||||
|
||||
Reference in New Issue
Block a user