lokalisierung vervollständigt, api provider testconnection, runware modellsuche aktiviert und style preview generation integriert

This commit is contained in:
2025-12-03 16:11:38 +01:00
parent 090ec2c44b
commit 52dc61ca16
15 changed files with 516 additions and 77 deletions

View File

@@ -16,14 +16,17 @@ use Filament\Schemas\Schema;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
use UnitEnum;
use BackedEnum;
class UserResource extends Resource
{
protected static ?string $model = User::class;
protected static BackedEnum|string|null $navigationIcon = 'heroicon-o-user-group';
protected static string|UnitEnum|null $navigationGroup = 'User Management';
protected static ?string $navigationLabel = 'Users';
protected static ?string $navigationLabel = null;
public static function form(Schema $schema): Schema
{
@@ -32,19 +35,23 @@ class UserResource extends Resource
Section::make('User Details')
->components([
TextInput::make('name')
->label(__('filament.resource.user.form.name'))
->required()
->maxLength(255),
TextInput::make('email')
->label(__('filament.resource.user.form.email'))
->email()
->required()
->maxLength(255),
TextInput::make('password')
->label(__('filament.resource.user.form.password'))
->password()
->dehydrateStateUsing(fn (string $state): string => bcrypt($state))
->dehydrated(fn (?string $state): bool => filled($state))
->required(fn (string $operation): bool => $operation === 'create')
->maxLength(255),
Select::make('role_id')
->label(__('filament.resource.user.form.role'))
->relationship('role', 'name')
->required(),
])->columns(2)
@@ -53,14 +60,17 @@ class UserResource extends Resource
Section::make('Preferences')
->components([
Toggle::make('email_notifications_enabled')
->label(__('filament.resource.user.form.email_notifications_enabled'))
->default(true),
Select::make('theme_preference')
->label(__('filament.resource.user.form.theme_preference'))
->options([
'light' => 'Light',
'dark' => 'Dark',
'light' => __('filament.resource.user.form.theme_light'),
'dark' => __('filament.resource.user.form.theme_dark'),
])
->default('light'),
Select::make('locale')
->label(__('filament.resource.user.form.locale'))
->options([
'en' => 'English',
'de' => 'Deutsch',