button components

This commit is contained in:
Andras Bacsai
2023-05-03 14:09:10 +02:00
parent 612460ca16
commit abf778ce86
31 changed files with 198 additions and 214 deletions

View File

@@ -3,8 +3,12 @@
<h1>Choose a server</h1>
@endif
@forelse ($servers as $server)
<button @if ($chosenServer && $chosenServer['id'] === $server->id) class="bg-blue-500" @endif
wire:click="chooseServer({{ $server }})">{{ $server->name }}</button>
@if ($chosenServer && $chosenServer['id'] === $server->id)
<x-inputs.button class="bg-blue-500" wire:click="chooseServer({{ $server }})">{{ $server->name }}
</x-inputs.button>
@else
<x-inputs.button wire:click="chooseServer({{ $server }})">{{ $server->name }}</x-inputs.button>
@endif
@empty
No servers found.
<p>Did you forget to add a destination on the server?</p>
@@ -15,12 +19,24 @@
<h1>Choose a destination</h1>
<div>
@foreach ($standalone_docker as $standalone)
<button @if ($chosenDestination?->uuid == $standalone->uuid) class="bg-blue-500" @endif
wire:click="setDestination('{{ $standalone->uuid }}','StandaloneDocker')">{{ $standalone->network }}</button>
@if ($chosenDestination?->uuid == $standalone->uuid)
<x-inputs.button class="bg-blue-500"
wire:click="setDestination('{{ $standalone->uuid }}','StandaloneDocker')">
{{ $standalone->network }}</x-inputs.button>
@else
<x-inputs.button wire:click="setDestination('{{ $standalone->uuid }}','StandaloneDocker')">
{{ $standalone->network }}</x-inputs.button>
@endif
@endforeach
@foreach ($swarm_docker as $standalone)
<button @if ($chosenDestination?->uuid == $standalone->uuid) class="bg-blue-500" @endif
wire:click="setDestination('{{ $standalone->uuid }}','SwarmDocker')">{{ $standalone->uuid }}</button>
@if ($chosenDestination?->uuid == $standalone->uuid)
<x-inputs.button class="bg-blue-500"
wire:click="setDestination('{{ $standalone->uuid }}','SwarmDocker')">
{{ $standalone->network }}</x-inputs.button>
@else
<x-inputs.button wire:click="setDestination('{{ $standalone->uuid }}','SwarmDocker')">
{{ $standalone->uuid }}</x-inputs.button>
@endif
@endforeach
</div>
<div>
@@ -40,16 +56,16 @@
@isset($chosenDestination)
<h1>Choose a repository</h1>
<form class="flex flex-col gap-2 w-96" wire:submit.prevent='submit'>
<x-form-input class="w-96" id="public_repository_url" label="Repository URL" />
<x-form-input instantSave type="checkbox" id="is_static" label="Static Site?" />
<x-inputs.input class="w-96" id="public_repository_url" label="Repository URL" />
<x-inputs.input instantSave type="checkbox" id="is_static" label="Static Site?" />
@if ($is_static)
<x-form-input id="publish_directory" label="Publish Directory" />
<x-inputs.input id="publish_directory" label="Publish Directory" />
@else
<x-form-input type="number" id="port" label="Port" :disabled="$is_static" />
<x-inputs.input type="number" id="port" label="Port" :disabled="$is_static" />
@endif
<button type="submit">
<x-inputs.button type="submit">
Submit
</button>
</x-inputs.button>
</form>
@endisset