refactor(ui): simplify GitHub App registration UI and layout
This commit is contained in:
@@ -14,31 +14,18 @@
|
|||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
@if ($applications->count() > 0)
|
@if ($applications->count() > 0)
|
||||||
<x-modal-confirmation
|
<x-modal-confirmation title="Confirm GitHub App Deletion?" isErrorButton buttonTitle="Delete"
|
||||||
title="Confirm GitHub App Deletion?"
|
submitAction="delete" :actions="['The selected GitHub App will be permanently deleted.']" confirmationText="{{ data_get($github_app, 'name') }}"
|
||||||
isErrorButton
|
confirmationLabel="Please confirm the execution of the actions by entering the GitHub App Name below"
|
||||||
buttonTitle="Delete"
|
shortConfirmationLabel="GitHub App Name" :confirmWithPassword="false"
|
||||||
submitAction="delete"
|
step2ButtonText="Permanently Delete" />
|
||||||
:actions="['The selected GitHub App will be permanently deleted.']"
|
|
||||||
confirmationText="{{ data_get($github_app, 'name') }}"
|
|
||||||
confirmationLabel="Please confirm the execution of the actions by entering the GitHub App Name below"
|
|
||||||
shortConfirmationLabel="GitHub App Name"
|
|
||||||
:confirmWithPassword="false"
|
|
||||||
step2ButtonText="Permanently Delete"
|
|
||||||
/>
|
|
||||||
@else
|
@else
|
||||||
<x-modal-confirmation
|
<x-modal-confirmation title="Confirm GitHub App Deletion?" isErrorButton buttonTitle="Delete"
|
||||||
title="Confirm GitHub App Deletion?"
|
submitAction="delete" :actions="['The selected GitHub App will be permanently deleted.']"
|
||||||
isErrorButton
|
confirmationLabel="Please confirm the execution of the actions by entering the GitHub App Name below"
|
||||||
buttonTitle="Delete"
|
shortConfirmationLabel="GitHub App Name"
|
||||||
submitAction="delete"
|
confirmationText="{{ data_get($github_app, 'name') }}" :confirmWithPassword="false"
|
||||||
:actions="['The selected GitHub App will be permanently deleted.']"
|
step2ButtonText="Permanently Delete" />
|
||||||
confirmationLabel="Please confirm the execution of the actions by entering the GitHub App Name below"
|
|
||||||
shortConfirmationLabel="GitHub App Name"
|
|
||||||
confirmationText="{{ data_get($github_app, 'name') }}"
|
|
||||||
:confirmWithPassword="false"
|
|
||||||
step2ButtonText="Permanently Delete"
|
|
||||||
/>
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -166,8 +153,7 @@
|
|||||||
{{ data_get($resource, 'environment.name') }}
|
{{ data_get($resource, 'environment.name') }}
|
||||||
</td>
|
</td>
|
||||||
<td class="px-5 py-4 text-sm whitespace-nowrap"><a
|
<td class="px-5 py-4 text-sm whitespace-nowrap"><a
|
||||||
class=""
|
class="" wire:navigate
|
||||||
wire:navigate
|
|
||||||
href="{{ $resource->link() }}">{{ $resource->name }}
|
href="{{ $resource->link() }}">{{ $resource->name }}
|
||||||
<x-internal-link /></a>
|
<x-internal-link /></a>
|
||||||
</td>
|
</td>
|
||||||
@@ -190,21 +176,13 @@
|
|||||||
<div class="flex items-center gap-2 pb-4">
|
<div class="flex items-center gap-2 pb-4">
|
||||||
<h1>GitHub App</h1>
|
<h1>GitHub App</h1>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<x-modal-confirmation
|
<x-modal-confirmation title="Confirm GitHub App Deletion?" isErrorButton buttonTitle="Delete"
|
||||||
title="Confirm GitHub App Deletion?"
|
submitAction="delete" :actions="['The selected GitHub App will be permanently deleted.']" confirmationText="{{ data_get($github_app, 'name') }}"
|
||||||
isErrorButton
|
confirmationLabel="Please confirm the execution of the actions by entering the GitHub App Name below"
|
||||||
buttonTitle="Delete"
|
shortConfirmationLabel="GitHub App Name" :confirmWithPassword="false" step2ButtonText="Permanently Delete" />
|
||||||
submitAction="delete"
|
|
||||||
:actions="['The selected GitHub App will be permanently deleted.']"
|
|
||||||
confirmationText="{{ data_get($github_app, 'name') }}"
|
|
||||||
confirmationLabel="Please confirm the execution of the actions by entering the GitHub App Name below"
|
|
||||||
shortConfirmationLabel="GitHub App Name"
|
|
||||||
:confirmWithPassword="false"
|
|
||||||
step2ButtonText="Permanently Delete"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-10 rounded alert-error">
|
<div class=" pb-5 rounded alert-error">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 stroke-current shrink-0" fill="none"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 stroke-current shrink-0" fill="none"
|
||||||
viewBox="0 0 24 24">
|
viewBox="0 0 24 24">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||||
@@ -213,15 +191,7 @@
|
|||||||
<span>You must complete this step before you can use this source!</span>
|
<span>You must complete this step before you can use this source!</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<div class="flex gap-2">
|
<div class="pb-10">
|
||||||
<h2>Register a GitHub App</h2>
|
|
||||||
<x-forms.button class="bg-coollabs hover:bg-coollabs-100"
|
|
||||||
x-on:click.prevent="createGithubApp('{{ $webhook_endpoint }}','{{ $preview_deployment_permissions }}',{{ $administration }})">
|
|
||||||
Register Now
|
|
||||||
</x-forms.button>
|
|
||||||
</div>
|
|
||||||
<div>You need to register a GitHub App before using this source.</div>
|
|
||||||
<div class="py-10">
|
|
||||||
@if (!isCloud() || isDev())
|
@if (!isCloud() || isDev())
|
||||||
<div class="flex items-end gap-2">
|
<div class="flex items-end gap-2">
|
||||||
<x-forms.select wire:model.live='webhook_endpoint' label="Webhook Endpoint"
|
<x-forms.select wire:model.live='webhook_endpoint' label="Webhook Endpoint"
|
||||||
@@ -239,8 +209,22 @@
|
|||||||
<option value="{{ config('app.url') }}">Use {{ config('app.url') }}</option>
|
<option value="{{ config('app.url') }}">Use {{ config('app.url') }}</option>
|
||||||
@endif
|
@endif
|
||||||
</x-forms.select>
|
</x-forms.select>
|
||||||
|
<x-forms.button isHighlighted
|
||||||
|
x-on:click.prevent="createGithubApp('{{ $webhook_endpoint }}','{{ $preview_deployment_permissions }}',{{ $administration }})">
|
||||||
|
Register Now
|
||||||
|
</x-forms.button>
|
||||||
</div>
|
</div>
|
||||||
|
@else
|
||||||
|
<div class="flex gap-2">
|
||||||
|
<h2>Register a GitHub App</h2>
|
||||||
|
<x-forms.button isHighlighted
|
||||||
|
x-on:click.prevent="createGithubApp('{{ $webhook_endpoint }}','{{ $preview_deployment_permissions }}',{{ $administration }})">
|
||||||
|
Register Now
|
||||||
|
</x-forms.button>
|
||||||
|
</div>
|
||||||
|
<div>You need to register a GitHub App before using this source.</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="flex flex-col gap-2 pt-4 w-96">
|
<div class="flex flex-col gap-2 pt-4 w-96">
|
||||||
<x-forms.checkbox disabled instantSave id="default_permissions" label="Mandatory"
|
<x-forms.checkbox disabled instantSave id="default_permissions" label="Mandatory"
|
||||||
helper="Contents: read<br>Metadata: read<br>Email: read" />
|
helper="Contents: read<br>Metadata: read<br>Email: read" />
|
||||||
|
Reference in New Issue
Block a user