Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: update navbar on build_pack change

Andras Bacsaif445a8c312ee
diff --git a/app/Livewire/Project/Application/Configuration.php b/app/Livewire/Project/Application/Configuration.php
index 1bf9e6c3b5..b095ab54d2 100644
--- a/app/Livewire/Project/Application/Configuration.php
+++ b/app/Livewire/Project/Application/Configuration.php
@@ -10,6 +10,8 @@ class Configuration extends Component
{
public Application $application;
public $servers;
+ protected $listeners = ['build_pack_updated' => '$refresh'];
+
public function mount()
{
$project = currentTeam()->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first();
diff --git a/app/Livewire/Project/Application/General.php b/app/Livewire/Project/Application/General.php
index e6f263c7b9..b369366282 100644
--- a/app/Livewire/Project/Application/General.php
+++ b/app/Livewire/Project/Application/General.php
@@ -178,6 +178,7 @@ class General extends Component
$this->resetDefaultLabels(false);
}
$this->submit();
+ $this->dispatch('build_pack_updated');
}
public function checkLabelUpdates()
{
diff --git a/resources/views/livewire/project/application/configuration.blade.php b/resources/views/livewire/project/application/configuration.blade.php
index 5d29366494..579f1cac1a 100644
--- a/resources/views/livewire/project/application/configuration.blade.php
+++ b/resources/views/livewire/project/application/configuration.blade.php
@@ -2,7 +2,7 @@
<h1>Configuration</h1>
<livewire:project.application.heading :application="$application" />
<div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : 'general' }" class="flex h-full pt-6">
- <div class="flex flex-col gap-4 min-w-fit">
+ <div class="flex flex-col gap-4 xl:w-48">
<a :class="activeTab === 'general' && 'text-white'"
@click.prevent="activeTab = 'general'; window.location.hash = 'general'" href="#">General</a>
@if ($application->destination->server->isSwarm())
diff --git a/resources/views/livewire/project/application/general.blade.php b/resources/views/livewire/project/application/general.blade.php
index 3f6d3984f6..6df481e71d 100644
--- a/resources/views/livewire/project/application/general.blade.php
+++ b/resources/views/livewire/project/application/general.blade.php
@@ -16,14 +16,7 @@
<x-forms.input id="application.name" label="Name" required />
<x-forms.input id="application.description" label="Description" />
</div>
- @if ($application->build_pack !== 'dockercompose')
- <div class="flex items-end gap-2">
- <x-forms.input placeholder="https://coolify.io" id="application.fqdn" label="Domains"
- helper="You can specify one domain with path or more with comma. You can specify a port to bind the domain to.<br><br><span class='text-helper'>Example</span><br>- http://app.coolify.io, https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3<br>- http://app.coolify.io:3000 -> app.coolify.io will point to port 3000 inside the container. " />
- <x-forms.button wire:click="getWildcardDomain">Generate Domain
- </x-forms.button>
- </div>
- @endif
+
@if (!$application->dockerfile && $application->build_pack !== 'dockerimage')
<div class="flex flex-col gap-2">
<div class="flex gap-2">
@@ -70,6 +63,14 @@
@endif
</div>
@endif
+ @if ($application->build_pack !== 'dockercompose')
+ <div class="flex items-end gap-2">
+ <x-forms.input placeholder="https://coolify.io" id="application.fqdn" label="Domains"
+ helper="You can specify one domain with path or more with comma. You can specify a port to bind the domain to.<br><br><span class='text-helper'>Example</span><br>- http://app.coolify.io, https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3<br>- http://app.coolify.io:3000 -> app.coolify.io will point to port 3000 inside the container. " />
+ <x-forms.button wire:click="getWildcardDomain">Generate Domain
+ </x-forms.button>
+ </div>
+ @endif
@if ($application->build_pack !== 'dockercompose')
<h3>Docker Registry</h3>
@if ($application->destination->server->isSwarm())