refactor(source): conditionally display connected source and change source options based on private key presence
This commit is contained in:
@@ -26,9 +26,11 @@
|
||||
<div class="pb-4">Code source of your application.</div>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
@if (!$privateKeyId)
|
||||
<div>Currently connected source: <span
|
||||
class="font-bold text-warning">{{ $application->source->name }}</span>
|
||||
</div>
|
||||
@endif
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input placeholder="coollabsio/coolify-example" id="gitRepository" label="Repository" />
|
||||
<x-forms.input placeholder="main" id="gitBranch" label="Branch" />
|
||||
@@ -38,6 +40,20 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($privateKeyId)
|
||||
<h3 class="pt-4">Deploy Key</h3>
|
||||
<div class="py-2 pt-4">Currently attached Private Key: <span
|
||||
class="dark:text-warning">{{ $privateKeyName }}</span>
|
||||
</div>
|
||||
|
||||
<h4 class="py-2 ">Select another Private Key</h4>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@foreach ($privateKeys as $key)
|
||||
<x-forms.button wire:click="setPrivateKey('{{ $key->id }}')">{{ $key->name }}
|
||||
</x-forms.button>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<div class="pt-4">
|
||||
<h3 class="pb-2">Change Git Source</h3>
|
||||
<div class="grid grid-cols-1 gap-2">
|
||||
@@ -69,20 +85,6 @@
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($privateKeyId)
|
||||
<h3 class="pt-4">Deploy Key</h3>
|
||||
<div class="py-2 pt-4">Currently attached Private Key: <span
|
||||
class="dark:text-warning">{{ $privateKeyName }}</span>
|
||||
</div>
|
||||
|
||||
<h4 class="py-2 ">Select another Private Key</h4>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@foreach ($privateKeys as $key)
|
||||
<x-forms.button wire:click="setPrivateKey('{{ $key->id }}')">{{ $key->name }}
|
||||
</x-forms.button>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</form>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user