wip livewire migration

This commit is contained in:
Andras Bacsai
2023-12-07 22:56:55 +01:00
parent 718603e37e
commit f934dfef33
64 changed files with 164 additions and 155 deletions

View File

@@ -35,7 +35,7 @@ class Change extends Component
if ($this->private_key->isEmpty()) {
$this->private_key->delete();
currentTeam()->privateKeys = PrivateKey::where('team_id', currentTeam()->id)->get();
return redirect()->route('security.private-key.index');
return $this->redirectRoute('security.private-key.index', navigate: true);
}
$this->dispatch('error', 'This private key is in use and cannot be deleted. Please delete all servers, applications, and GitHub/GitLab apps that use this private key before deleting it.');
} catch (\Throwable $e) {

View File

@@ -67,9 +67,9 @@ class Create extends Component
'team_id' => currentTeam()->id
]);
if ($this->from === 'server') {
return redirect()->route('server.create');
return $this->redirectRoute('server.create', navigate: true);
}
return redirect()->route('security.private-key.show', ['private_key_uuid' => $private_key->uuid]);
return $this->redirectRoute('security.private-key.show', ['private_key_uuid' => $private_key->uuid], navigate: true);
} catch (\Throwable $e) {
return handleError($e, $this);
}