refactor(application-source): improve layout and accessibility of Git repository links in the application source view

This commit is contained in:
Andras Bacsai
2025-09-10 18:29:52 +02:00
parent 49a2942836
commit fc7770100b

View File

@@ -5,26 +5,26 @@
@can('update', $application) @can('update', $application)
<x-forms.button type="submit">Save</x-forms.button> <x-forms.button type="submit">Save</x-forms.button>
@endcan @endcan
<a target="_blank" class="hover:no-underline" href="{{ $application?->gitBranchLocation }}"> <div class="flex items-center gap-4 px-2">
<x-forms.button> <a target="_blank" class="hover:no-underline flex items-center gap-1"
href="{{ $application?->gitBranchLocation }}">
Open Repository Open Repository
<x-external-link /> <x-external-link />
</x-forms.button>
</a> </a>
@if (data_get($application, 'source.is_public') === false) @if (data_get($application, 'source.is_public') === false)
<a target="_blank" class="hover:no-underline" href="{{ getInstallationPath($application->source) }}"> <a target="_blank" class="hover:no-underline flex items-center gap-1"
<x-forms.button> href="{{ getInstallationPath($application->source) }}">
Open Git App Open Git App
<x-external-link /> <x-external-link />
</x-forms.button>
</a> </a>
@endif @endif
<a target="_blank" class="flex hover:no-underline" href="{{ $application?->gitCommits }}"> <a target="_blank" class="flex hover:no-underline items-center gap-1"
<x-forms.button>Open Commits on Git href="{{ $application?->gitCommits }}">
Open Commits on Git
<x-external-link /> <x-external-link />
</x-forms.button>
</a> </a>
</div> </div>
</div>
<div class="pb-4">Code source of your application.</div> <div class="pb-4">Code source of your application.</div>
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
@@ -34,11 +34,13 @@
</div> </div>
@endif @endif
<div class="flex gap-2"> <div class="flex gap-2">
<x-forms.input placeholder="coollabsio/coolify-example" id="gitRepository" label="Repository" canGate="update" :canResource="$application" /> <x-forms.input placeholder="coollabsio/coolify-example" id="gitRepository" label="Repository"
canGate="update" :canResource="$application" />
<x-forms.input placeholder="main" id="gitBranch" label="Branch" canGate="update" :canResource="$application" /> <x-forms.input placeholder="main" id="gitBranch" label="Branch" canGate="update" :canResource="$application" />
</div> </div>
<div class="flex items-end gap-2"> <div class="flex items-end gap-2">
<x-forms.input placeholder="HEAD" id="gitCommitSha" placeholder="HEAD" label="Commit SHA" canGate="update" :canResource="$application" /> <x-forms.input placeholder="HEAD" id="gitCommitSha" placeholder="HEAD" label="Commit SHA"
canGate="update" :canResource="$application" />
</div> </div>
</div> </div>