diff --git a/app/Livewire/Dashboard.php b/app/Livewire/Dashboard.php index 1abd28c3c..1fe8b496d 100644 --- a/app/Livewire/Dashboard.php +++ b/app/Livewire/Dashboard.php @@ -30,10 +30,10 @@ class Dashboard extends Component public function cleanup_queue() { - $this->dispatch('success', 'Cleanup started.'); Artisan::queue('cleanup:application-deployment-queue', [ '--team-id' => currentTeam()->id, ]); + return redirect()->route('dashboard')->with('success', 'Cleanup started.'); } public function get_deployments() diff --git a/app/Livewire/Destination/Form.php b/app/Livewire/Destination/Form.php index 7125f2120..f58538dc1 100644 --- a/app/Livewire/Destination/Form.php +++ b/app/Livewire/Destination/Form.php @@ -1,7 +1,8 @@ destination->save(); } - public function delete() + public function delete($password) { + if (!Hash::check($password, Auth::user()->password)) { + $this->addError('password', 'The provided password is incorrect.'); + return; + } + try { if ($this->destination->getMorphClass() === 'App\Models\StandaloneDocker') { if ($this->destination->attachedTo()) { diff --git a/resources/views/components/modal-confirmation.blade.php b/resources/views/components/modal-confirmation.blade.php index f8b0c4a26..a1a2ef3c8 100644 --- a/resources/views/components/modal-confirmation.blade.php +++ b/resources/views/components/modal-confirmation.blade.php @@ -10,7 +10,7 @@ 'checkboxes' => [], 'actions' => [], 'confirmWithText' => true, -'confirmText' => 'Confirm Deletion', +'confirmationText' => 'Confirm Deletion', 'confirmationLabel' => 'Please confirm the execution of the actions by entering the Name below', 'shortConfirmationLabel' => 'Name', 'confirmWithPassword' => true, @@ -27,8 +27,8 @@ deleteText: '', password: '', actions: @js($actions), - confirmText: @js($confirmText), - userConfirmText: '', + confirmationText: @js($confirmationText), + userConfirmationText: '', confirmWithText: @js($confirmWithText), confirmWithPassword: @js($confirmWithPassword), copied: false, @@ -39,7 +39,7 @@ this.step = this.initialStep; this.deleteText = ''; this.password = ''; - this.userConfirmText = ''; + this.userConfirmationText = ''; this.selectedActions = @js(collect($checkboxes)->pluck('id')->all()); $wire.$refresh(); }, @@ -69,8 +69,8 @@ } }); }, - copyConfirmText() { - navigator.clipboard.writeText(this.confirmText); + copyConfirmationText() { + navigator.clipboard.writeText(this.confirmationText); this.copied = true; setTimeout(() => { this.copied = false; @@ -199,8 +199,8 @@

{{ $confirmationLabel }}

- -