allow to reorder startup_commands and docker_images

This commit is contained in:
Boy132
2026-05-04 13:42:42 +02:00
parent 2bbfb0eef9
commit 73fc675eb9
3 changed files with 32 additions and 10 deletions

View File

@@ -103,6 +103,7 @@ class CreateEgg extends CreateRecord
->live()
->columnSpanFull()
->required()
->reorderable()
->addActionLabel(trans('admin/egg.add_startup'))
->keyLabel(trans('admin/egg.startup_name'))
->keyPlaceholder('Default')
@@ -135,6 +136,7 @@ class CreateEgg extends CreateRecord
->live()
->columnSpanFull()
->required()
->reorderable()
->addActionLabel(trans('admin/egg.add_image'))
->keyLabel(trans('admin/egg.docker_name'))
->keyPlaceholder('Java 21')
@@ -176,7 +178,6 @@ class CreateEgg extends CreateRecord
->grid()
->relationship('variables')
->orderColumn()
->reorderAction(fn (Action $action) => $action->hiddenLabel()->tooltip(fn () => $action->getLabel()))
->collapsible()->collapsed()
->columnSpan(2)
->defaultItems(0)

View File

@@ -118,6 +118,7 @@ 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'))
@@ -145,6 +146,7 @@ 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'))
@@ -182,7 +184,6 @@ 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'])

View File

@@ -97,15 +97,35 @@ class FilamentServiceProvider extends ServiceProvider
Select::configureUsing(fn (Select $select) => $select->native(false));
KeyValue::configureUsing(fn (KeyValue $keyValue) => $keyValue->deleteAction(function (Action $action) {
$action->tooltip(fn () => $action->getLabel());
$action->iconSize(IconSize::Large);
}));
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);
})
);
Repeater::configureUsing(fn (Repeater $repeater) => $repeater->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);
})
);
ShowPasswordAction::configureUsing(function (ShowPasswordAction $action) {
$action->tooltip(fn () => $action->getLabel());