This commit is contained in:
Andras Bacsai
2023-06-05 13:50:34 +02:00
parent 6b82a9ef11
commit 6a599c53d7
10 changed files with 162 additions and 101 deletions

View File

@@ -22,7 +22,9 @@
{{ $slot }}
</button>
@elseif($type === 'button')
<button {{ $attributes }} @if ($disabled !== null) disabled @endif type="button"
<button
{{ $attributes->class(['btn btn-xs border-none no-animation normal-case text-white rounded', 'hover:bg-coolgray-400 bg-coolgray-200 h-7' => !$attributes->has('class')]) }}
@if ($disabled !== null) disabled @endif type="button"
@isset($confirm)
x-on:click="toggleConfirmModal('{{ $confirm }}', '{{ explode('(', $confirmAction)[0] }}')"
@endisset

View File

@@ -1,10 +1,11 @@
@props([
'id' => null,
'label' => null,
'helper' => $attributes->has('helper'),
'required' => false,
])
<span {{ $attributes->merge(['class' => 'flex flex-col']) }}>
<div {{ $attributes->merge(['class' => 'flex flex-col']) }}>
<label class="label" for={{ $id }}>
<span class="label-text">
@if ($label)
@@ -15,6 +16,23 @@
@if ($required)
<span class="text-warning">*</span>
@endif
@if ($helper)
<div class="-mb-1 dropdown dropdown-right dropdown-hover">
<label tabindex="0" class="cursor-pointer text-warning">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
class="w-4 h-4 stroke-current">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
</label>
<div tabindex="0"
class="border rounded shadow border-coolgray-400 card compact dropdown-content bg-coolgray-200 w-96">
<div class="card-body">
{!! $helper !!}
</div>
</div>
</div>
@endif
</span>
</label>
<select {{ $attributes }} wire:model.defer={{ $id }}>
@@ -24,4 +42,4 @@
@error($id)
<div class="text-red-500">{{ $message }}</div>
@enderror
</span>
</div>

View File

@@ -603,7 +603,7 @@
`/project/${this.selectedProject}/${this.selectedEnvironment}/new?type=public&destination=${this.selectedDestination}`
} else if (this.selectedAction === 1) {
window.location =
`/project/${this.selectedProject}/${this.selectedEnvironment}/new?type=private-gh-Apps&destination=${this.selectedDestination}`
`/project/${this.selectedProject}/${this.selectedEnvironment}/new?type=private-gh-app&destination=${this.selectedDestination}`
} else if (this.selectedAction === 2) {
window.location =
`/project/${this.selectedProject}/${this.selectedEnvironment}/new?type=private-deploy-key&destination=${this.selectedDestination}`

View File

@@ -7,11 +7,12 @@
<div class="relative text-center rounded modal-box bg-coolgray-100">
<div class="pb-8 text-base text-white">{{ $message }}</div>
<div class="flex justify-center gap-4 text-xs">
<x-forms.button class="w-32" isWarning wire:click='{{ $action }}'
x-on:click="{{ $show }} = false">
<x-forms.button class="w-32 hover:bg-coolgray-400 bg-coolgray-200 h-7" isWarning
wire:click='{{ $action }}' x-on:click="{{ $show }} = false">
Yes
</x-forms.button>
<x-forms.button class="w-32" x-on:click="{{ $show }} = false">No</x-forms.button>
<x-forms.button class="w-32 hover:bg-coolgray-400 bg-coolgray-200 h-7"
x-on:click="{{ $show }} = false">No</x-forms.button>
</div>
</div>
</div>