mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-11 14:22:22 +00:00
fix(onboarding): auto-select first SSH key for better UX
- Auto-select first SSH key when available instead of requiring explicit selection - Remove disabled placeholder option from dropdown - Prevents confusing error when user clicks "Use Selected Key" without changing dropdown - Improves onboarding flow by having a sensible default selection 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -187,7 +187,10 @@ class Index extends Component
|
||||
return $this->validateServer('localhost');
|
||||
} elseif ($this->selectedServerType === 'remote') {
|
||||
$this->privateKeys = PrivateKey::ownedByCurrentTeam(['name'])->where('id', '!=', 0)->get();
|
||||
// Don't auto-select - let user explicitly choose from dropdown
|
||||
// Auto-select first key if available for better UX
|
||||
if ($this->privateKeys->count() > 0) {
|
||||
$this->selectedExistingPrivateKey = $this->privateKeys->first()->id;
|
||||
}
|
||||
// Onboarding always creates new servers, skip existing server selection
|
||||
$this->currentState = 'private-key';
|
||||
}
|
||||
|
||||
@@ -264,7 +264,6 @@
|
||||
<div class="p-4 rounded-lg border border-neutral-200 dark:border-coolgray-400">
|
||||
<form wire:submit='selectExistingPrivateKey' class="flex flex-col gap-4">
|
||||
<x-forms.select label="Existing SSH Keys" id='selectedExistingPrivateKey'>
|
||||
<option disabled selected value="">-- Select a Private Key --</option>
|
||||
@foreach ($privateKeys as $privateKey)
|
||||
<option wire:key="{{ $loop->index }}" value="{{ $privateKey->id }}">
|
||||
{{ $privateKey->name }}
|
||||
|
||||
Reference in New Issue
Block a user