mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 13:14:45 +02:00
replace placeholder
with textentry
deprecated
This commit is contained in:
parent
6f5ce87985
commit
28b752a983
@ -4,7 +4,7 @@ namespace App\Extensions\Captcha\Providers;
|
|||||||
|
|
||||||
use App\Filament\Components\Forms\Fields\TurnstileCaptcha;
|
use App\Filament\Components\Forms\Fields\TurnstileCaptcha;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Infolists\Components\TextEntry;
|
||||||
use Filament\Forms\Components\Toggle;
|
use Filament\Forms\Components\Toggle;
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Foundation\Application;
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
@ -47,10 +47,10 @@ class TurnstileProvider extends CaptchaProvider
|
|||||||
->onColor('success')
|
->onColor('success')
|
||||||
->offColor('danger')
|
->offColor('danger')
|
||||||
->default(env('CAPTCHA_TURNSTILE_VERIFY_DOMAIN', true)),
|
->default(env('CAPTCHA_TURNSTILE_VERIFY_DOMAIN', true)),
|
||||||
Placeholder::make('info')
|
TextEntry::make('info')
|
||||||
->label(trans('admin/setting.captcha.info_label'))
|
->label(trans('admin/setting.captcha.info_label'))
|
||||||
->columnSpan(2)
|
->columnSpan(2)
|
||||||
->content(new HtmlString(trans('admin/setting.captcha.info'))),
|
->state(new HtmlString(trans('admin/setting.captcha.info'))),
|
||||||
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Extensions\OAuth\Providers;
|
namespace App\Extensions\OAuth\Providers;
|
||||||
|
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Infolists\Components\TextEntry;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Foundation\Application;
|
||||||
use Illuminate\Support\Facades\Blade;
|
use Illuminate\Support\Facades\Blade;
|
||||||
@ -32,10 +32,10 @@ final class DiscordProvider extends OAuthProvider
|
|||||||
return array_merge([
|
return array_merge([
|
||||||
\Filament\Schemas\Components\Wizard\Step::make('Register new Discord OAuth App')
|
\Filament\Schemas\Components\Wizard\Step::make('Register new Discord OAuth App')
|
||||||
->schema([
|
->schema([
|
||||||
Placeholder::make('INeedAName')
|
TextEntry::make('INeedAName')
|
||||||
->content(new HtmlString(Blade::render('<p>Visit the <x-filament::link href="https://discord.com/developers/applications" target="_blank">Discord Developer Portal</x-filament::link> and click on <b>New Application</b>. Enter a <b>Name</b> (e.g. your panel name) and click on <b>Create</b>.</p><p>Copy the <b>Client ID</b> and the <b>Client Secret</b> from the OAuth2 tab, you will need them in the final step.</p>'))),
|
->state(new HtmlString(Blade::render('<p>Visit the <x-filament::link href="https://discord.com/developers/applications" target="_blank">Discord Developer Portal</x-filament::link> and click on <b>New Application</b>. Enter a <b>Name</b> (e.g. your panel name) and click on <b>Create</b>.</p><p>Copy the <b>Client ID</b> and the <b>Client Secret</b> from the OAuth2 tab, you will need them in the final step.</p>'))),
|
||||||
Placeholder::make('INeedAName2')
|
TextEntry::make('INeedAName2')
|
||||||
->content(new HtmlString('<p>Under <b>Redirects</b> add the below URL.</p>')),
|
->state(new HtmlString('<p>Under <b>Redirects</b> add the below URL.</p>')),
|
||||||
TextInput::make('_noenv_callback')
|
TextInput::make('_noenv_callback')
|
||||||
->label('Redirect URL')
|
->label('Redirect URL')
|
||||||
->dehydrated()
|
->dehydrated()
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Extensions\OAuth\Providers;
|
namespace App\Extensions\OAuth\Providers;
|
||||||
|
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Infolists\Components\TextEntry;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Foundation\Application;
|
||||||
use Illuminate\Support\Facades\Blade;
|
use Illuminate\Support\Facades\Blade;
|
||||||
@ -26,21 +26,21 @@ final class GithubProvider extends OAuthProvider
|
|||||||
return array_merge([
|
return array_merge([
|
||||||
\Filament\Schemas\Components\Wizard\Step::make('Register new Github OAuth App')
|
\Filament\Schemas\Components\Wizard\Step::make('Register new Github OAuth App')
|
||||||
->schema([
|
->schema([
|
||||||
Placeholder::make('INeedAName2')
|
TextEntry::make('INeedAName2')
|
||||||
->content(new HtmlString(Blade::render('<p>Visit the <x-filament::link href="https://github.com/settings/developers" target="_blank">Github Developer Dashboard</x-filament::link>, go to <b>OAuth Apps</b> and click on <b>New OAuth App</b>.</p><p>Enter an <b>Application name</b> (e.g. your panel name), set <b>Homepage URL</b> to your panel url and enter the below url as <b>Authorization callback URL</b>.</p>'))),
|
->state(new HtmlString(Blade::render('<p>Visit the <x-filament::link href="https://github.com/settings/developers" target="_blank">Github Developer Dashboard</x-filament::link>, go to <b>OAuth Apps</b> and click on <b>New OAuth App</b>.</p><p>Enter an <b>Application name</b> (e.g. your panel name), set <b>Homepage URL</b> to your panel url and enter the below url as <b>Authorization callback URL</b>.</p>'))),
|
||||||
TextInput::make('_noenv_callback')
|
TextInput::make('_noenv_callback')
|
||||||
->label('Authorization callback URL')
|
->label('Authorization callback URL')
|
||||||
->dehydrated()
|
->dehydrated()
|
||||||
->disabled()
|
->disabled()
|
||||||
//TODO ->hintAction(fn (string $state) => request()->isSecure() ? CopyAction::make()->copyable($state) : null)
|
//TODO ->hintAction(fn (string $state) => request()->isSecure() ? CopyAction::make()->copyable($state) : null)
|
||||||
->default(fn () => url('/auth/oauth/callback/github')),
|
->default(fn () => url('/auth/oauth/callback/github')),
|
||||||
Placeholder::make('INeedAName')
|
TextEntry::make('INeedAName')
|
||||||
->content(new HtmlString('<p>When you filled all fields click on <b>Register application</b>.</p>')),
|
->state(new HtmlString('<p>When you filled all fields click on <b>Register application</b>.</p>')),
|
||||||
]),
|
]),
|
||||||
\Filament\Schemas\Components\Wizard\Step::make('Create Client Secret')
|
\Filament\Schemas\Components\Wizard\Step::make('Create Client Secret')
|
||||||
->schema([
|
->schema([
|
||||||
Placeholder::make('INeedAName3')
|
TextEntry::make('INeedAName3')
|
||||||
->content(new HtmlString('<p>Once you registered your app, generate a new <b>Client Secret</b>.</p><p>You will also need the <b>Client ID</b>.</p>')),
|
->state(new HtmlString('<p>Once you registered your app, generate a new <b>Client Secret</b>.</p><p>You will also need the <b>Client ID</b>.</p>')),
|
||||||
]),
|
]),
|
||||||
], parent::getSetupSteps());
|
], parent::getSetupSteps());
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Extensions\OAuth\Providers;
|
namespace App\Extensions\OAuth\Providers;
|
||||||
|
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Infolists\Components\TextEntry;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Foundation\Application;
|
||||||
use Illuminate\Support\Facades\Blade;
|
use Illuminate\Support\Facades\Blade;
|
||||||
@ -46,8 +46,8 @@ final class GitlabProvider extends OAuthProvider
|
|||||||
return array_merge([
|
return array_merge([
|
||||||
\Filament\Schemas\Components\Wizard\Step::make('Register new Gitlab OAuth App')
|
\Filament\Schemas\Components\Wizard\Step::make('Register new Gitlab OAuth App')
|
||||||
->schema([
|
->schema([
|
||||||
Placeholder::make('INeedAName')
|
TextEntry::make('INeedAName')
|
||||||
->content(new HtmlString(Blade::render('Check out the <x-filament::link href="https://docs.gitlab.com/integration/oauth_provider/" target="_blank">Gitlab docs</x-filament::link> on how to create the oauth app.'))),
|
->state(new HtmlString(Blade::render('Check out the <x-filament::link href="https://docs.gitlab.com/integration/oauth_provider/" target="_blank">Gitlab docs</x-filament::link> on how to create the oauth app.'))),
|
||||||
TextInput::make('_noenv_callback')
|
TextInput::make('_noenv_callback')
|
||||||
->label('Redirect URI')
|
->label('Redirect URI')
|
||||||
->dehydrated()
|
->dehydrated()
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Extensions\OAuth\Providers;
|
namespace App\Extensions\OAuth\Providers;
|
||||||
|
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Infolists\Components\TextEntry;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Foundation\Application;
|
||||||
use Illuminate\Support\Facades\Blade;
|
use Illuminate\Support\Facades\Blade;
|
||||||
@ -57,8 +57,8 @@ final class SteamProvider extends OAuthProvider
|
|||||||
return array_merge([
|
return array_merge([
|
||||||
\Filament\Schemas\Components\Wizard\Step::make('Create API Key')
|
\Filament\Schemas\Components\Wizard\Step::make('Create API Key')
|
||||||
->schema([
|
->schema([
|
||||||
Placeholder::make('INeedAName')
|
TextEntry::make('INeedAName')
|
||||||
->content(new HtmlString(Blade::render('Visit <x-filament::link href="https://steamcommunity.com/dev/apikey" target="_blank">https://steamcommunity.com/dev/apikey</x-filament::link> to generate an API key.'))),
|
->state(new HtmlString(Blade::render('Visit <x-filament::link href="https://steamcommunity.com/dev/apikey" target="_blank">https://steamcommunity.com/dev/apikey</x-filament::link> to generate an API key.'))),
|
||||||
]),
|
]),
|
||||||
], parent::getSetupSteps());
|
], parent::getSetupSteps());
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ use App\Services\Databases\Hosts\HostCreationService;
|
|||||||
use Exception;
|
use Exception;
|
||||||
use Filament\Schemas\Components\Fieldset;
|
use Filament\Schemas\Components\Fieldset;
|
||||||
use Filament\Forms\Components\Hidden;
|
use Filament\Forms\Components\Hidden;
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Infolists\Components\TextEntry;
|
||||||
use Filament\Forms\Components\Select;
|
use Filament\Forms\Components\Select;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
use Filament\Forms\Components\Toggle;
|
use Filament\Forms\Components\Toggle;
|
||||||
@ -48,8 +48,8 @@ class CreateDatabaseHost extends CreateRecord
|
|||||||
Step::make(trans('admin/databasehost.setup.preparations'))
|
Step::make(trans('admin/databasehost.setup.preparations'))
|
||||||
->columns()
|
->columns()
|
||||||
->schema([
|
->schema([
|
||||||
Placeholder::make('INeedAName')
|
TextEntry::make('INeedAName')
|
||||||
->content(trans('admin/databasehost.setup.note')),
|
->state(trans('admin/databasehost.setup.note')),
|
||||||
Toggle::make('different_server')
|
Toggle::make('different_server')
|
||||||
->label(new HtmlString(trans('admin/databasehost.setup.different_server')))
|
->label(new HtmlString(trans('admin/databasehost.setup.different_server')))
|
||||||
->dehydrated(false)
|
->dehydrated(false)
|
||||||
@ -82,8 +82,8 @@ class CreateDatabaseHost extends CreateRecord
|
|||||||
->schema([
|
->schema([
|
||||||
Fieldset::make(trans('admin/databasehost.setup.database_user'))
|
Fieldset::make(trans('admin/databasehost.setup.database_user'))
|
||||||
->schema([
|
->schema([
|
||||||
Placeholder::make('INeedAName')
|
TextEntry::make('INeedAName')
|
||||||
->content(new HtmlString(trans('admin/databasehost.setup.cli_login')))
|
->state(new HtmlString(trans('admin/databasehost.setup.cli_login')))
|
||||||
->columnSpanFull(),
|
->columnSpanFull(),
|
||||||
TextInput::make('create_user')
|
TextInput::make('create_user')
|
||||||
->label(trans('admin/databasehost.setup.command_create_user'))
|
->label(trans('admin/databasehost.setup.command_create_user'))
|
||||||
@ -99,14 +99,14 @@ class CreateDatabaseHost extends CreateRecord
|
|||||||
->dehydrated(false)
|
->dehydrated(false)
|
||||||
// TODO ->suffixAction(fn (string $state) => request()->isSecure() ? CopyAction::make()->copyable($state) : null)
|
// TODO ->suffixAction(fn (string $state) => request()->isSecure() ? CopyAction::make()->copyable($state) : null)
|
||||||
->columnSpanFull(),
|
->columnSpanFull(),
|
||||||
Placeholder::make('INeedAName')
|
TextEntry::make('INeedAName')
|
||||||
->content(new HtmlString(trans('admin/databasehost.setup.cli_exit')))
|
->state(new HtmlString(trans('admin/databasehost.setup.cli_exit')))
|
||||||
->columnSpanFull(),
|
->columnSpanFull(),
|
||||||
]),
|
]),
|
||||||
Fieldset::make(trans('admin/databasehost.setup.external_access'))
|
Fieldset::make(trans('admin/databasehost.setup.external_access'))
|
||||||
->schema([
|
->schema([
|
||||||
Placeholder::make('INeedAName2')
|
TextEntry::make('INeedAName2')
|
||||||
->content(new HtmlString(trans('admin/databasehost.setup.allow_external_access')))
|
->state(new HtmlString(trans('admin/databasehost.setup.allow_external_access')))
|
||||||
->columnSpanFull(),
|
->columnSpanFull(),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
|
@ -13,7 +13,7 @@ use Filament\Actions\Action;
|
|||||||
use Filament\Actions\DeleteAction;
|
use Filament\Actions\DeleteAction;
|
||||||
use Filament\Schemas\Components\Actions;
|
use Filament\Schemas\Components\Actions;
|
||||||
use Filament\Schemas\Components\Fieldset;
|
use Filament\Schemas\Components\Fieldset;
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Infolists\Components\TextEntry;
|
||||||
use Filament\Forms\Components\TagsInput;
|
use Filament\Forms\Components\TagsInput;
|
||||||
use Filament\Forms\Components\Textarea;
|
use Filament\Forms\Components\Textarea;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
@ -73,18 +73,18 @@ class EditNode extends EditRecord
|
|||||||
->label(trans('admin/node.node_info'))
|
->label(trans('admin/node.node_info'))
|
||||||
->columns(4)
|
->columns(4)
|
||||||
->schema([
|
->schema([
|
||||||
Placeholder::make('INeedAName')
|
TextEntry::make('INeedAName')
|
||||||
->label(trans('admin/node.wings_version'))
|
->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() . ')'),
|
->state(fn (Node $node, SoftwareVersionService $versionService) => ($node->systemInformation()['version'] ?? trans('admin/node.unknown')) . ' (' . trans('admin/node.latest') . ': ' . $versionService->latestWingsVersion() . ')'),
|
||||||
Placeholder::make('INeedAName2')
|
TextEntry::make('INeedAName2')
|
||||||
->label(trans('admin/node.cpu_threads'))
|
->label(trans('admin/node.cpu_threads'))
|
||||||
->content(fn (Node $node) => $node->systemInformation()['cpu_count'] ?? 0),
|
->state(fn (Node $node) => $node->systemInformation()['cpu_count'] ?? 0),
|
||||||
Placeholder::make('INeedAName3')
|
TextEntry::make('INeedAName3')
|
||||||
->label(trans('admin/node.architecture'))
|
->label(trans('admin/node.architecture'))
|
||||||
->content(fn (Node $node) => $node->systemInformation()['architecture'] ?? trans('admin/node.unknown')),
|
->state(fn (Node $node) => $node->systemInformation()['architecture'] ?? trans('admin/node.unknown')),
|
||||||
Placeholder::make('INeedAName4')
|
TextEntry::make('INeedAName4')
|
||||||
->label(trans('admin/node.kernel'))
|
->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')
|
View::make('filament.components.node-cpu-chart')
|
||||||
->columnSpan([
|
->columnSpan([
|
||||||
@ -501,10 +501,10 @@ class EditNode extends EditRecord
|
|||||||
->label(trans('admin/node.tabs.config_file'))
|
->label(trans('admin/node.tabs.config_file'))
|
||||||
->icon('tabler-code')
|
->icon('tabler-code')
|
||||||
->schema([
|
->schema([
|
||||||
Placeholder::make('instructions')
|
TextEntry::make('instructions')
|
||||||
->label(trans('admin/node.instructions'))
|
->label(trans('admin/node.instructions'))
|
||||||
->columnSpanFull()
|
->columnSpanFull()
|
||||||
->content(new HtmlString(trans('admin/node.instructions_help'))),
|
->state(new HtmlString(trans('admin/node.instructions_help'))),
|
||||||
Textarea::make('config')
|
Textarea::make('config')
|
||||||
->label('/etc/pelican/config.yml')
|
->label('/etc/pelican/config.yml')
|
||||||
->disabled()
|
->disabled()
|
||||||
|
@ -4,13 +4,16 @@ namespace App\Filament\Admin\Resources;
|
|||||||
|
|
||||||
use App\Filament\Admin\Resources\RoleResource\Pages;
|
use App\Filament\Admin\Resources\RoleResource\Pages;
|
||||||
use App\Models\Role;
|
use App\Models\Role;
|
||||||
|
use Exception;
|
||||||
|
use Filament\Actions\Action;
|
||||||
use Filament\Actions\CreateAction;
|
use Filament\Actions\CreateAction;
|
||||||
use Filament\Actions\DeleteBulkAction;
|
use Filament\Actions\DeleteBulkAction;
|
||||||
use Filament\Actions\EditAction;
|
use Filament\Actions\EditAction;
|
||||||
use Filament\Actions\ViewAction;
|
use Filament\Actions\ViewAction;
|
||||||
use Filament\Forms\Components\CheckboxList;
|
use Filament\Forms\Components\CheckboxList;
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Schemas\Schema;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
|
use Filament\Infolists\Components\TextEntry;
|
||||||
use Filament\Resources\Resource;
|
use Filament\Resources\Resource;
|
||||||
use Filament\Schemas\Components\Component;
|
use Filament\Schemas\Components\Component;
|
||||||
use Filament\Schemas\Components\Fieldset;
|
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 = [];
|
$permissionSections = [];
|
||||||
|
|
||||||
@ -120,15 +126,16 @@ class RoleResource extends Resource
|
|||||||
->columns(3)
|
->columns(3)
|
||||||
->schema($permissionSections)
|
->schema($permissionSections)
|
||||||
->hidden(fn (Get $get) => $get('name') === Role::ROOT_ADMIN),
|
->hidden(fn (Get $get) => $get('name') === Role::ROOT_ADMIN),
|
||||||
Placeholder::make('permissions')
|
TextEntry::make('permissions')
|
||||||
->label(trans('admin/role.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),
|
->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
|
private static function makeSection(string $model, array $options): Section
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,7 @@ use Filament\Schemas\Components\Component;
|
|||||||
use Filament\Schemas\Components\Fieldset;
|
use Filament\Schemas\Components\Fieldset;
|
||||||
use Filament\Forms\Components\Hidden;
|
use Filament\Forms\Components\Hidden;
|
||||||
use Filament\Forms\Components\KeyValue;
|
use Filament\Forms\Components\KeyValue;
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Infolists\Components\TextEntry;
|
||||||
use Filament\Forms\Components\Repeater;
|
use Filament\Forms\Components\Repeater;
|
||||||
use Filament\Forms\Components\Select;
|
use Filament\Forms\Components\Select;
|
||||||
use Filament\Forms\Components\TagsInput;
|
use Filament\Forms\Components\TagsInput;
|
||||||
@ -416,10 +416,10 @@ class CreateServer extends CreateRecord
|
|||||||
->collapsible()
|
->collapsible()
|
||||||
->columnSpanFull()
|
->columnSpanFull()
|
||||||
->schema([
|
->schema([
|
||||||
Placeholder::make(trans('admin/server.select_egg'))
|
TextEntry::make(trans('admin/server.select_egg'))
|
||||||
->hidden(fn (Get $get) => $get('egg_id')),
|
->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') ||
|
->hidden(fn (Get $get) => !$get('egg_id') ||
|
||||||
Egg::query()->find($get('egg_id'))?->variables()?->count()
|
Egg::query()->find($get('egg_id'))?->variables()?->count()
|
||||||
),
|
),
|
||||||
|
@ -21,7 +21,7 @@ use Filament\Actions;
|
|||||||
use Filament\Actions\Action;
|
use Filament\Actions\Action;
|
||||||
use Filament\Forms\Components\FileUpload;
|
use Filament\Forms\Components\FileUpload;
|
||||||
use Filament\Schemas\Components\Grid;
|
use Filament\Schemas\Components\Grid;
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Infolists\Components\TextEntry;
|
||||||
use Filament\Forms\Components\Repeater;
|
use Filament\Forms\Components\Repeater;
|
||||||
use Filament\Schemas\Components\Section;
|
use Filament\Schemas\Components\Section;
|
||||||
use Filament\Forms\Components\Select;
|
use Filament\Forms\Components\Select;
|
||||||
@ -187,7 +187,7 @@ class EditProfile extends \Filament\Auth\Pages\EditProfile
|
|||||||
->schema(function (TwoFactorSetupService $setupService) {
|
->schema(function (TwoFactorSetupService $setupService) {
|
||||||
if ($this->getUser()->use_totp) {
|
if ($this->getUser()->use_totp) {
|
||||||
return [
|
return [
|
||||||
Placeholder::make('2fa-already-enabled')
|
TextEntry::make('2fa-already-enabled')
|
||||||
->label(trans('profile.2fa_enabled')),
|
->label(trans('profile.2fa_enabled')),
|
||||||
Textarea::make('backup-tokens')
|
Textarea::make('backup-tokens')
|
||||||
->hidden(fn () => !cache()->get("users.{$this->getUser()->id}.2fa.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);
|
$image = (new QRCode($options))->render($url);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
Placeholder::make('qr')
|
TextEntry::make('qr')
|
||||||
->label(trans('profile.scan_qr'))
|
->label(trans('profile.scan_qr'))
|
||||||
->content(fn () => new HtmlString("
|
->state(fn () => new HtmlString("
|
||||||
<div style='width: 300px; background-color: rgb(24, 24, 27);'>$image</div>
|
<div style='width: 300px; background-color: rgb(24, 24, 27);'>$image</div>
|
||||||
"))
|
"))
|
||||||
->helperText(trans('profile.setup_key') .': '. $secret),
|
->helperText(trans('profile.setup_key') .': '. $secret),
|
||||||
@ -320,7 +320,7 @@ class EditProfile extends \Filament\Auth\Pages\EditProfile
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
->schema(fn () => [
|
->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');
|
$query->orderBy('timestamp', 'desc');
|
||||||
})
|
})
|
||||||
->schema([
|
->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())),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ use Exception;
|
|||||||
use Filament\Actions\Action;
|
use Filament\Actions\Action;
|
||||||
use Filament\Facades\Filament;
|
use Filament\Facades\Filament;
|
||||||
use Filament\Schemas\Components\Fieldset;
|
use Filament\Schemas\Components\Fieldset;
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Infolists\Components\TextEntry;
|
||||||
use Filament\Schemas\Components\Section;
|
use Filament\Schemas\Components\Section;
|
||||||
use Filament\Forms\Components\Textarea;
|
use Filament\Forms\Components\Textarea;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
@ -185,9 +185,9 @@ class Settings extends ServerFormPage
|
|||||||
//TODO ->suffixAction(fn () => request()->isSecure() ? CopyAction::make() : null)
|
//TODO ->suffixAction(fn () => request()->isSecure() ? CopyAction::make() : null)
|
||||||
->disabled()
|
->disabled()
|
||||||
->formatStateUsing(fn (Server $server) => auth()->user()->username . '.' . $server->uuid_short),
|
->formatStateUsing(fn (Server $server) => auth()->user()->username . '.' . $server->uuid_short),
|
||||||
Placeholder::make('password')
|
TextEntry::make('password')
|
||||||
->columnSpan(1)
|
->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')
|
Section::make('Reinstall Server')
|
||||||
@ -232,9 +232,9 @@ class Settings extends ServerFormPage
|
|||||||
])
|
])
|
||||||
->footerActionsAlignment(Alignment::Right)
|
->footerActionsAlignment(Alignment::Right)
|
||||||
->schema([
|
->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.'),
|
->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.'),
|
->label('Some files may be deleted or modified during this process, please back up your data before continuing.'),
|
||||||
]),
|
]),
|
||||||
]);
|
]);
|
||||||
|
@ -12,7 +12,7 @@ use Filament\Facades\Filament;
|
|||||||
use Filament\Actions\Action;
|
use Filament\Actions\Action;
|
||||||
use Filament\Forms\Components\DateTimePicker;
|
use Filament\Forms\Components\DateTimePicker;
|
||||||
use Filament\Forms\Components\KeyValue;
|
use Filament\Forms\Components\KeyValue;
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Infolists\Components\TextEntry;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
use Filament\Resources\Pages\ListRecords;
|
use Filament\Resources\Pages\ListRecords;
|
||||||
use Filament\Actions\ViewAction;
|
use Filament\Actions\ViewAction;
|
||||||
@ -68,8 +68,8 @@ class ListActivities extends ListRecords
|
|||||||
ViewAction::make()
|
ViewAction::make()
|
||||||
//->visible(fn (ActivityLog $activityLog) => $activityLog->hasAdditionalMetadata())
|
//->visible(fn (ActivityLog $activityLog) => $activityLog->hasAdditionalMetadata())
|
||||||
->schema([
|
->schema([
|
||||||
Placeholder::make('event')
|
TextEntry::make('event')
|
||||||
->content(fn (ActivityLog $activityLog) => new HtmlString($activityLog->getLabel())),
|
->state(fn (ActivityLog $activityLog) => new HtmlString($activityLog->getLabel())),
|
||||||
TextInput::make('user')
|
TextInput::make('user')
|
||||||
->formatStateUsing(function (ActivityLog $activityLog) use ($server) {
|
->formatStateUsing(function (ActivityLog $activityLog) use ($server) {
|
||||||
if (!$activityLog->actor instanceof User) {
|
if (!$activityLog->actor instanceof User) {
|
||||||
|
@ -18,7 +18,7 @@ use App\Filament\Components\Tables\Columns\DateTimeColumn;
|
|||||||
use Filament\Actions;
|
use Filament\Actions;
|
||||||
use Filament\Facades\Filament;
|
use Filament\Facades\Filament;
|
||||||
use Filament\Forms\Components\Checkbox;
|
use Filament\Forms\Components\Checkbox;
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Infolists\Components\TextEntry;
|
||||||
use Filament\Forms\Components\Textarea;
|
use Filament\Forms\Components\Textarea;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
use Filament\Forms\Components\Toggle;
|
use Filament\Forms\Components\Toggle;
|
||||||
@ -100,7 +100,7 @@ class ListBackups extends ListRecords
|
|||||||
->icon('tabler-folder-up')
|
->icon('tabler-folder-up')
|
||||||
->authorize(fn () => auth()->user()->can(Permission::ACTION_BACKUP_RESTORE, $server))
|
->authorize(fn () => auth()->user()->can(Permission::ACTION_BACKUP_RESTORE, $server))
|
||||||
->schema([
|
->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.'),
|
->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')
|
Checkbox::make('truncate')
|
||||||
->label('Delete all files before restoring backup?'),
|
->label('Delete all files before restoring backup?'),
|
||||||
|
@ -16,7 +16,7 @@ use Filament\Actions\Action as HeaderAction;
|
|||||||
use Filament\Facades\Filament;
|
use Filament\Facades\Filament;
|
||||||
use Filament\Forms\Components\CheckboxList;
|
use Filament\Forms\Components\CheckboxList;
|
||||||
use Filament\Forms\Components\FileUpload;
|
use Filament\Forms\Components\FileUpload;
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Infolists\Components\TextEntry;
|
||||||
use Filament\Forms\Components\Select;
|
use Filament\Forms\Components\Select;
|
||||||
use Filament\Schemas\Components\Tabs;
|
use Filament\Schemas\Components\Tabs;
|
||||||
use Filament\Schemas\Components\Tabs\Tab;
|
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.')
|
->hint('Enter the location of this file or folder, relative to the current directory.')
|
||||||
->required()
|
->required()
|
||||||
->live(),
|
->live(),
|
||||||
Placeholder::make('new_location')
|
TextEntry::make('new_location')
|
||||||
->content(fn (Get $get, File $file) => resolve_path('./' . join_paths($this->path, $get('location') ?? '/', $file->name))),
|
->state(fn (Get $get, File $file) => resolve_path('./' . join_paths($this->path, $get('location') ?? '/', $file->name))),
|
||||||
])
|
])
|
||||||
->action(function ($data, File $file) {
|
->action(function ($data, File $file) {
|
||||||
$location = rtrim($data['location'], '/');
|
$location = rtrim($data['location'], '/');
|
||||||
@ -369,8 +369,8 @@ class ListFiles extends ListRecords
|
|||||||
->hint('Enter the new directory, relative to the current directory.')
|
->hint('Enter the new directory, relative to the current directory.')
|
||||||
->required()
|
->required()
|
||||||
->live(),
|
->live(),
|
||||||
Placeholder::make('new_location')
|
TextEntry::make('new_location')
|
||||||
->content(fn (Get $get) => resolve_path('./' . join_paths($this->path, $get('location') ?? ''))),
|
->state(fn (Get $get) => resolve_path('./' . join_paths($this->path, $get('location') ?? ''))),
|
||||||
])
|
])
|
||||||
->action(function (Collection $files, $data) {
|
->action(function (Collection $files, $data) {
|
||||||
$location = rtrim($data['location'], '/');
|
$location = rtrim($data['location'], '/');
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Livewire\Installer\Steps;
|
namespace App\Livewire\Installer\Steps;
|
||||||
|
|
||||||
use Filament\Forms\Components\Placeholder;
|
use Filament\Infolists\Components\TextEntry;
|
||||||
use Filament\Notifications\Notification;
|
use Filament\Notifications\Notification;
|
||||||
use Filament\Schemas\Components\Section;
|
use Filament\Schemas\Components\Section;
|
||||||
use Filament\Support\Exceptions\Halt;
|
use Filament\Support\Exceptions\Halt;
|
||||||
@ -22,8 +22,8 @@ class RequirementsStep
|
|||||||
->icon($correctPhpVersion ? 'tabler-check' : 'tabler-x')
|
->icon($correctPhpVersion ? 'tabler-check' : 'tabler-x')
|
||||||
->iconColor($correctPhpVersion ? 'success' : 'danger')
|
->iconColor($correctPhpVersion ? 'success' : 'danger')
|
||||||
->schema([
|
->schema([
|
||||||
Placeholder::make('INeedAName')
|
TextEntry::make('INeedAName')
|
||||||
->content('Your PHP Version is ' . PHP_VERSION . '.'),
|
->state('Your PHP Version is ' . PHP_VERSION . '.'),
|
||||||
]),
|
]),
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -45,11 +45,11 @@ class RequirementsStep
|
|||||||
->icon($allExtensionsInstalled ? 'tabler-check' : 'tabler-x')
|
->icon($allExtensionsInstalled ? 'tabler-check' : 'tabler-x')
|
||||||
->iconColor($allExtensionsInstalled ? 'success' : 'danger')
|
->iconColor($allExtensionsInstalled ? 'success' : 'danger')
|
||||||
->schema([
|
->schema([
|
||||||
Placeholder::make('INeedAName')
|
TextEntry::make('INeedAName')
|
||||||
->content('All needed PHP Extensions are installed.')
|
->state('All needed PHP Extensions are installed.')
|
||||||
->visible($allExtensionsInstalled),
|
->visible($allExtensionsInstalled),
|
||||||
Placeholder::make('INeedAName')
|
TextEntry::make('INeedAName')
|
||||||
->content('The following PHP Extensions are missing: ' . implode(', ', array_keys($phpExtensions, false)))
|
->state('The following PHP Extensions are missing: ' . implode(', ', array_keys($phpExtensions, false)))
|
||||||
->visible(!$allExtensionsInstalled),
|
->visible(!$allExtensionsInstalled),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -64,11 +64,11 @@ class RequirementsStep
|
|||||||
->icon($correctFolderPermissions ? 'tabler-check' : 'tabler-x')
|
->icon($correctFolderPermissions ? 'tabler-check' : 'tabler-x')
|
||||||
->iconColor($correctFolderPermissions ? 'success' : 'danger')
|
->iconColor($correctFolderPermissions ? 'success' : 'danger')
|
||||||
->schema([
|
->schema([
|
||||||
Placeholder::make('INeedAName')
|
TextEntry::make('INeedAName')
|
||||||
->content('All Folders have the correct permissions.')
|
->state('All Folders have the correct permissions.')
|
||||||
->visible($correctFolderPermissions),
|
->visible($correctFolderPermissions),
|
||||||
Placeholder::make('INeedAName2')
|
TextEntry::make('INeedAName2')
|
||||||
->content('The following Folders have wrong permissions: ' . implode(', ', array_keys($folderPermissions, false)))
|
->state('The following Folders have wrong permissions: ' . implode(', ', array_keys($folderPermissions, false)))
|
||||||
->visible(!$correctFolderPermissions),
|
->visible(!$correctFolderPermissions),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user