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.

feat(github): enhance Docker Compose input fields for better user experience

Andras Bacsaidf1fe5739b96
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 d618918699..8190c89dbe 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
@@ -61,13 +61,21 @@
@endif
</div>
@if ($build_pack === 'dockercompose')
- <x-forms.input placeholder="/" wire:model.blur-sm="base_directory" label="Base Directory"
+ <div x-data="{ baseDir: '{{ $base_directory }}', composeLocation: '{{ $docker_compose_location }}' }" class="gap-2 flex flex-col">
+ <x-forms.input placeholder="/" wire:model.blur-sm="base_directory" label="Base Directory"
+ helper="Directory to use as root. Useful for monorepos." x-model="baseDir" />
+ <x-forms.input placeholder="/docker-compose.yaml" wire:model.blur-sm="docker_compose_location"
+ label="Docker Compose Location" helper="It is calculated together with the Base Directory."
+ x-model="composeLocation" />
+ <div class="pt-2">
+ <span>
+ Compose file location in your repository: </span><span class='dark:text-warning'
+ x-text='(baseDir === "/" ? "" : baseDir) + (composeLocation.startsWith("/") ? composeLocation : "/" + composeLocation)'></span>
+ </div>
+ </div>
+ @else
+ <x-forms.input wire:model="base_directory" label="Base Directory"
helper="Directory to use as root. Useful for monorepos." />
- <x-forms.input placeholder="/docker-compose.yaml" id="docker_compose_location"
- label="Docker Compose Location"
- helper="It is calculated together with the Base Directory:<br><span class='dark:text-warning'>{{ Str::start($base_directory . $docker_compose_location, '/') }}</span>" />
- Compose file location in your repository:<span
- class='dark:text-warning'>{{ Str::start($base_directory . $docker_compose_location, '/') }}</span>
@endif
@if ($show_is_static)
<x-forms.input type="number" required id="port" label="Port" :readonly="$is_static || $build_pack === '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 07379be397..2c2bb4f0c3 100644
--- a/resources/views/livewire/project/new/github-private-repository.blade.php
+++ b/resources/views/livewire/project/new/github-private-repository.blade.php
@@ -95,14 +95,21 @@
@endif
</div>
@if ($build_pack === 'dockercompose')
- <x-forms.input placeholder="/" wire:model.blur-sm="base_directory"
- label="Base Directory"
+ <div x-data="{ baseDir: '{{ $base_directory }}', composeLocation: '{{ $docker_compose_location }}' }" class="gap-2 flex flex-col">
+ <x-forms.input placeholder="/" wire:model.blur-sm="base_directory" label="Base Directory"
+ helper="Directory to use as root. Useful for monorepos." x-model="baseDir" />
+ <x-forms.input placeholder="/docker-compose.yaml" wire:model.blur-sm="docker_compose_location"
+ label="Docker Compose Location" helper="It is calculated together with the Base Directory."
+ x-model="composeLocation" />
+ <div class="pt-2">
+ <span>
+ Compose file location in your repository: </span><span class='dark:text-warning'
+ x-text='(baseDir === "/" ? "" : baseDir) + (composeLocation.startsWith("/") ? composeLocation : "/" + composeLocation)'></span>
+ </div>
+ </div>
+ @else
+ <x-forms.input wire:model="base_directory" label="Base Directory"
helper="Directory to use as root. Useful for monorepos." />
- <x-forms.input placeholder="/docker-compose.yaml" id="docker_compose_location"
- label="Docker Compose Location"
- helper="It is calculated together with the Base Directory:<br><span class='dark:text-warning'>{{ Str::start($base_directory . $docker_compose_location, '/') }}</span>" />
- Compose file location in your repository:<span
- class='dark:text-warning'>{{ Str::start($base_directory . $docker_compose_location, '/') }}</span>
@endif
@if ($show_is_static)
<x-forms.input type="number" id="port" label="Port" :readonly="$is_static || $build_pack === 'static'"