diff --git a/web/Modules/Email/App/Filament/Resources/EmailDomainResource.php b/web/Modules/Email/App/Filament/Resources/EmailDomainResource.php index bfdc4ce..9b9a2f3 100644 --- a/web/Modules/Email/App/Filament/Resources/EmailDomainResource.php +++ b/web/Modules/Email/App/Filament/Resources/EmailDomainResource.php @@ -11,6 +11,7 @@ use Filament\Tables; use Filament\Tables\Table; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; +use Modules\Email\App\Http\Livewire\DkimSetup; use Modules\Email\App\Models\EmailBox; use Modules\Email\DkimDomainSetup; @@ -47,11 +48,14 @@ class EmailDomainResource extends Resource // ]) ->actions([ - Tables\Actions\Action::make('dkimSetup') + Tables\Actions\ViewAction::make('dkimSetup') ->label('DKIM Setup') - ->action(function (Domain $record) { - $output = DkimDomainSetup::run($record->domain); - dd($output); + ->form(function (Domain $record) { + return [ + Forms\Components\Livewire::make(DkimSetup::class, [ + 'domain' => $record->domain, + ]), + ]; }) ->icon('heroicon-o-pencil'), ]) diff --git a/web/Modules/Email/App/Http/Livewire/DkimSetup.php b/web/Modules/Email/App/Http/Livewire/DkimSetup.php new file mode 100644 index 0000000..c2c41b2 --- /dev/null +++ b/web/Modules/Email/App/Http/Livewire/DkimSetup.php @@ -0,0 +1,27 @@ +secure(); + + return view('email::livewire.dkim-setup', [ + 'secure' => $secure, + ]); + } + + public function secure() + { + $output = DkimDomainSetup::run($this->domain); + + return $output; + } +} diff --git a/web/Modules/Email/resources/views/livewire/dkim-setup.blade.php b/web/Modules/Email/resources/views/livewire/dkim-setup.blade.php new file mode 100644 index 0000000..1e2ec0f --- /dev/null +++ b/web/Modules/Email/resources/views/livewire/dkim-setup.blade.php @@ -0,0 +1,19 @@ +