diff --git a/app/Livewire/Dashboard.php b/app/Livewire/Dashboard.php index 632f14d65..8a5d491e4 100644 --- a/app/Livewire/Dashboard.php +++ b/app/Livewire/Dashboard.php @@ -3,6 +3,7 @@ namespace App\Livewire; use App\Models\ApplicationDeploymentQueue; +use App\Models\PrivateKey; use App\Models\Project; use App\Models\Server; use Illuminate\Support\Collection; @@ -13,9 +14,11 @@ class Dashboard extends Component { public $projects = []; public Collection $servers; + public Collection $private_keys; public $deployments_per_server; public function mount() { + $this->private_keys = PrivateKey::ownedByCurrentTeam()->get(); $this->servers = Server::ownedByCurrentTeam()->get(); $this->projects = Project::ownedByCurrentTeam()->get(); $this->get_deployments(); diff --git a/app/Livewire/Project/Edit.php b/app/Livewire/Project/Edit.php index a80b1af76..17cb6902b 100644 --- a/app/Livewire/Project/Edit.php +++ b/app/Livewire/Project/Edit.php @@ -46,10 +46,11 @@ public function mount() public function submit() { - $this->validate(); try { + $this->validate(); $this->project->save(); $this->dispatch('saved'); + $this->dispatch('success', 'Project updated.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Livewire/Security/PrivateKey/Create.php b/app/Livewire/Security/PrivateKey/Create.php index 62d763601..cd1c06568 100644 --- a/app/Livewire/Security/PrivateKey/Create.php +++ b/app/Livewire/Security/PrivateKey/Create.php @@ -67,7 +67,7 @@ public function createPrivateKey() 'team_id' => currentTeam()->id ]); if ($this->from === 'server') { - return redirect()->route('server.create'); + return redirect()->route('dashboard'); } return redirect()->route('security.private-key.show', ['private_key_uuid' => $private_key->uuid]); } catch (\Throwable $e) { diff --git a/app/Livewire/Subscription/Index.php b/app/Livewire/Subscription/Index.php index 4f36750c7..c87f7d0b6 100644 --- a/app/Livewire/Subscription/Index.php +++ b/app/Livewire/Subscription/Index.php @@ -31,6 +31,6 @@ public function stripeCustomerPortal() } public function render() { - return view('livewire.subscription.index')->layout('layouts.subscription'); + return view('livewire.subscription.index'); } } diff --git a/app/Livewire/SwitchTeam.php b/app/Livewire/SwitchTeam.php index 845619820..49b73cdc6 100644 --- a/app/Livewire/SwitchTeam.php +++ b/app/Livewire/SwitchTeam.php @@ -8,7 +8,9 @@ class SwitchTeam extends Component { public string $selectedTeamId = 'default'; - + public function mount() { + $this->selectedTeamId = auth()->user()->currentTeam()->id; + } public function updatedSelectedTeamId() { $this->switch_to($this->selectedTeamId); diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 7810e0155..2645a6a22 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -280,6 +280,10 @@ function base_url(bool $withPort = true): string return url('/'); } +function isSubscribed() +{ + return auth()->user()->currentTeam()->subscription()->exists() || auth()->user()->isInstanceAdmin(); +} function isDev(): bool { return config('app.env') === 'local'; @@ -1282,7 +1286,6 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal $volume = str("$name:$mount"); } } - } else if (is_array($volume)) { $source = data_get($volume, 'source'); $target = data_get($volume, 'target'); diff --git a/resources/css/app.css b/resources/css/app.css index f76067b51..a3fc32386 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -152,7 +152,7 @@ .custom-modal { } .navbar-main { - @apply flex items-end gap-6 py-2 border-b-2 border-solid border-coolgray-200; + @apply flex items-end gap-6 pb-2 border-b-2 border-solid border-coolgray-200; } .loading { diff --git a/resources/views/components/layout-subscription.blade.php b/resources/views/components/layout-subscription.blade.php deleted file mode 100644 index 5fdd838af..000000000 --- a/resources/views/components/layout-subscription.blade.php +++ /dev/null @@ -1 +0,0 @@ -@extends('layouts.subscription') diff --git a/resources/views/components/navbar-subscription.blade.php b/resources/views/components/navbar-subscription.blade.php deleted file mode 100644 index f1f68b50e..000000000 --- a/resources/views/components/navbar-subscription.blade.php +++ /dev/null @@ -1,47 +0,0 @@ -@auth - -@endauth diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.php index ee856d2ab..f0e4588e6 100644 --- a/resources/views/components/navbar.blade.php +++ b/resources/views/components/navbar.blade.php @@ -4,225 +4,237 @@
Coolify
- + {{-- --}} + +
+