Replace sparkbooth upload with photobooth uploader

This commit is contained in:
soeren
2026-01-29 12:16:27 +01:00
parent e37f533bcb
commit 084c52ba2d
27 changed files with 2163 additions and 50 deletions

View File

@@ -79,14 +79,14 @@ class GalleryForm
'url' => $record ? URL::route('gallery.show', $record) : null,
]),
]),
Tab::make('Sparkbooth')
Tab::make('Photobooth')
->schema([
Section::make('Sparkbooth Upload')
Section::make('Photobooth Upload')
->columns(2)
->schema([
Toggle::make('upload_enabled')
->label('Uploads aktivieren')
->helperText('Steuert, ob Sparkbooth-Uploads erlaubt sind.')
->helperText('Steuert, ob Photobooth-Uploads erlaubt sind.')
->default(false),
Select::make('sparkbooth_response_format')
->label('Standard-Antwortformat')
@@ -96,25 +96,25 @@ class GalleryForm
])
->default('json'),
TextInput::make('sparkbooth_username')
->label('Sparkbooth Benutzername')
->helperText('Wird in Sparkbooth unter „Username“ eingetragen. Erlaubt sind Buchstaben, Zahlen sowie ._-')
->label('Photobooth Benutzername')
->helperText('Wird im Photobooth Uploader unter „Benutzername“ eingetragen. Erlaubt sind Buchstaben, Zahlen sowie ._-')
->maxLength(64)
->rule('regex:/^[A-Za-z0-9._-]+$/')
->unique(table: \App\Models\Gallery::class, column: 'sparkbooth_username', ignoreRecord: true)
->dehydrateStateUsing(fn (?string $state): ?string => $state ? Str::of($state)->lower()->trim()->value() : null),
TextInput::make('sparkbooth_password')
->label('Sparkbooth Passwort (neu)')
->label('Photobooth Passwort (neu)')
->password()
->revealable()
->dehydrated(false)
->afterStateHydrated(fn (callable $set) => $set('sparkbooth_password', null))
->helperText('Leer lassen, um das bestehende Passwort zu behalten.'),
]),
View::make('filament.pages.partials.sparkbooth-token')
View::make('filament.pages.partials.photobooth-token')
->columnSpanFull()
->visible(fn (?object $record) => (bool) $record?->id)
->viewData(fn (?object $record) => [
'upload_url' => URL::route('api.sparkbooth.upload'),
'upload_url' => URL::route('api.photobooth.upload'),
'gallery_url' => $record ? URL::route('gallery.show', $record) : null,
'sparkbooth_username' => $record?->sparkbooth_username,
'sparkbooth_password' => $record?->sparkbooth_password,