mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 05:14:46 +02:00

* update web installer * make sure we have a user * save SESSION_SECURE_COOKIE as text so it's written correctly to the .env * set `SESSION_COOKIE` so session doesn't expire when changing the app name * Allow enter to go to next step --------- Co-authored-by: notCharles <charles@pelican.dev>
34 lines
1.0 KiB
PHP
34 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Pages\Installer\Steps;
|
|
|
|
use App\Filament\Pages\Installer\PanelInstaller;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Forms\Components\Wizard\Step;
|
|
|
|
class AdminUserStep
|
|
{
|
|
public static function make(PanelInstaller $installer): Step
|
|
{
|
|
return Step::make('user')
|
|
->label('Admin User')
|
|
->schema([
|
|
TextInput::make('user.email')
|
|
->label('Admin E-Mail')
|
|
->required()
|
|
->email()
|
|
->placeholder('admin@example.com'),
|
|
TextInput::make('user.username')
|
|
->label('Admin Username')
|
|
->required()
|
|
->placeholder('admin'),
|
|
TextInput::make('user.password')
|
|
->label('Admin Password')
|
|
->required()
|
|
->password()
|
|
->revealable(),
|
|
])
|
|
->afterValidation(fn () => $installer->createAdminUser());
|
|
}
|
|
}
|