diff --git a/app/Livewire/Security/PrivateKey/Show.php b/app/Livewire/Security/PrivateKey/Show.php index 0540b2e29..0a292731b 100644 --- a/app/Livewire/Security/PrivateKey/Show.php +++ b/app/Livewire/Security/PrivateKey/Show.php @@ -8,7 +8,7 @@ class Show extends Component { public PrivateKey $private_key; - public $public_key; + public $public_key = "Loading..."; protected $rules = [ 'private_key.name' => 'required|string', 'private_key.description' => 'nullable|string', @@ -25,11 +25,13 @@ public function mount() { try { $this->private_key = PrivateKey::ownedByCurrentTeam(['name', 'description', 'private_key', 'is_git_related'])->whereUuid(request()->private_key_uuid)->firstOrFail(); - $this->public_key = $this->private_key->publicKey(); }catch(\Throwable $e) { return handleError($e, $this); } } + public function loadPublicKey() { + $this->public_key = $this->private_key->publicKey(); + } public function delete() { try { diff --git a/resources/views/livewire/security/private-key/show.blade.php b/resources/views/livewire/security/private-key/show.blade.php index b56fab610..9935f5565 100644 --- a/resources/views/livewire/security/private-key/show.blade.php +++ b/resources/views/livewire/security/private-key/show.blade.php @@ -1,4 +1,4 @@ -