Compare commits

...

1 Commits

Author SHA1 Message Date
Boy132
73fc675eb9 allow to reorder startup_commands and docker_images 2026-05-04 13:42:42 +02:00
3 changed files with 32 additions and 10 deletions

View File

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

View File

@@ -118,6 +118,7 @@ class EditEgg extends EditRecord
->live() ->live()
->columnSpanFull() ->columnSpanFull()
->required() ->required()
->reorderable()
->addActionLabel(trans('admin/egg.add_startup')) ->addActionLabel(trans('admin/egg.add_startup'))
->keyLabel(trans('admin/egg.startup_name')) ->keyLabel(trans('admin/egg.startup_name'))
->valueLabel(trans('admin/egg.startup_command')) ->valueLabel(trans('admin/egg.startup_command'))
@@ -145,6 +146,7 @@ class EditEgg extends EditRecord
->live() ->live()
->columnSpanFull() ->columnSpanFull()
->required() ->required()
->reorderable()
->addActionLabel(trans('admin/egg.add_image')) ->addActionLabel(trans('admin/egg.add_image'))
->keyLabel(trans('admin/egg.docker_name')) ->keyLabel(trans('admin/egg.docker_name'))
->valueLabel(trans('admin/egg.docker_uri')) ->valueLabel(trans('admin/egg.docker_uri'))
@@ -182,7 +184,6 @@ class EditEgg extends EditRecord
->grid() ->grid()
->relationship('variables') ->relationship('variables')
->orderColumn() ->orderColumn()
->reorderAction(fn (Action $action) => $action->hiddenLabel()->tooltip(fn () => $action->getLabel()))
->collapsible()->collapsed() ->collapsible()->collapsed()
->addActionLabel(trans('admin/egg.add_new_variable')) ->addActionLabel(trans('admin/egg.add_new_variable'))
->itemLabel(fn (array $state) => $state['name']) ->itemLabel(fn (array $state) => $state['name'])

View File

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