diff --git a/app/Livewire/Team/Storage/Create.php b/app/Livewire/Storage/Create.php similarity index 95% rename from app/Livewire/Team/Storage/Create.php rename to app/Livewire/Storage/Create.php index a25fc9821..d1af807d5 100644 --- a/app/Livewire/Team/Storage/Create.php +++ b/app/Livewire/Storage/Create.php @@ -1,6 +1,6 @@ storage->team_id = currentTeam()->id; $this->storage->testConnection(); $this->storage->save(); - return redirect()->route('team.storage.show', $this->storage->uuid); + return redirect()->route('storage.show', $this->storage->uuid); } catch (\Throwable $e) { $this->dispatch('error', 'Failed to create storage.', $e->getMessage()); // return handleError($e, $this); diff --git a/app/Livewire/Team/Storage/Form.php b/app/Livewire/Storage/Form.php similarity index 94% rename from app/Livewire/Team/Storage/Form.php rename to app/Livewire/Storage/Form.php index 1fd0d470b..79c1f0c30 100644 --- a/app/Livewire/Team/Storage/Form.php +++ b/app/Livewire/Storage/Form.php @@ -1,6 +1,6 @@ storage->delete(); - return redirect()->route('team.storage.index'); + return redirect()->route('storage.index'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Livewire/Team/Storage/Index.php b/app/Livewire/Storage/Index.php similarity index 73% rename from app/Livewire/Team/Storage/Index.php rename to app/Livewire/Storage/Index.php index c15834564..f071a0af0 100644 --- a/app/Livewire/Team/Storage/Index.php +++ b/app/Livewire/Storage/Index.php @@ -1,6 +1,6 @@ storage = S3Storage::ownedByCurrentTeam()->whereUuid(request()->storage_uuid)->first(); + if (!$this->storage) { + abort(404); + } + } + public function render() + { + return view('livewire.storage.show'); + } +} diff --git a/app/Livewire/Team/Storage/Show.php b/app/Livewire/Team/Storage/Show.php index 6fbb6034f..ab2acbbb9 100644 --- a/app/Livewire/Team/Storage/Show.php +++ b/app/Livewire/Team/Storage/Show.php @@ -17,6 +17,6 @@ public function mount() } public function render() { - return view('livewire.team.storage.show'); + return view('livewire.storage.show'); } } diff --git a/app/Models/S3Storage.php b/app/Models/S3Storage.php index 9d60ce491..dc0b93466 100644 --- a/app/Models/S3Storage.php +++ b/app/Models/S3Storage.php @@ -48,7 +48,7 @@ public function testConnection(bool $shouldSave = false) if ($this->unusable_email_sent === false && is_transactional_emails_active()) { $mail = new MailMessage(); $mail->subject('Coolify: S3 Storage Connection Error'); - $mail->view('emails.s3-connection-error', ['name' => $this->name, 'reason' => $e->getMessage(), 'url' => route('team.storage.show', ['storage_uuid' => $this->uuid])]); + $mail->view('emails.s3-connection-error', ['name' => $this->name, 'reason' => $e->getMessage(), 'url' => route('storage.show', ['storage_uuid' => $this->uuid])]); $users = collect([]); $members = $this->team->members()->get(); foreach ($members as $user) { diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.php index 96af53d3f..0eebffd1e 100644 --- a/resources/views/components/navbar.blade.php +++ b/resources/views/components/navbar.blade.php @@ -156,6 +156,20 @@ class="{{ request()->is('destination*') ? 'menu-item-active menu-item' : 'menu-i Destinations +