mirror of
https://github.com/pelican-dev/panel.git
synced 2026-02-05 00:39:46 +03:00
Fix notifications for DeleteAction on EditEgg page (#2165)
This commit is contained in:
@@ -450,17 +450,7 @@ class EditEgg extends EditRecord
|
|||||||
return [
|
return [
|
||||||
DeleteAction::make()
|
DeleteAction::make()
|
||||||
->disabled(fn (Egg $egg): bool => $egg->servers()->count() > 0)
|
->disabled(fn (Egg $egg): bool => $egg->servers()->count() > 0)
|
||||||
->tooltip(fn (Egg $egg): string => $egg->servers()->count() <= 0 ? trans('filament-actions::delete.single.label') : trans('admin/egg.in_use'))
|
->tooltip(fn (Egg $egg): string => $egg->servers()->count() <= 0 ? trans('filament-actions::delete.single.label') : trans('admin/egg.in_use')),
|
||||||
->successNotification(fn (Egg $egg) => Notification::make()
|
|
||||||
->success()
|
|
||||||
->title(trans('admin/egg.delete_success'))
|
|
||||||
->body(trans('admin/egg.deleted', ['egg' => $egg->name]))
|
|
||||||
)
|
|
||||||
->failureNotification(fn (Egg $egg) => Notification::make()
|
|
||||||
->danger()
|
|
||||||
->title(trans('admin/egg.delete_failed'))
|
|
||||||
->body(trans('admin/egg.could_not_delete', ['egg' => $egg->name]))
|
|
||||||
),
|
|
||||||
ExportEggAction::make(),
|
ExportEggAction::make(),
|
||||||
ImportEggAction::make()
|
ImportEggAction::make()
|
||||||
->multiple(false),
|
->multiple(false),
|
||||||
|
|||||||
@@ -115,10 +115,6 @@ return [
|
|||||||
'no_update_url' => 'The following eggs do not have a working update URL set: :eggs',
|
'no_update_url' => 'The following eggs do not have a working update URL set: :eggs',
|
||||||
'cannot_delete' => 'Cannot delete :count egg(s)',
|
'cannot_delete' => 'Cannot delete :count egg(s)',
|
||||||
'eggs_have_servers' => 'The following eggs have servers and cannot be deleted: :eggs',
|
'eggs_have_servers' => 'The following eggs have servers and cannot be deleted: :eggs',
|
||||||
'delete_success' => 'Egg deleted successfully',
|
|
||||||
'deleted' => 'Deleted: :egg',
|
|
||||||
'delete_failed' => 'Failed to delete egg',
|
|
||||||
'could_not_delete' => 'Could not delete: :egg',
|
|
||||||
'updated_from' => 'Successfully updated from: :url',
|
'updated_from' => 'Successfully updated from: :url',
|
||||||
'update_error' => 'Error: :error',
|
'update_error' => 'Error: :error',
|
||||||
'updated_eggs' => 'Updated: :eggs',
|
'updated_eggs' => 'Updated: :eggs',
|
||||||
|
|||||||
Reference in New Issue
Block a user