From 62244fdbb665e2dc2f8cbf9612e8979030f792c9 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Wed, 19 Mar 2025 14:50:10 +0100 Subject: [PATCH] refactor(ui): enhance Docker Compose input handling and layout --- app/Livewire/Project/New/GithubPrivateRepository.php | 6 +++++- .../Project/New/GithubPrivateRepositoryDeployKey.php | 3 +++ app/Livewire/Project/New/PublicGitRepository.php | 3 +++ .../new/github-private-repository-deploy-key.blade.php | 9 +++++++-- .../project/new/github-private-repository.blade.php | 6 ++++-- .../livewire/project/new/public-git-repository.blade.php | 6 ++++-- 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/app/Livewire/Project/New/GithubPrivateRepository.php b/app/Livewire/Project/New/GithubPrivateRepository.php index 6098151726..c0a1d13904 100644 --- a/app/Livewire/Project/New/GithubPrivateRepository.php +++ b/app/Livewire/Project/New/GithubPrivateRepository.php @@ -89,6 +89,7 @@ class GithubPrivateRepository extends Component } $this->getCoolifyConfig(); } + public function updatedSelectedBranchName() { $this->getCoolifyConfig(); @@ -103,6 +104,9 @@ class GithubPrivateRepository extends Component $this->show_is_static = false; $this->is_static = false; $this->port = 80; + } elseif ($this->build_pack === 'dockercompose') { + $this->show_is_static = false; + $this->is_static = false; } else { $this->show_is_static = true; $this->is_static = false; @@ -214,7 +218,7 @@ class GithubPrivateRepository extends Component DB::beginTransaction(); // Create and save the base application first - $cuid = new Cuid2(); + $cuid = new Cuid2; $application = new Application([ 'name' => generate_application_name($this->selected_repository_owner.'/'.$this->selected_repository_repo, $this->selected_branch_name), 'repository_project_id' => $this->selected_repository_id, diff --git a/app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php b/app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php index 01b0c9ae85..559d04c17d 100644 --- a/app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php +++ b/app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php @@ -96,6 +96,9 @@ class GithubPrivateRepositoryDeployKey extends Component $this->show_is_static = false; $this->is_static = false; $this->port = 80; + } elseif ($this->build_pack === 'dockercompose') { + $this->show_is_static = false; + $this->is_static = false; } else { $this->show_is_static = false; $this->is_static = false; diff --git a/app/Livewire/Project/New/PublicGitRepository.php b/app/Livewire/Project/New/PublicGitRepository.php index 5ba1c4bea5..e89b1f2b9f 100644 --- a/app/Livewire/Project/New/PublicGitRepository.php +++ b/app/Livewire/Project/New/PublicGitRepository.php @@ -127,6 +127,9 @@ class PublicGitRepository extends Component $this->show_is_static = false; $this->isStatic = false; $this->port = 80; + } elseif ($this->build_pack === 'dockercompose') { + $this->show_is_static = false; + $this->isStatic = false; } else { $this->show_is_static = true; $this->isStatic = false; diff --git a/resources/views/livewire/project/new/github-private-repository-deploy-key.blade.php b/resources/views/livewire/project/new/github-private-repository-deploy-key.blade.php index 9d3af0b289..7fec2b1b07 100644 --- a/resources/views/livewire/project/new/github-private-repository-deploy-key.blade.php +++ b/resources/views/livewire/project/new/github-private-repository-deploy-key.blade.php @@ -67,8 +67,13 @@ - Compose file location in your repository:{{ Str::start($base_directory . $docker_compose_location, '/') }} +
+ Compose file location in your repository:{{ Str::start($base_directory . $docker_compose_location, '/') }} +
+ @else + @endif @if ($show_is_static) diff --git a/resources/views/livewire/project/new/github-private-repository.blade.php b/resources/views/livewire/project/new/github-private-repository.blade.php index ab39d540a5..7f8e56ca3c 100644 --- a/resources/views/livewire/project/new/github-private-repository.blade.php +++ b/resources/views/livewire/project/new/github-private-repository.blade.php @@ -102,8 +102,10 @@ - Compose file location in your repository:{{ Str::start($base_directory . $docker_compose_location, '/') }} +
+ Compose file location in your repository:{{ Str::start($base_directory . $docker_compose_location, '/') }} +
@else - Compose file location in your repository:{{ Str::start($base_directory . $docker_compose_location, '/') }} +
+ Compose file location in your repository:{{ Str::start($base_directory . $docker_compose_location, '/') }} +
@else