Files
fotospiel-app/app/Filament/Resources/PhotoboothSettings/Schemas/PhotoboothSettingForm.php

61 lines
2.7 KiB
PHP

<?php
namespace App\Filament\Resources\PhotoboothSettings\Schemas;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\TagsInput;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Schema;
class PhotoboothSettingForm
{
public static function configure(Schema $schema): Schema
{
return $schema->components([
Section::make(__('FTP-Verbindung'))
->description(__('Globale Parameter für den vsftpd-Container.'))
->schema([
TextInput::make('ftp_port')
->numeric()
->required()
->minValue(1)
->maxValue(65535)
->helperText(__('Standard: Port 2121 innerhalb des internen Netzwerks.')),
TextInput::make('rate_limit_per_minute')
->label(__('Uploads pro Minute'))
->numeric()
->required()
->minValue(1)
->maxValue(200)
->helperText(__('Harte Rate-Limits für Photobooth-Clients.')),
TextInput::make('expiry_grace_days')
->label(__('Ablauf (Tage nach Eventende)'))
->numeric()
->required()
->minValue(0)
->maxValue(14),
])->columns(3),
Section::make(__('Sicherheit & Steuerung'))
->schema([
Toggle::make('require_ftps')
->label(__('FTPS erzwingen'))
->helperText(__('Aktivieren, wenn nur verschlüsselte FTP-Verbindungen erlaubt sein sollen.')),
TagsInput::make('allowed_ip_ranges')
->label(__('Erlaubte IP-Ranges (optional)'))
->placeholder('10.0.0.0/24')
->helperText(__('Liste optionaler CIDR-Ranges für Control-Service Allowlisting.')),
TextInput::make('control_service_base_url')
->label(__('Control-Service URL'))
->url()
->maxLength(191)
->helperText(__('REST-Endpunkt des Provisioning-Sidecars (z. B. http://control:8080).')),
TextInput::make('control_service_token_identifier')
->label(__('Token Referenz'))
->maxLength(191)
->helperText(__('Bezeichner des Secrets im Secrets-Store (keine Klartext-Tokens speichern).')),
])->columns(2),
]);
}
}