diff --git a/app/Extensions/Captcha/Providers/TurnstileProvider.php b/app/Extensions/Captcha/Providers/TurnstileProvider.php index cb4ad857c..60d66a67b 100644 --- a/app/Extensions/Captcha/Providers/TurnstileProvider.php +++ b/app/Extensions/Captcha/Providers/TurnstileProvider.php @@ -4,7 +4,7 @@ namespace App\Extensions\Captcha\Providers; use App\Filament\Components\Forms\Fields\TurnstileCaptcha; use Exception; -use Filament\Forms\Components\Placeholder; +use Filament\Infolists\Components\TextEntry; use Filament\Forms\Components\Toggle; use Illuminate\Foundation\Application; use Illuminate\Support\Facades\Http; @@ -47,10 +47,10 @@ class TurnstileProvider extends CaptchaProvider ->onColor('success') ->offColor('danger') ->default(env('CAPTCHA_TURNSTILE_VERIFY_DOMAIN', true)), - Placeholder::make('info') + TextEntry::make('info') ->label(trans('admin/setting.captcha.info_label')) ->columnSpan(2) - ->content(new HtmlString(trans('admin/setting.captcha.info'))), + ->state(new HtmlString(trans('admin/setting.captcha.info'))), ]); } diff --git a/app/Extensions/OAuth/Providers/DiscordProvider.php b/app/Extensions/OAuth/Providers/DiscordProvider.php index b486ffa61..7d761c9a1 100644 --- a/app/Extensions/OAuth/Providers/DiscordProvider.php +++ b/app/Extensions/OAuth/Providers/DiscordProvider.php @@ -2,7 +2,7 @@ namespace App\Extensions\OAuth\Providers; -use Filament\Forms\Components\Placeholder; +use Filament\Infolists\Components\TextEntry; use Filament\Forms\Components\TextInput; use Illuminate\Foundation\Application; use Illuminate\Support\Facades\Blade; @@ -32,10 +32,10 @@ final class DiscordProvider extends OAuthProvider return array_merge([ \Filament\Schemas\Components\Wizard\Step::make('Register new Discord OAuth App') ->schema([ - Placeholder::make('INeedAName') - ->content(new HtmlString(Blade::render('

Visit the Discord Developer Portal and click on New Application. Enter a Name (e.g. your panel name) and click on Create.

Copy the Client ID and the Client Secret from the OAuth2 tab, you will need them in the final step.

'))), - Placeholder::make('INeedAName2') - ->content(new HtmlString('

Under Redirects add the below URL.

')), + TextEntry::make('INeedAName') + ->state(new HtmlString(Blade::render('

Visit the Discord Developer Portal and click on New Application. Enter a Name (e.g. your panel name) and click on Create.

Copy the Client ID and the Client Secret from the OAuth2 tab, you will need them in the final step.

'))), + TextEntry::make('INeedAName2') + ->state(new HtmlString('

Under Redirects add the below URL.

')), TextInput::make('_noenv_callback') ->label('Redirect URL') ->dehydrated() diff --git a/app/Extensions/OAuth/Providers/GithubProvider.php b/app/Extensions/OAuth/Providers/GithubProvider.php index 34bf298f4..1a6fd6c45 100644 --- a/app/Extensions/OAuth/Providers/GithubProvider.php +++ b/app/Extensions/OAuth/Providers/GithubProvider.php @@ -2,7 +2,7 @@ namespace App\Extensions\OAuth\Providers; -use Filament\Forms\Components\Placeholder; +use Filament\Infolists\Components\TextEntry; use Filament\Forms\Components\TextInput; use Illuminate\Foundation\Application; use Illuminate\Support\Facades\Blade; @@ -26,21 +26,21 @@ final class GithubProvider extends OAuthProvider return array_merge([ \Filament\Schemas\Components\Wizard\Step::make('Register new Github OAuth App') ->schema([ - Placeholder::make('INeedAName2') - ->content(new HtmlString(Blade::render('

Visit the Github Developer Dashboard, go to OAuth Apps and click on New OAuth App.

Enter an Application name (e.g. your panel name), set Homepage URL to your panel url and enter the below url as Authorization callback URL.

'))), + TextEntry::make('INeedAName2') + ->state(new HtmlString(Blade::render('

Visit the Github Developer Dashboard, go to OAuth Apps and click on New OAuth App.

Enter an Application name (e.g. your panel name), set Homepage URL to your panel url and enter the below url as Authorization callback URL.

'))), TextInput::make('_noenv_callback') ->label('Authorization callback URL') ->dehydrated() ->disabled() //TODO ->hintAction(fn (string $state) => request()->isSecure() ? CopyAction::make()->copyable($state) : null) ->default(fn () => url('/auth/oauth/callback/github')), - Placeholder::make('INeedAName') - ->content(new HtmlString('

When you filled all fields click on Register application.

')), + TextEntry::make('INeedAName') + ->state(new HtmlString('

When you filled all fields click on Register application.

')), ]), \Filament\Schemas\Components\Wizard\Step::make('Create Client Secret') ->schema([ - Placeholder::make('INeedAName3') - ->content(new HtmlString('

Once you registered your app, generate a new Client Secret.

You will also need the Client ID.

')), + TextEntry::make('INeedAName3') + ->state(new HtmlString('

Once you registered your app, generate a new Client Secret.

You will also need the Client ID.

')), ]), ], parent::getSetupSteps()); } diff --git a/app/Extensions/OAuth/Providers/GitlabProvider.php b/app/Extensions/OAuth/Providers/GitlabProvider.php index 2fedc8132..c94a368b4 100644 --- a/app/Extensions/OAuth/Providers/GitlabProvider.php +++ b/app/Extensions/OAuth/Providers/GitlabProvider.php @@ -2,7 +2,7 @@ namespace App\Extensions\OAuth\Providers; -use Filament\Forms\Components\Placeholder; +use Filament\Infolists\Components\TextEntry; use Filament\Forms\Components\TextInput; use Illuminate\Foundation\Application; use Illuminate\Support\Facades\Blade; @@ -46,8 +46,8 @@ final class GitlabProvider extends OAuthProvider return array_merge([ \Filament\Schemas\Components\Wizard\Step::make('Register new Gitlab OAuth App') ->schema([ - Placeholder::make('INeedAName') - ->content(new HtmlString(Blade::render('Check out the Gitlab docs on how to create the oauth app.'))), + TextEntry::make('INeedAName') + ->state(new HtmlString(Blade::render('Check out the Gitlab docs on how to create the oauth app.'))), TextInput::make('_noenv_callback') ->label('Redirect URI') ->dehydrated() diff --git a/app/Extensions/OAuth/Providers/SteamProvider.php b/app/Extensions/OAuth/Providers/SteamProvider.php index 24e6e5989..040827636 100644 --- a/app/Extensions/OAuth/Providers/SteamProvider.php +++ b/app/Extensions/OAuth/Providers/SteamProvider.php @@ -2,7 +2,7 @@ namespace App\Extensions\OAuth\Providers; -use Filament\Forms\Components\Placeholder; +use Filament\Infolists\Components\TextEntry; use Filament\Forms\Components\TextInput; use Illuminate\Foundation\Application; use Illuminate\Support\Facades\Blade; @@ -57,8 +57,8 @@ final class SteamProvider extends OAuthProvider return array_merge([ \Filament\Schemas\Components\Wizard\Step::make('Create API Key') ->schema([ - Placeholder::make('INeedAName') - ->content(new HtmlString(Blade::render('Visit https://steamcommunity.com/dev/apikey to generate an API key.'))), + TextEntry::make('INeedAName') + ->state(new HtmlString(Blade::render('Visit https://steamcommunity.com/dev/apikey to generate an API key.'))), ]), ], parent::getSetupSteps()); } diff --git a/app/Filament/Admin/Resources/DatabaseHostResource/Pages/CreateDatabaseHost.php b/app/Filament/Admin/Resources/DatabaseHostResource/Pages/CreateDatabaseHost.php index a3a9cebb1..892ce76e1 100644 --- a/app/Filament/Admin/Resources/DatabaseHostResource/Pages/CreateDatabaseHost.php +++ b/app/Filament/Admin/Resources/DatabaseHostResource/Pages/CreateDatabaseHost.php @@ -7,7 +7,7 @@ use App\Services\Databases\Hosts\HostCreationService; use Exception; use Filament\Schemas\Components\Fieldset; use Filament\Forms\Components\Hidden; -use Filament\Forms\Components\Placeholder; +use Filament\Infolists\Components\TextEntry; use Filament\Forms\Components\Select; use Filament\Forms\Components\TextInput; use Filament\Forms\Components\Toggle; @@ -48,8 +48,8 @@ class CreateDatabaseHost extends CreateRecord Step::make(trans('admin/databasehost.setup.preparations')) ->columns() ->schema([ - Placeholder::make('INeedAName') - ->content(trans('admin/databasehost.setup.note')), + TextEntry::make('INeedAName') + ->state(trans('admin/databasehost.setup.note')), Toggle::make('different_server') ->label(new HtmlString(trans('admin/databasehost.setup.different_server'))) ->dehydrated(false) @@ -82,8 +82,8 @@ class CreateDatabaseHost extends CreateRecord ->schema([ Fieldset::make(trans('admin/databasehost.setup.database_user')) ->schema([ - Placeholder::make('INeedAName') - ->content(new HtmlString(trans('admin/databasehost.setup.cli_login'))) + TextEntry::make('INeedAName') + ->state(new HtmlString(trans('admin/databasehost.setup.cli_login'))) ->columnSpanFull(), TextInput::make('create_user') ->label(trans('admin/databasehost.setup.command_create_user')) @@ -99,14 +99,14 @@ class CreateDatabaseHost extends CreateRecord ->dehydrated(false) // TODO ->suffixAction(fn (string $state) => request()->isSecure() ? CopyAction::make()->copyable($state) : null) ->columnSpanFull(), - Placeholder::make('INeedAName') - ->content(new HtmlString(trans('admin/databasehost.setup.cli_exit'))) + TextEntry::make('INeedAName') + ->state(new HtmlString(trans('admin/databasehost.setup.cli_exit'))) ->columnSpanFull(), ]), Fieldset::make(trans('admin/databasehost.setup.external_access')) ->schema([ - Placeholder::make('INeedAName2') - ->content(new HtmlString(trans('admin/databasehost.setup.allow_external_access'))) + TextEntry::make('INeedAName2') + ->state(new HtmlString(trans('admin/databasehost.setup.allow_external_access'))) ->columnSpanFull(), ]), ]), diff --git a/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php b/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php index 88feccffd..a45329a45 100644 --- a/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php +++ b/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php @@ -13,7 +13,7 @@ use Filament\Actions\Action; use Filament\Actions\DeleteAction; use Filament\Schemas\Components\Actions; use Filament\Schemas\Components\Fieldset; -use Filament\Forms\Components\Placeholder; +use Filament\Infolists\Components\TextEntry; use Filament\Forms\Components\TagsInput; use Filament\Forms\Components\Textarea; use Filament\Forms\Components\TextInput; @@ -73,18 +73,18 @@ class EditNode extends EditRecord ->label(trans('admin/node.node_info')) ->columns(4) ->schema([ - Placeholder::make('INeedAName') + TextEntry::make('INeedAName') ->label(trans('admin/node.wings_version')) - ->content(fn (Node $node, SoftwareVersionService $versionService) => ($node->systemInformation()['version'] ?? trans('admin/node.unknown')) . ' (' . trans('admin/node.latest') . ': ' . $versionService->latestWingsVersion() . ')'), - Placeholder::make('INeedAName2') + ->state(fn (Node $node, SoftwareVersionService $versionService) => ($node->systemInformation()['version'] ?? trans('admin/node.unknown')) . ' (' . trans('admin/node.latest') . ': ' . $versionService->latestWingsVersion() . ')'), + TextEntry::make('INeedAName2') ->label(trans('admin/node.cpu_threads')) - ->content(fn (Node $node) => $node->systemInformation()['cpu_count'] ?? 0), - Placeholder::make('INeedAName3') + ->state(fn (Node $node) => $node->systemInformation()['cpu_count'] ?? 0), + TextEntry::make('INeedAName3') ->label(trans('admin/node.architecture')) - ->content(fn (Node $node) => $node->systemInformation()['architecture'] ?? trans('admin/node.unknown')), - Placeholder::make('INeedAName4') + ->state(fn (Node $node) => $node->systemInformation()['architecture'] ?? trans('admin/node.unknown')), + TextEntry::make('INeedAName4') ->label(trans('admin/node.kernel')) - ->content(fn (Node $node) => $node->systemInformation()['kernel_version'] ?? trans('admin/node.unknown')), + ->state(fn (Node $node) => $node->systemInformation()['kernel_version'] ?? trans('admin/node.unknown')), ]), View::make('filament.components.node-cpu-chart') ->columnSpan([ @@ -501,10 +501,10 @@ class EditNode extends EditRecord ->label(trans('admin/node.tabs.config_file')) ->icon('tabler-code') ->schema([ - Placeholder::make('instructions') + TextEntry::make('instructions') ->label(trans('admin/node.instructions')) ->columnSpanFull() - ->content(new HtmlString(trans('admin/node.instructions_help'))), + ->state(new HtmlString(trans('admin/node.instructions_help'))), Textarea::make('config') ->label('/etc/pelican/config.yml') ->disabled() diff --git a/app/Filament/Admin/Resources/RoleResource.php b/app/Filament/Admin/Resources/RoleResource.php index 66f0b0294..e7fd3d7ed 100644 --- a/app/Filament/Admin/Resources/RoleResource.php +++ b/app/Filament/Admin/Resources/RoleResource.php @@ -4,13 +4,16 @@ namespace App\Filament\Admin\Resources; use App\Filament\Admin\Resources\RoleResource\Pages; use App\Models\Role; +use Exception; +use Filament\Actions\Action; use Filament\Actions\CreateAction; use Filament\Actions\DeleteBulkAction; use Filament\Actions\EditAction; use Filament\Actions\ViewAction; use Filament\Forms\Components\CheckboxList; -use Filament\Forms\Components\Placeholder; +use Filament\Schemas\Schema; use Filament\Forms\Components\TextInput; +use Filament\Infolists\Components\TextEntry; use Filament\Resources\Resource; use Filament\Schemas\Components\Component; use Filament\Schemas\Components\Fieldset; @@ -90,7 +93,10 @@ class RoleResource extends Resource ]); } - public static function form(Form|\Filament\Schemas\Schema $schema): \Filament\Schemas\Schema + /** + * @throws Exception + */ + public static function form(Form|Schema $schema): Schema { $permissionSections = []; @@ -120,15 +126,16 @@ class RoleResource extends Resource ->columns(3) ->schema($permissionSections) ->hidden(fn (Get $get) => $get('name') === Role::ROOT_ADMIN), - Placeholder::make('permissions') + TextEntry::make('permissions') ->label(trans('admin/role.permissions')) - ->content(trans('admin/role.root_admin', ['role' => Role::ROOT_ADMIN])) + ->state(trans('admin/role.root_admin', ['role' => Role::ROOT_ADMIN])) ->visible(fn (Get $get) => $get('name') === Role::ROOT_ADMIN), ]); } /** - * @param string[]|int[]|Permission[]|\BackedEnum[] $options + * @param string[]|int[]|Permission[]|\BackedEnum[] $options + * @throws Exception */ private static function makeSection(string $model, array $options): Section { diff --git a/app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php b/app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php index 3f8a20196..4757f8813 100644 --- a/app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php +++ b/app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php @@ -19,7 +19,7 @@ use Filament\Schemas\Components\Component; use Filament\Schemas\Components\Fieldset; use Filament\Forms\Components\Hidden; use Filament\Forms\Components\KeyValue; -use Filament\Forms\Components\Placeholder; +use Filament\Infolists\Components\TextEntry; use Filament\Forms\Components\Repeater; use Filament\Forms\Components\Select; use Filament\Forms\Components\TagsInput; @@ -416,10 +416,10 @@ class CreateServer extends CreateRecord ->collapsible() ->columnSpanFull() ->schema([ - Placeholder::make(trans('admin/server.select_egg')) + TextEntry::make(trans('admin/server.select_egg')) ->hidden(fn (Get $get) => $get('egg_id')), - Placeholder::make(trans('admin/server.no_variables')) + TextEntry::make(trans('admin/server.no_variables')) ->hidden(fn (Get $get) => !$get('egg_id') || Egg::query()->find($get('egg_id'))?->variables()?->count() ), diff --git a/app/Filament/Pages/Auth/EditProfile.php b/app/Filament/Pages/Auth/EditProfile.php index adaf000e5..198fdaeb8 100644 --- a/app/Filament/Pages/Auth/EditProfile.php +++ b/app/Filament/Pages/Auth/EditProfile.php @@ -21,7 +21,7 @@ use Filament\Actions; use Filament\Actions\Action; use Filament\Forms\Components\FileUpload; use Filament\Schemas\Components\Grid; -use Filament\Forms\Components\Placeholder; +use Filament\Infolists\Components\TextEntry; use Filament\Forms\Components\Repeater; use Filament\Schemas\Components\Section; use Filament\Forms\Components\Select; @@ -187,7 +187,7 @@ class EditProfile extends \Filament\Auth\Pages\EditProfile ->schema(function (TwoFactorSetupService $setupService) { if ($this->getUser()->use_totp) { return [ - Placeholder::make('2fa-already-enabled') + TextEntry::make('2fa-already-enabled') ->label(trans('profile.2fa_enabled')), Textarea::make('backup-tokens') ->hidden(fn () => !cache()->get("users.{$this->getUser()->id}.2fa.tokens")) @@ -241,9 +241,9 @@ class EditProfile extends \Filament\Auth\Pages\EditProfile $image = (new QRCode($options))->render($url); return [ - Placeholder::make('qr') + TextEntry::make('qr') ->label(trans('profile.scan_qr')) - ->content(fn () => new HtmlString(" + ->state(fn () => new HtmlString("
$image
")) ->helperText(trans('profile.setup_key') .': '. $secret), @@ -320,7 +320,7 @@ class EditProfile extends \Filament\Auth\Pages\EditProfile }); }) ->schema(fn () => [ - Placeholder::make('adf')->label(fn (ApiKey $key) => $key->memo), + TextEntry::make('adf')->label(fn (ApiKey $key) => $key->memo), ]), ]), ]), @@ -341,7 +341,7 @@ class EditProfile extends \Filament\Auth\Pages\EditProfile $query->orderBy('timestamp', 'desc'); }) ->schema([ - Placeholder::make('activity!')->label('')->content(fn (ActivityLog $log) => new HtmlString($log->htmlable())), + TextEntry::make('activity!')->label('')->state(fn (ActivityLog $log) => new HtmlString($log->htmlable())), ]), ]), diff --git a/app/Filament/Server/Pages/Settings.php b/app/Filament/Server/Pages/Settings.php index 2b48309b2..c5e5e07de 100644 --- a/app/Filament/Server/Pages/Settings.php +++ b/app/Filament/Server/Pages/Settings.php @@ -10,7 +10,7 @@ use Exception; use Filament\Actions\Action; use Filament\Facades\Filament; use Filament\Schemas\Components\Fieldset; -use Filament\Forms\Components\Placeholder; +use Filament\Infolists\Components\TextEntry; use Filament\Schemas\Components\Section; use Filament\Forms\Components\Textarea; use Filament\Forms\Components\TextInput; @@ -185,9 +185,9 @@ class Settings extends ServerFormPage //TODO ->suffixAction(fn () => request()->isSecure() ? CopyAction::make() : null) ->disabled() ->formatStateUsing(fn (Server $server) => auth()->user()->username . '.' . $server->uuid_short), - Placeholder::make('password') + TextEntry::make('password') ->columnSpan(1) - ->content('Your SFTP password is the same as the password you use to access this panel.'), + ->state('Your SFTP password is the same as the password you use to access this panel.'), ]), ]), Section::make('Reinstall Server') @@ -232,9 +232,9 @@ class Settings extends ServerFormPage ]) ->footerActionsAlignment(Alignment::Right) ->schema([ - Placeholder::make('INeedAName1') + TextEntry::make('INeedAName1') ->label('Reinstalling your server will stop it, and then re-run the installation script that initially set it up.'), - Placeholder::make('INeedAName') + TextEntry::make('INeedAName') ->label('Some files may be deleted or modified during this process, please back up your data before continuing.'), ]), ]); diff --git a/app/Filament/Server/Resources/ActivityResource/Pages/ListActivities.php b/app/Filament/Server/Resources/ActivityResource/Pages/ListActivities.php index 61c9ff51b..4db7d86f5 100644 --- a/app/Filament/Server/Resources/ActivityResource/Pages/ListActivities.php +++ b/app/Filament/Server/Resources/ActivityResource/Pages/ListActivities.php @@ -12,7 +12,7 @@ use Filament\Facades\Filament; use Filament\Actions\Action; use Filament\Forms\Components\DateTimePicker; use Filament\Forms\Components\KeyValue; -use Filament\Forms\Components\Placeholder; +use Filament\Infolists\Components\TextEntry; use Filament\Forms\Components\TextInput; use Filament\Resources\Pages\ListRecords; use Filament\Actions\ViewAction; @@ -68,8 +68,8 @@ class ListActivities extends ListRecords ViewAction::make() //->visible(fn (ActivityLog $activityLog) => $activityLog->hasAdditionalMetadata()) ->schema([ - Placeholder::make('event') - ->content(fn (ActivityLog $activityLog) => new HtmlString($activityLog->getLabel())), + TextEntry::make('event') + ->state(fn (ActivityLog $activityLog) => new HtmlString($activityLog->getLabel())), TextInput::make('user') ->formatStateUsing(function (ActivityLog $activityLog) use ($server) { if (!$activityLog->actor instanceof User) { diff --git a/app/Filament/Server/Resources/BackupResource/Pages/ListBackups.php b/app/Filament/Server/Resources/BackupResource/Pages/ListBackups.php index 53ec95be2..d14e510cc 100644 --- a/app/Filament/Server/Resources/BackupResource/Pages/ListBackups.php +++ b/app/Filament/Server/Resources/BackupResource/Pages/ListBackups.php @@ -18,7 +18,7 @@ use App\Filament\Components\Tables\Columns\DateTimeColumn; use Filament\Actions; use Filament\Facades\Filament; use Filament\Forms\Components\Checkbox; -use Filament\Forms\Components\Placeholder; +use Filament\Infolists\Components\TextEntry; use Filament\Forms\Components\Textarea; use Filament\Forms\Components\TextInput; use Filament\Forms\Components\Toggle; @@ -100,7 +100,7 @@ class ListBackups extends ListRecords ->icon('tabler-folder-up') ->authorize(fn () => auth()->user()->can(Permission::ACTION_BACKUP_RESTORE, $server)) ->schema([ - Placeholder::make('INeedAName') + TextEntry::make('INeedAName') ->helperText('Your server will be stopped. You will not be able to control the power state, access the file manager, or create additional backups until this process is completed.'), Checkbox::make('truncate') ->label('Delete all files before restoring backup?'), diff --git a/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php b/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php index 47918186e..055007ef6 100644 --- a/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php +++ b/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php @@ -16,7 +16,7 @@ use Filament\Actions\Action as HeaderAction; use Filament\Facades\Filament; use Filament\Forms\Components\CheckboxList; use Filament\Forms\Components\FileUpload; -use Filament\Forms\Components\Placeholder; +use Filament\Infolists\Components\TextEntry; use Filament\Forms\Components\Select; use Filament\Schemas\Components\Tabs; use Filament\Schemas\Components\Tabs\Tab; @@ -209,8 +209,8 @@ class ListFiles extends ListRecords ->hint('Enter the location of this file or folder, relative to the current directory.') ->required() ->live(), - Placeholder::make('new_location') - ->content(fn (Get $get, File $file) => resolve_path('./' . join_paths($this->path, $get('location') ?? '/', $file->name))), + TextEntry::make('new_location') + ->state(fn (Get $get, File $file) => resolve_path('./' . join_paths($this->path, $get('location') ?? '/', $file->name))), ]) ->action(function ($data, File $file) { $location = rtrim($data['location'], '/'); @@ -369,8 +369,8 @@ class ListFiles extends ListRecords ->hint('Enter the new directory, relative to the current directory.') ->required() ->live(), - Placeholder::make('new_location') - ->content(fn (Get $get) => resolve_path('./' . join_paths($this->path, $get('location') ?? ''))), + TextEntry::make('new_location') + ->state(fn (Get $get) => resolve_path('./' . join_paths($this->path, $get('location') ?? ''))), ]) ->action(function (Collection $files, $data) { $location = rtrim($data['location'], '/'); diff --git a/app/Livewire/Installer/Steps/RequirementsStep.php b/app/Livewire/Installer/Steps/RequirementsStep.php index 3ad82f378..220fcfab2 100644 --- a/app/Livewire/Installer/Steps/RequirementsStep.php +++ b/app/Livewire/Installer/Steps/RequirementsStep.php @@ -2,7 +2,7 @@ namespace App\Livewire\Installer\Steps; -use Filament\Forms\Components\Placeholder; +use Filament\Infolists\Components\TextEntry; use Filament\Notifications\Notification; use Filament\Schemas\Components\Section; use Filament\Support\Exceptions\Halt; @@ -22,8 +22,8 @@ class RequirementsStep ->icon($correctPhpVersion ? 'tabler-check' : 'tabler-x') ->iconColor($correctPhpVersion ? 'success' : 'danger') ->schema([ - Placeholder::make('INeedAName') - ->content('Your PHP Version is ' . PHP_VERSION . '.'), + TextEntry::make('INeedAName') + ->state('Your PHP Version is ' . PHP_VERSION . '.'), ]), ]; @@ -45,11 +45,11 @@ class RequirementsStep ->icon($allExtensionsInstalled ? 'tabler-check' : 'tabler-x') ->iconColor($allExtensionsInstalled ? 'success' : 'danger') ->schema([ - Placeholder::make('INeedAName') - ->content('All needed PHP Extensions are installed.') + TextEntry::make('INeedAName') + ->state('All needed PHP Extensions are installed.') ->visible($allExtensionsInstalled), - Placeholder::make('INeedAName') - ->content('The following PHP Extensions are missing: ' . implode(', ', array_keys($phpExtensions, false))) + TextEntry::make('INeedAName') + ->state('The following PHP Extensions are missing: ' . implode(', ', array_keys($phpExtensions, false))) ->visible(!$allExtensionsInstalled), ]); @@ -64,11 +64,11 @@ class RequirementsStep ->icon($correctFolderPermissions ? 'tabler-check' : 'tabler-x') ->iconColor($correctFolderPermissions ? 'success' : 'danger') ->schema([ - Placeholder::make('INeedAName') - ->content('All Folders have the correct permissions.') + TextEntry::make('INeedAName') + ->state('All Folders have the correct permissions.') ->visible($correctFolderPermissions), - Placeholder::make('INeedAName2') - ->content('The following Folders have wrong permissions: ' . implode(', ', array_keys($folderPermissions, false))) + TextEntry::make('INeedAName2') + ->state('The following Folders have wrong permissions: ' . implode(', ', array_keys($folderPermissions, false))) ->visible(!$correctFolderPermissions), ]);