diff --git a/app/Livewire/Boarding/Index.php b/app/Livewire/Boarding/Index.php index e6f4c1d7b..15f0cab85 100644 --- a/app/Livewire/Boarding/Index.php +++ b/app/Livewire/Boarding/Index.php @@ -143,6 +143,11 @@ public function mount() $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 @@ public function setServerType(string $type) 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 @@ public function getProxyType() public function selectExistingPrivateKey() { if (is_null($this->selectedExistingPrivateKey)) { - $this->restartBoarding(); + $this->dispatch('error', 'Please select a private key.'); return; } diff --git a/resources/views/components/boarding-progress.blade.php b/resources/views/components/boarding-progress.blade.php index a946a7471..dec34abac 100644 --- a/resources/views/components/boarding-progress.blade.php +++ b/resources/views/components/boarding-progress.blade.php @@ -7,8 +7,8 @@
- Connect your first server and start deploying in minutes -
-
-
-
-
+ Connect your first server and start deploying in minutes +
Please check the connection details below and correct them if they are - incorrect.
- -- Non-root user is experimental: - docs -
-If the connection details are correct, please ensure:
-~/.ssh/authorized_keys
- file for the specified user- For more help, check this documentation. -
- -
-
-
-
I have my own SSH key
-Create ED25519 key pair
-
-
- ~/.ssh/authorized_keys
- file.
-
-
Please check the connection details below and correct them if they are - incorrect.
- -- Non-root user is experimental: - docs -
-If the connection details are correct, please ensure:
-~/.ssh/authorized_keys
- file for the specified user- For more help, check this documentation. -
- -Private Keys are used to connect to a remote server through a secure shell, called SSH.
-You can use your own private key, or you can let Coolify to create one for you.
-In both ways, you need to add the public version of your private key to the remote server's
- ~/.ssh/authorized_keys file.
-