lokalisierung vervollständigt, api provider testconnection, runware modellsuche aktiviert und style preview generation integriert
This commit is contained in:
@@ -33,6 +33,11 @@ class ApiProviderResource extends Resource
|
||||
return __('filament.navigation.groups.ai_models');
|
||||
}
|
||||
|
||||
public static function getNavigationLabel(): string
|
||||
{
|
||||
return __('filament.navigation.api_providers');
|
||||
}
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
$plugins = self::getAvailablePlugins();
|
||||
@@ -40,31 +45,38 @@ class ApiProviderResource extends Resource
|
||||
return $schema
|
||||
->components([
|
||||
Placeholder::make('provider_dashboard')
|
||||
->label('Provider Dashboard')
|
||||
->label(__('filament.resource.api_provider.dashboard'))
|
||||
->content(fn (?ApiProvider $record) => $record?->getDashboardUrl() ? '<a href="'.$record->getDashboardUrl().'" target="_blank" class="text-primary-600 underline">'.$record->getDashboardUrl().'</a>' : '—')
|
||||
->disableLabel(false)
|
||||
->columnSpanFull()
|
||||
->visible(fn (?ApiProvider $record) => (bool) $record?->getDashboardUrl()),
|
||||
TextInput::make('name')
|
||||
->label(__('filament.resource.api_provider.form.name'))
|
||||
->required()
|
||||
->maxLength(255),
|
||||
Toggle::make('enabled')
|
||||
->label(__('filament.resource.api_provider.form.enabled'))
|
||||
->default(true),
|
||||
TextInput::make('api_url')
|
||||
->label(__('filament.resource.api_provider.form.api_url'))
|
||||
->required()
|
||||
->url()
|
||||
->maxLength(255),
|
||||
TextInput::make('username')
|
||||
->label(__('filament.resource.api_provider.form.username'))
|
||||
->nullable()
|
||||
->maxLength(255),
|
||||
TextInput::make('password')
|
||||
->label(__('filament.resource.api_provider.form.password'))
|
||||
->password()
|
||||
->nullable()
|
||||
->maxLength(255),
|
||||
TextInput::make('token')
|
||||
->label(__('filament.resource.api_provider.form.token'))
|
||||
->nullable()
|
||||
->maxLength(255),
|
||||
Select::make('plugin')
|
||||
->label(__('filament.resource.api_provider.form.plugin'))
|
||||
->options($plugins)
|
||||
->nullable(),
|
||||
]);
|
||||
@@ -74,11 +86,12 @@ class ApiProviderResource extends Resource
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('name')->searchable()->sortable(),
|
||||
TextColumn::make('name')->label(__('filament.resource.api_provider.table.name'))->searchable()->sortable(),
|
||||
IconColumn::make('enabled')
|
||||
->label(__('filament.resource.api_provider.table.enabled'))
|
||||
->boolean(),
|
||||
TextColumn::make('api_url')->searchable(),
|
||||
TextColumn::make('plugin')->searchable()->sortable(),
|
||||
TextColumn::make('api_url')->label(__('filament.resource.api_provider.table.api_url'))->searchable(),
|
||||
TextColumn::make('plugin')->label(__('filament.resource.api_provider.table.plugin'))->searchable()->sortable(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user