An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix(hostinger): use a searchable listbox for extra SSH keys
Andras Bacsaic35d3d5c8c36
diff --git a/resources/views/livewire/server/new/by-hostinger.blade.php b/resources/views/livewire/server/new/by-hostinger.blade.phpindex 34010ba5d9..d33e2e4cb4 100644--- a/resources/views/livewire/server/new/by-hostinger.blade.php+++ b/resources/views/livewire/server/new/by-hostinger.blade.php@@ -120,14 +120,11 @@<x-forms.checkbox id="enable_backups" label="Enable weekly Hostinger backups (extra cost)" fullWidthhelper="Hostinger charges extra for backups. Check the price in hPanel before you enable them." /></div>- <x-forms.datalist label="Extra SSH keys" id="selected_public_key_ids"- helper="Existing keys from the Hostinger account." :multiple="true"- :disabled="count($hostinger_public_keys) === 0"- :placeholder="count($hostinger_public_keys) ? 'Search SSH keys' : 'No account keys found'">- @foreach ($hostinger_public_keys as $publicKey)- <option value="{{ $publicKey['id'] }}">{{ $publicKey['name'] }}</option>- @endforeach- </x-forms.datalist>+ <x-forms.listbox label="Extra SSH keys" id="selected_public_key_ids"+ helper="Existing keys from the Hostinger account." multiple searchable+ :disabled="count($hostinger_public_keys) === 0" searchPlaceholder="Search SSH keys…"+ :placeholder="count($hostinger_public_keys) ? 'Select SSH keys' : 'No account keys found'"+ :options="collect($hostinger_public_keys)->map(fn ($publicKey) => ['value' => $publicKey['id'], 'label' => $publicKey['name']])->values()->all()" />@if ($post_install_scripts)<x-forms.listbox id="selected_post_install_script_id"label="Hostinger post-install script"diff --git a/tests/Feature/HostingerServerCreationTest.php b/tests/Feature/HostingerServerCreationTest.phpindex 48f24aa2eb..264fc523a4 100644--- a/tests/Feature/HostingerServerCreationTest.php+++ b/tests/Feature/HostingerServerCreationTest.php@@ -86,7 +86,8 @@ it('selects Hostinger account SSH keys with the same dropdown as Hetzner', funct->assertSee('Extra SSH keys')->assertSee('Existing keys from the Hostinger account.')->assertSee('Search SSH keys')- ->assertSeeHtml('<option value="42"><b>Operations</b></option>')+ ->assertSee('Operations')+ ->assertSeeHtml('x-text="current">Select SSH keys</span>')->assertDontSeeHtml('<b>Operations</b>')->assertDontSeeHtml('id="hostinger-public-key-42-');@@ -413,7 +414,7 @@ it('labels the Hostinger status refresh button on the server page', function ()Livewire::test(Show::class, ['server_uuid' => $server->uuid])->assertSee('Hostinger · Running')- ->assertSee('Refresh status')+ ->assertSee('Refresh provider status')->assertSeeHtml('wire:click.prevent="checkHostingerVirtualMachineStatus(true)"');});