diff --git a/app/Filament/Admin/Resources/Eggs/Pages/EditEgg.php b/app/Filament/Admin/Resources/Eggs/Pages/EditEgg.php index 023f212c9..cf78faa5c 100644 --- a/app/Filament/Admin/Resources/Eggs/Pages/EditEgg.php +++ b/app/Filament/Admin/Resources/Eggs/Pages/EditEgg.php @@ -303,7 +303,11 @@ class EditEgg extends EditRecord ->tooltip(fn (Egg $egg): string => $egg->servers()->count() <= 0 ? trans('filament-actions::delete.single.label') : trans('admin/egg.in_use')), ExportEggAction::make(), ImportEggAction::make() - ->multiple(false), + ->multiple(false) + ->after(function () { + $this->record->refresh(); + $this->refreshForm(); + }), Action::make('save') ->hiddenLabel() ->action('save') @@ -316,6 +320,8 @@ class EditEgg extends EditRecord public function refreshForm(): void { $this->fillForm(); + + $this->dispatch('setContent', content: $this->record->script_install ?? ''); } protected function getFormActions(): array diff --git a/app/Services/Eggs/Sharing/EggImporterService.php b/app/Services/Eggs/Sharing/EggImporterService.php index 30da81522..1f3356d59 100644 --- a/app/Services/Eggs/Sharing/EggImporterService.php +++ b/app/Services/Eggs/Sharing/EggImporterService.php @@ -113,6 +113,7 @@ class EggImporterService 'uuid' => $uuid, 'author' => Arr::get($parsed, 'author'), 'copy_script_from' => null, + 'config_from' => null, ]); for ($i = 0; $i < count($parsed['variables']); $i++) {