Add build pack selection and update related fields

This commit is contained in:
Andras Bacsai
2024-01-25 15:57:04 +01:00
parent ae4b263810
commit 39647367a5
5 changed files with 84 additions and 34 deletions

View File

@@ -4,8 +4,16 @@
<x-forms.button wire:click="saveFromRedirect('source.new')" class="group-hover:text-white">
+ Add New GitHub App
</x-forms.button>
@if ($repositories->count() > 0)
<a target="_blank" class="flex hover:no-underline" href="{{ get_installation_path($github_app) }}">
<x-forms.button>
Change Repositories on GitHub
<x-external-link />
</x-forms.button>
</a>
@endif
</div>
<div class="pb-4">Deploy any public or private git repositories through a GitHub App.</div>
<div class="pb-4">Deploy any public or private Git repositories through a GitHub App.</div>
@if ($github_apps->count() !== 0)
<div class="flex flex-col gap-2 pt-10">
@if ($current_step === 'github_apps')
@@ -53,14 +61,8 @@
@endif
@endforeach
</x-forms.select>
<x-forms.button wire:click.prevent="loadBranches"> Load Repository Details </x-forms.button>
<a target="_blank" class="flex hover:no-underline"
href="{{ get_installation_path($github_app) }}">
<x-forms.button>
Change Repositories on GitHub
<x-external-link />
</x-forms.button>
</a>
<x-forms.button wire:click.prevent="loadBranches"> Load Repository </x-forms.button>
</div>
@else
<div>No repositories found. Check your GitHub App configuration.</div>
@@ -84,21 +86,28 @@
@endif
@endforeach
</x-forms.select>
<x-forms.select wire:model.live="build_pack" label="Build Pack" required>
<option value="nixpacks">Nixpacks</option>
<option value="static">Static</option>
<option value="dockerfile">Dockerfile</option>
<option value="dockercompose">Docker Compose</option>
</x-forms.select>
@if ($is_static)
<x-forms.input id="publish_directory" label="Publish Directory"
helper="If there is a build process involved (like Svelte, React, Next, etc..), please specify the output directory for the build assets." />
@else
<x-forms.input type="number" id="port" label="Port" :readonly="$is_static"
helper="The port your application listens on." />
@endif
</div>
<div class="w-52">
<x-forms.checkbox instantSave id="is_static" label="Is it a static site?"
helper="If your application is a static site or the final build assets should be served as a static site, enable this." />
</div>
<x-forms.input type="number" id="port" label="Port" :readonly="$is_static || $build_pack === 'static'"
helper="The port your application listens on." />
@if ($show_is_static)
<div class="w-52">
<x-forms.checkbox instantSave id="is_static" label="Is it a static site?"
helper="If your application is a static site or the final build assets should be served as a static site, enable this." />
</div>
@endif
</div>
<x-forms.button type="submit">
Save New Application
Continue
</x-forms.button>
@endif
@endif