mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-18 09:20:46 +00:00
feat(onboarding): add Hetzner integration and fix navigation issues
- Add Hetzner Cloud server creation option to onboarding flow - Change grid from 2 to 3 columns to accommodate all server options - Mark both Hetzner and Remote Server as "Recommended" - Fix Hetzner card height to match other cards - Remove "select existing server" phase - onboarding always creates new servers - Fix project loading on page refresh in Project Setup phase - Fix browser back button navigation - remove aggressive restartBoarding() call - Fix SSH key dropdown to not auto-select first key - require explicit selection - Make checkpoint titles more prominent across all phases 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -143,6 +143,11 @@ class Index extends Component
|
||||
$this->projects = Project::ownedByCurrentTeam(['name'])->get();
|
||||
}
|
||||
}
|
||||
|
||||
// Load projects when on create-project state (for page refresh)
|
||||
if ($this->currentState === 'create-project' && $this->projects->isEmpty()) {
|
||||
$this->projects = Project::ownedByCurrentTeam(['name'])->get();
|
||||
}
|
||||
}
|
||||
|
||||
public function explanation()
|
||||
@@ -182,36 +187,12 @@ class Index extends Component
|
||||
return $this->validateServer('localhost');
|
||||
} elseif ($this->selectedServerType === 'remote') {
|
||||
$this->privateKeys = PrivateKey::ownedByCurrentTeam(['name'])->where('id', '!=', 0)->get();
|
||||
if ($this->privateKeys->count() > 0) {
|
||||
$this->selectedExistingPrivateKey = $this->privateKeys->first()->id;
|
||||
}
|
||||
$this->servers = Server::ownedByCurrentTeam(['name'])->where('id', '!=', 0)->get();
|
||||
if ($this->servers->count() > 0) {
|
||||
$this->selectedExistingServer = $this->servers->first()->id;
|
||||
$this->updateServerDetails();
|
||||
$this->currentState = 'select-existing-server';
|
||||
|
||||
return;
|
||||
}
|
||||
// Don't auto-select - let user explicitly choose from dropdown
|
||||
// Onboarding always creates new servers, skip existing server selection
|
||||
$this->currentState = 'private-key';
|
||||
}
|
||||
}
|
||||
|
||||
public function selectExistingServer()
|
||||
{
|
||||
$this->createdServer = Server::find($this->selectedExistingServer);
|
||||
if (! $this->createdServer) {
|
||||
$this->dispatch('error', 'Server is not found.');
|
||||
$this->currentState = 'private-key';
|
||||
|
||||
return;
|
||||
}
|
||||
$this->selectedExistingPrivateKey = $this->createdServer->privateKey->id;
|
||||
$this->serverPublicKey = $this->createdServer->privateKey->getPublicKey();
|
||||
$this->updateServerDetails();
|
||||
$this->currentState = 'validate-server';
|
||||
}
|
||||
|
||||
private function updateServerDetails()
|
||||
{
|
||||
if ($this->createdServer) {
|
||||
@@ -229,7 +210,7 @@ class Index extends Component
|
||||
public function selectExistingPrivateKey()
|
||||
{
|
||||
if (is_null($this->selectedExistingPrivateKey)) {
|
||||
$this->restartBoarding();
|
||||
$this->dispatch('error', 'Please select a private key.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user