Fix finish & add translation for Installer title (#1659)

This commit is contained in:
MartinOscar 2025-09-04 21:39:10 +02:00 committed by GitHub
parent 6671d45651
commit 079eaed010
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 17 additions and 4 deletions

View File

@ -404,7 +404,7 @@ class CreateNode extends CreateRecord
type="submit" type="submit"
size="sm" size="sm"
> >
Create Node {{ trans('admin/node.create') }}
</x-filament::button> </x-filament::button>
BLADE))), BLADE))),
]); ]);

View File

@ -777,7 +777,7 @@ class CreateServer extends CreateRecord
type="submit" type="submit"
size="sm" size="sm"
> >
Create Server {{ trans('admin/server.create') }}
</x-filament::button> </x-filament::button>
BLADE))), BLADE))),
]); ]);

View File

@ -46,6 +46,11 @@ class PanelInstaller extends SimplePage implements HasForms
protected static string $view = 'filament.pages.installer'; protected static string $view = 'filament.pages.installer';
public function getTitle(): string
{
return trans('installer.title');
}
public function getMaxWidth(): MaxWidth|string public function getMaxWidth(): MaxWidth|string
{ {
return MaxWidth::SevenExtraLarge; return MaxWidth::SevenExtraLarge;
@ -79,14 +84,18 @@ class PanelInstaller extends SimplePage implements HasForms
SessionStep::make(), SessionStep::make(),
]) ])
->persistStepInQueryString() ->persistStepInQueryString()
->nextAction(fn (Action $action) => $action->keyBindings('enter')) ->nextAction(function (Action $action) {
$action
->label(trans('installer.next_step'))
->keyBindings('enter');
})
->submitAction(new HtmlString(Blade::render(<<<'BLADE' ->submitAction(new HtmlString(Blade::render(<<<'BLADE'
<x-filament::button <x-filament::button
type="submit" type="submit"
size="sm" size="sm"
wire:loading.attr="disabled" wire:loading.attr="disabled"
> >
trans('installer.finish') {{ trans('installer.finish') }}
<span wire:loading><x-filament::loading-indicator class="h-4 w-4" /></span> <span wire:loading><x-filament::loading-indicator class="h-4 w-4" /></span>
</x-filament::button> </x-filament::button>
BLADE))), BLADE))),

View File

@ -4,6 +4,7 @@ return [
'nav_title' => 'Nodes', 'nav_title' => 'Nodes',
'model_label' => 'Node', 'model_label' => 'Node',
'model_label_plural' => 'Nodes', 'model_label_plural' => 'Nodes',
'create' => 'Create Node',
'tabs' => [ 'tabs' => [
'overview' => 'Overview', 'overview' => 'Overview',
'basic_settings' => 'Basic Settings', 'basic_settings' => 'Basic Settings',

View File

@ -5,6 +5,7 @@ return [
'model_label' => 'Server', 'model_label' => 'Server',
'model_label_plural' => 'Servers', 'model_label_plural' => 'Servers',
'no_servers' => 'No Servers', 'no_servers' => 'No Servers',
'create' => 'Create Server',
'next_step' => 'Next Step', 'next_step' => 'Next Step',
'ip_address' => 'IP Address', 'ip_address' => 'IP Address',
'ip_address_helper' => 'Usually your machine\'s public IP unless you are port forwarding.', 'ip_address_helper' => 'Usually your machine\'s public IP unless you are port forwarding.',

View File

@ -1,6 +1,7 @@
<?php <?php
return [ return [
'title' => 'Panel Installer',
'requirements' => [ 'requirements' => [
'title' => 'Server Requirements', 'title' => 'Server Requirements',
'sections' => [ 'sections' => [
@ -97,5 +98,6 @@ return [
'migration' => 'Could not run migrations', 'migration' => 'Could not run migrations',
'create_user' => 'Could not create admin user', 'create_user' => 'Could not create admin user',
], ],
'next_step' => 'Next Step',
'finish' => 'Finish', 'finish' => 'Finish',
]; ];