diff --git a/app/Livewire/Project/Application/General.php b/app/Livewire/Project/Application/General.php
index a8032f6f8..c2bbed5ff 100644
--- a/app/Livewire/Project/Application/General.php
+++ b/app/Livewire/Project/Application/General.php
@@ -25,6 +25,7 @@ class General extends Component
public $customLabels;
public bool $labelsChanged = false;
public bool $isConfigurationChanged = false;
+ public bool $initLoadingCompose = false;
public ?string $initialDockerComposeLocation = null;
public ?string $initialDockerComposePrLocation = null;
@@ -136,6 +137,10 @@ class General extends Component
$this->application->save();
}
$this->initialDockerComposeLocation = $this->application->docker_compose_location;
+ if ($this->application->build_pack === 'dockercompose' && !$this->application->docker_compose_raw) {
+ $this->initLoadingCompose = true;
+ $this->dispatch('info', 'Loading docker compose file...');
+ }
}
public function instantSave()
{
@@ -154,11 +159,15 @@ class General extends Component
}
['parsedServices' => $this->parsedServices, 'initialDockerComposeLocation' => $this->initialDockerComposeLocation, 'initialDockerComposePrLocation' => $this->initialDockerComposePrLocation] = $this->application->loadComposeFile($isInit);
$this->dispatch('success', 'Docker compose file loaded.');
+ $this->dispatch('compose_loaded');
} catch (\Throwable $e) {
$this->application->docker_compose_location = $this->initialDockerComposeLocation;
$this->application->docker_compose_pr_location = $this->initialDockerComposePrLocation;
$this->application->save();
return handleError($e, $this);
+ } finally {
+ $this->initLoadingCompose = false;
+
}
}
public function generateDomain(string $serviceName)
diff --git a/app/Livewire/Project/Application/Heading.php b/app/Livewire/Project/Application/Heading.php
index 089eb5e9f..2e1f8a7c7 100644
--- a/app/Livewire/Project/Application/Heading.php
+++ b/app/Livewire/Project/Application/Heading.php
@@ -22,6 +22,7 @@ class Heading extends Component
$teamId = auth()->user()->currentTeam()->id;
return [
"echo-private:team.{$teamId},ApplicationStatusChanged" => 'check_status',
+ "compose_loaded" => '$refresh',
];
}
public function mount()
diff --git a/app/Livewire/Project/Service/EditCompose.php b/app/Livewire/Project/Service/EditCompose.php
index cc385315e..84cc45cf2 100644
--- a/app/Livewire/Project/Service/EditCompose.php
+++ b/app/Livewire/Project/Service/EditCompose.php
@@ -18,7 +18,7 @@ class EditCompose extends Component
}
public function saveEditedCompose() {
- $this->dispatch('warning', "Saving new docker compose...");
+ $this->dispatch('info', "Saving new docker compose...");
$this->dispatch('saveCompose', $this->service->docker_compose_raw);
}
public function render()
diff --git a/resources/views/components/forms/button.blade.php b/resources/views/components/forms/button.blade.php
index 3eafc26c6..a109e84ac 100644
--- a/resources/views/components/forms/button.blade.php
+++ b/resources/views/components/forms/button.blade.php
@@ -5,11 +5,14 @@
@endisset
@isset($confirmAction)
x-on:{{ explode('(', $confirmAction)[0] }}.window="$wire.{{ explode('(', $confirmAction)[0] }}"
- @endisset
- >
+ @endisset>
{{ $slot }}
@if ($attributes->whereStartsWith('wire:click')->first())
-