mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-18 15:20:40 +00:00
feat: add modal support for creating private keys in server creation form and enhance UI for private key selection
This commit is contained in:
@@ -21,6 +21,8 @@ class Create extends Component
|
||||
|
||||
public ?string $publicKey = null;
|
||||
|
||||
public bool $modal_mode = false;
|
||||
|
||||
protected function rules(): array
|
||||
{
|
||||
return [
|
||||
@@ -77,6 +79,14 @@ class Create extends Component
|
||||
'team_id' => currentTeam()->id,
|
||||
]);
|
||||
|
||||
// If in modal mode, dispatch event and don't redirect
|
||||
if ($this->modal_mode) {
|
||||
$this->dispatch('privateKeyCreated', keyId: $privateKey->id);
|
||||
$this->dispatch('success', 'Private key created successfully.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
return $this->redirectAfterCreation($privateKey);
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
|
||||
Reference in New Issue
Block a user