added a sparkbooth section to gallery form, connection details reside there now.
This commit is contained in:
@@ -4,9 +4,9 @@ namespace App\Filament\Pages;
|
||||
|
||||
use App\Models\Gallery;
|
||||
use BackedEnum;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Pages\Page;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Concerns\InteractsWithTable;
|
||||
use Filament\Tables\Contracts\HasTable;
|
||||
@@ -88,11 +88,24 @@ class SparkboothConnections extends Page implements HasTable
|
||||
|
||||
return view('filament.pages.partials.sparkbooth-token', $data);
|
||||
}),
|
||||
Action::make('deleteConnection')
|
||||
->label('Verbindung loeschen')
|
||||
->icon('heroicon-o-trash')
|
||||
->color('danger')
|
||||
->requiresConfirmation()
|
||||
->modalHeading('Sparkbooth-Verbindung entfernen')
|
||||
->modalDescription('Die Galerie bleibt erhalten, aber Upload-Token und Zugangsdaten werden geloescht.')
|
||||
->action(function (Gallery $record): void {
|
||||
$record->clearSparkboothConnection();
|
||||
|
||||
Notification::make()
|
||||
->title('Sparkbooth-Verbindung entfernt.')
|
||||
->body('Der Upload-Token und die Zugangsdaten wurden geloescht.')
|
||||
->success()
|
||||
->send();
|
||||
}),
|
||||
])
|
||||
->emptyStateHeading('Keine Sparkbooth-Verbindungen')
|
||||
->emptyStateDescription('Lege eine neue Verbindung an oder aktiviere Uploads fuer eine Galerie.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user