Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

button components

Andras Bacsaiabf778ce8671
diff --git a/app/Http/Livewire/PrivateKey/Create.php b/app/Http/Livewire/PrivateKey/Create.php
index e21f023098..ee73827ea9 100644
--- a/app/Http/Livewire/PrivateKey/Create.php
+++ b/app/Http/Livewire/PrivateKey/Create.php
@@ -16,12 +16,13 @@ class Create extends Component
if (!str_ends_with($this->private_key_value, "\n")) {
$this->private_key_value .= "\n";
}
- PrivateKey::create([
+ $new_private_key = PrivateKey::create([
'name' => $this->private_key_name,
'description' => $this->private_key_description,
'private_key' => $this->private_key_value,
'team_id' => session('currentTeam')->id
]);
session('currentTeam')->privateKeys = PrivateKey::where('team_id', session('currentTeam')->id)->get();
+ redirect()->route('private-key.show', $new_private_key->uuid);
}
}
diff --git a/app/View/Components/FormInput.php b/app/View/Components/FormInput.php
deleted file mode 100644
index 6030c26811..0000000000
--- a/app/View/Components/FormInput.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-namespace App\View\Components;
-
-use Closure;
-use Illuminate\Contracts\View\View;
-use Illuminate\View\Component;
-
-class FormInput extends Component
-{
- /**
- * Create a new component instance.
- */
- public function __construct(
- public string $id,
- public bool $required = false,
- public bool $readonly = false,
- public string|null $label = null,
- public string|null $type = 'text',
- public string|null $class = "",
- public bool $instantSave = false,
- public bool $disabled = false,
- public bool $hidden = false
- ) {
- }
-
- /**
- * Get the view / contents that represent the component.
- */
- public function render(): View|Closure|string
- {
- return view('components.form-input');
- }
-}
diff --git a/app/View/Components/Input.php b/app/View/Components/Input.php
deleted file mode 100644
index 41ef10a63b..0000000000
--- a/app/View/Components/Input.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-namespace App\View\Components;
-
-use Closure;
-use Illuminate\Contracts\View\View;
-use Illuminate\View\Component;
-
-class Input extends Component
-{
- /**
- * Create a new component instance.
- */
- public function __construct(
- public string $id,
- public bool $required = false,
- public bool $readonly = false,
- public string|null $label = null,
- public string|null $type = 'text',
- ) {
- }
-
- /**
- * Get the view / contents that represent the component.
- */
- public function render(): View|Closure|string
- {
- return view('components.input');
- }
-}
diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php
index bbd76134c4..8302964582 100644
--- a/resources/views/auth/login.blade.php
+++ b/resources/views/auth/login.blade.php
@@ -12,7 +12,7 @@
<input type="text" name="email" placeholder="email" @env('local') value="[email protected]" @endenv
autofocus />
<input type="password" name="password" placeho lder="Password" @env('local') value="password" @endenv />
- <button type="submit">Login</button>
+ <x-inputs.button type="submit">Login</x-inputs.button>
</form>
@if ($errors->any())
<div class="alert alert-danger">
diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php
index a2494ff3a1..515f475095 100644
--- a/resources/views/auth/register.blade.php
+++ b/resources/views/auth/register.blade.php
@@ -9,7 +9,7 @@
<input type="password" name="password" placeholder="Password" @env('local') value="password" @endenv />
<input type="password" name="password_confirmation" placeholder="Password"
@env('local') value="password" @endenv />
- <button type="submit">Register</button>
+ <x-inputs.button type="submit">Register</x-inputs.button>
</form>
@if ($errors->any())
<div class="alert alert-danger">
diff --git a/resources/views/components/confirm-modal.blade.php b/resources/views/components/confirm-modal.blade.php
index d259961232..24fad1ff05 100644
--- a/resources/views/components/confirm-modal.blade.php
+++ b/resources/views/components/confirm-modal.blade.php
@@ -16,8 +16,8 @@
<div class="flex flex-col items-center justify-center h-full">
<div class="pb-5 text-white" x-text="message"></div>
<div>
- <button x-on:click="open = false">Cancel</button>
- <button x-on:click="$dispatch('confirm')">Confirm</button>
+ <x-inputs.button x-on:click="$dispatch('confirm')">Confirm</x-inputs.button>
+ <x-inputs.button x-on:click="open = false">Cancel</x-inputs.button>
</div>
</div>
</div>
diff --git a/resources/views/components/input.blade.php b/resources/views/components/input.blade.php
deleted file mode 100644
index 0acf572ce7..0000000000
--- a/resources/views/components/input.blade.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<label for={{ $id }}>
- @if ($label)
- {{ $label }}
- @else
- {{ $id }}
- @endif
- @if ($required)
- *
- @endif
- <input id={{ $id }} type={{ $type }} wire:model.defer={{ $id }}>
-</label>
diff --git a/resources/views/components/inputs/button.blade.php b/resources/views/components/inputs/button.blade.php
new file mode 100644
index 0000000000..9d9faaa654
--- /dev/null
+++ b/resources/views/components/inputs/button.blade.php
@@ -0,0 +1,13 @@
+@props([
+ 'defaultClass' => 'bg-indigo-500',
+ 'confirm' => null,
+ 'confirmAction' => null,
+])
+
+<button {{ $attributes }} {{ $attributes->merge(['class' => $defaultClass]) }}
+ @if ($attributes->whereStartsWith('wire:click')) wire:target="{{ $attributes->whereStartsWith('wire:click')->first() }}"
+ wire:loading.class="text-black bg-green-500" wire:loading.attr="disabled" wire:loading.class.remove="{{ $defaultClass }} {{ $attributes->whereStartsWith('class')->first() }}" @endif
+ @isset($confirm) x-on:click="toggleConfirmModal('{{ $confirm }}')" @endisset
+ @isset($confirmAction) @confirm.window="$wire.{{ $confirmAction }}()" @endisset>
+ {{ $slot }}
+</button>
diff --git a/resources/views/components/form-input.blade.php b/resources/views/components/inputs/input.blade.php
similarity index 85%
rename from resources/views/components/form-input.blade.php
rename to resources/views/components/inputs/input.blade.php
index c09365694e..f899cb64ed 100644
--- a/resources/views/components/form-input.blade.php
+++ b/resources/views/components/inputs/input.blade.php
@@ -1,3 +1,15 @@
+@props([
+ 'id' => null,
+ 'required' => false,
+ 'readonly' => false,
+ 'label' => null,
+ 'type' => 'text',
+ 'class' => '',
+ 'instantSave' => false,
+ 'disabled' => false,
+ 'hidden' => false,
+])
+
@if ($type === 'checkbox')
<label for={{ $id }}>
@if ($label)
diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.php
index 451f3097a1..3d5ce67a15 100644
--- a/resources/views/components/navbar.blade.php
+++ b/resources/views/components/navbar.blade.php
@@ -11,7 +11,7 @@
@endif
<form action="/logout" method="POST">
@csrf
- <button type="submit">Logout</button>
+ <x-inputs.button type="submit">Logout</x-inputs.button>
</form>
<livewire:check-update />
<livewire:force-upgrade />
diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php
index c13cfd80a9..7c3f11332c 100644
--- a/resources/views/dashboard.blade.php
+++ b/resources/views/dashboard.blade.php
@@ -1,23 +1,31 @@
<x-layout>
- <h1>Projects <a href="{{ route('project.new') }}"><button>New</button></a></h1>
+ <h1>Projects <a href="{{ route('project.new') }}">
+ <x-inputs.button>New</x-inputs.button>
+ </a></h1>
@forelse ($projects as $project)
<a href="{{ route('project.environments', [$project->uuid]) }}">{{ data_get($project, 'name') }}</a>
@empty
<p>No projects found.</p>
@endforelse
- <h1>Servers <a href="{{ route('server.new') }}"><button>New</button></a></h1>
+ <h1>Servers <a href="{{ route('server.new') }}">
+ <x-inputs.button>New</x-inputs.button>
+ </a></h1>
@forelse ($servers as $server)
<a href="{{ route('server.show', [$server->uuid]) }}">{{ data_get($server, 'name') }}</a>
@empty
<p>No servers found.</p>
@endforelse
- <h1>Destinations <a href="{{ route('destination.new') }}"><button>New</button></a></h1>
+ <h1>Destinations <a href="{{ route('destination.new') }}">
+ <x-inputs.button>New</x-inputs.button>
+ </a></h1>
@forelse ($destinations as $destination)
<a href="{{ route('destination.show', [$destination->uuid]) }}">{{ data_get($destination, 'name') }}</a>
@empty
<p>No destinations found.</p>
@endforelse
- <h1>Private Keys <a href="{{ route('private-key.new') }}"><button>New</button></a></h1>
+ <h1>Private Keys <a href="{{ route('private-key.new') }}">
+ <x-inputs.button>New</x-inputs.button>
+ </a></h1>
@forelse ($private_keys as $private_key)
<a href="{{ route('private-key.show', [$private_key->uuid]) }}">{{ data_get($private_key, 'name') }}</a>
@empty
diff --git a/resources/views/livewire/check-update.blade.php b/resources/views/livewire/check-update.blade.php
index 165f987976..577b4e9310 100644
--- a/resources/views/livewire/check-update.blade.php
+++ b/resources/views/livewire/check-update.blade.php
@@ -1,6 +1,5 @@
<div>
- <button wire:loading.class="text-black bg-green-500" wire:loading.attr="disabled" wire:click='checkUpdate'>Check for
- updates</button>
+ <x-inputs.button wire:click='checkUpdate' type="submit">Check for updates</x-inputs.button>
@if ($updateAvailable)
Update available
@endif
diff --git a/resources/views/livewire/destination/new/standalone-docker.blade.php b/resources/views/livewire/destination/new/standalone-docker.blade.php
index 28b0b5f45f..2c8cee3c41 100644
--- a/resources/views/livewire/destination/new/standalone-docker.blade.php
+++ b/resources/views/livewire/destination/new/standalone-docker.blade.php
@@ -1,15 +1,21 @@
<div>
<form class="flex flex-col" wire:submit.prevent='submit'>
- <x-form-input id="name" label="Name" required />
- <x-form-input id="network" label="Network" required />
- <x-form-input id="server_id" label="Server ID" required />
+ <x-inputs.input id="name" label="Name" required />
+ <x-inputs.input id="network" label="Network" required />
+ <x-inputs.input id="server_id" label="Server ID" required />
@foreach ($servers as $key)
- <button @if ($server_id == $key->id) class="bg-green-500" @endif
- wire:click.prevent="setServerId('{{ $key->id }}')">{{ $key->name }}</button>
+ @if ($server_id == $key->id)
+ <x-inputs.button class="bg-green-500" wire:click.prevent="setServerId('{{ $key->id }}')">
+ {{ $key->name }}
+ </x-inputs.button>
+ @else
+ <x-inputs.button wire:click.prevent="setServerId('{{ $key->id }}')">{{ $key->name }}
+ </x-inputs.button>
+ @endif
@endforeach
- <button class="mt-4" type="submit">
+ <x-inputs.button class="mt-4" type="submit">
Submit
- </button>
+ </x-inputs.button>
</form>
</div>
diff --git a/resources/views/livewire/force-upgrade.blade.php b/resources/views/livewire/force-upgrade.blade.php
index 7e4f53cd49..bcf75191a4 100644
--- a/resources/views/livewire/force-upgrade.blade.php
+++ b/resources/views/livewire/force-upgrade.blade.php
@@ -1,6 +1,5 @@
<div>
@if (auth()->user()->teams->contains(0))
- <button wire:loading.class="text-black bg-green-500" wire:loading.attr="disabled" wire:click='upgrade'>Force
- Upgrade</button>
+ <x-inputs.button wire:click='upgrade'>Force Upgrade</x-inputs.button>
@endif
</div>
diff --git a/resources/views/livewire/private-key/change.blade.php b/resources/views/livewire/private-key/change.blade.php
index 9513c6c85a..fa2165b107 100644
--- a/resources/views/livewire/private-key/change.blade.php
+++ b/resources/views/livewire/private-key/change.blade.php
@@ -1,14 +1,14 @@
<div>
<form class="flex flex-col gap-2 w-96" wire:submit.prevent='changePrivateKey'>
- <x-form-input id="private_key_name" label="Name" required />
- <x-form-input id="private_key_description" label="Longer Description" />
- <x-form-input type="textarea" id="private_key_value" label="Private Key" required />
- <button type="submit">
+ <x-inputs.input id="private_key_name" label="Name" required />
+ <x-inputs.input id="private_key_description" label="Longer Description" />
+ <x-inputs.input type="textarea" id="private_key_value" label="Private Key" required />
+ <x-inputs.button type="submit">
Submit
- </button>
- <button class="bg-red-500" @confirm.window="$wire.delete('{{ $private_key_uuid }}')"
- x-on:click="toggleConfirmModal('Are you sure you would like to delete this application?')">
+ </x-inputs.button>
+ <x-inputs.button class="bg-red-500" confirm='Are you sure you would like to delete this private key?'
+ confirmAction="delete('{{ $private_key_uuid }}')">
Delete
- </button>
+ </x-inputs.button>
</form>
</div>
diff --git a/resources/views/livewire/private-key/create.blade.php b/resources/views/livewire/private-key/create.blade.php
index 040ecf975e..927ca7ef5c 100644
--- a/resources/views/livewire/private-key/create.blade.php
+++ b/resources/views/livewire/private-key/create.blade.php
@@ -1,10 +1,10 @@
<div>
<form class="flex flex-col gap-2 w-96" wire:submit.prevent='createPrivateKey'>
- <x-form-input id="private_key_name" label="Name" required />
- <x-form-input id="private_key_description" label="Longer Description" />
- <x-form-input type="textarea" id="private_key_value" label="Private Key" required />
- <button type="submit">
+ <x-inputs.input id="private_key_name" label="Name" required />
+ <x-inputs.input id="private_key_description" label="Longer Description" />
+ <x-inputs.input type="textarea" id="private_key_value" label="Private Key" required />
+ <x-inputs.button type="submit">
Submit
- </button>
+ </x-inputs.button>
</form>
</div>
diff --git a/resources/views/livewire/project/application/deploy.blade.php b/resources/views/livewire/project/application/deploy.blade.php
index 8237c0ce7f..19a15d9acd 100644
--- a/resources/views/livewire/project/application/deploy.blade.php
+++ b/resources/views/livewire/project/application/deploy.blade.php
@@ -1,15 +1,16 @@
<div>
- <button class="bg-red-500" @confirm.window="$wire.delete()"
- x-on:click="toggleConfirmModal('Are you sure you would like to delete this application?')">
- Delete</button>
+
@if ($application->status === 'running')
- <button wire:click='start'>Restart</button>
- <button wire:click='forceRebuild'>Force Rebuild</button>
+ <x-inputs.button wire:click='start'>Restart</x-inputs.button>
+ <x-inputs.button wire:click='forceRebuild'>Force Rebuild</x-inputs.button>
+ <x-inputs.button wire:click='stop'>Stop</x-inputs.button>
@else
- <button wire:click='start'>Start</button>
- <button wire:click='forceRebuild'>Start (no cache)</button>
+ <x-inputs.button wire:click='start'>Start</x-inputs.button>
+ <x-inputs.button wire:click='forceRebuild'>Start (no cache)</x-inputs.button>
@endif
- <button wire:click='stop'>Stop</button>
+ <x-inputs.button class="bg-red-500" confirmAction="delete"
+ confirm='Are you sure you would like to delete this application?'>
+ Delete</x-inputs.button>
<span wire:poll.5000ms='pollingStatus'>
@if ($application->status === 'running')
@if (data_get($application, 'fqdn'))
diff --git a/resources/views/livewire/project/application/general.blade.php b/resources/views/livewire/project/application/general.blade.php
index 4e3cf0bdd2..36186c3fdf 100644
--- a/resources/views/livewire/project/application/general.blade.php
+++ b/resources/views/livewire/project/application/general.blade.php
@@ -2,51 +2,51 @@
<form wire:submit.prevent='submit' class="flex flex-col">
<div class="flex flex-col gap-2 xl:flex-row">
<div class="flex flex-col w-96">
- <x-form-input id="application.name" label="Name" required />
- <x-form-input id="application.fqdn" label="FQDN" />
+ <x-inputs.input id="application.name" label="Name" required />
+ <x-inputs.input id="application.fqdn" label="FQDN" />
</div>
<div class="flex flex-col w-96">
- <x-form-input id="application.install_command" label="Install Command" />
- <x-form-input id="application.build_command" label="Build Command" />
- <x-form-input id="application.start_command" label="Start Command" />
- <x-form-input id="application.build_pack" label="Build Pack" />
+ <x-inputs.input id="application.install_command" label="Install Command" />
+ <x-inputs.input id="application.build_command" label="Build Command" />
+ <x-inputs.input id="application.start_command" label="Start Command" />
+ <x-inputs.input id="application.build_pack" label="Build Pack" />
@if ($application->settings->is_static)
- <x-form-input id="application.static_image" label="Static Image" required />
+ <x-inputs.input id="application.static_image" label="Static Image" required />
@endif
</div>
<div class="flex flex-col w-96">
- <x-form-input id="application.base_directory" label="Base Directory" />
+ <x-inputs.input id="application.base_directory" label="Base Directory" />
@if ($application->settings->is_static)
- <x-form-input id="application.publish_directory" label="Publish Directory" required />
+ <x-inputs.input id="application.publish_directory" label="Publish Directory" required />
@else
- <x-form-input id="application.publish_directory" label="Publish Directory" />
+ <x-inputs.input id="application.publish_directory" label="Publish Directory" />
@endif
</div>
<div class="flex flex-col w-96">
@if ($application->settings->is_static)
- <x-form-input id="application.ports_exposes" label="Ports Exposes" disabled />
+ <x-inputs.input id="application.ports_exposes" label="Ports Exposes" disabled />
@else
- <x-form-input id="application.ports_exposes" label="Ports Exposes" required />
+ <x-inputs.input id="application.ports_exposes" label="Ports Exposes" required />
@endif
- <x-form-input id="application.ports_mappings" label="Ports Mappings" />
+ <x-inputs.input id="application.ports_mappings" label="Ports Mappings" />
</div>
</div>
- <button class="flex mx-auto mt-4" type="submit">
+ <x-inputs.button class="flex mx-auto mt-4" type="submit">
Submit
- </button>
+ </x-inputs.button>
</form>
<div class="flex flex-col pt-4 text-right w-52">
- <x-form-input instantSave type="checkbox" id="is_static" label="Static website?" />
- <x-form-input instantSave type="checkbox" id="is_auto_deploy" label="Auto Deploy?" />
- <x-form-input instantSave type="checkbox" id="is_dual_cert" label="Dual Certs?" />
- <x-form-input instantSave type="checkbox" id="is_previews" label="Previews?" />
- <x-form-input instantSave type="checkbox" id="is_custom_ssl" label="Is Custom SSL?" />
- <x-form-input instantSave type="checkbox" id="is_http2" label="Is Http2?" />
- <x-form-input instantSave type="checkbox" id="is_git_submodules_allowed" label="Git Submodules Allowed?" />
- <x-form-input instantSave type="checkbox" id="is_git_lfs_allowed" label="Git LFS Allowed?" />
- <x-form-input instantSave type="checkbox" id="is_debug" label="Debug" />
+ <x-inputs.input instantSave type="checkbox" id="is_static" label="Static website?" />
+ <x-inputs.input instantSave type="checkbox" id="is_auto_deploy" label="Auto Deploy?" />
+ <x-inputs.input instantSave type="checkbox" id="is_dual_cert" label="Dual Certs?" />
+ <x-inputs.input instantSave type="checkbox" id="is_previews" label="Previews?" />
+ <x-inputs.input instantSave type="checkbox" id="is_custom_ssl" label="Is Custom SSL?" />
+ <x-inputs.input instantSave type="checkbox" id="is_http2" label="Is Http2?" />
+ <x-inputs.input instantSave type="checkbox" id="is_git_submodules_allowed" label="Git Submodules Allowed?" />
+ <x-inputs.input instantSave type="checkbox" id="is_git_lfs_allowed" label="Git LFS Allowed?" />
+ <x-inputs.input instantSave type="checkbox" id="is_debug" label="Debug" />
</div>
</div>
diff --git a/resources/views/livewire/project/application/source.blade.php b/resources/views/livewire/project/application/source.blade.php
index aa4404ec64..0de4f21c03 100644
--- a/resources/views/livewire/project/application/source.blade.php
+++ b/resources/views/livewire/project/application/source.blade.php
@@ -1,9 +1,9 @@
<div>
- <p>Source Name: {{ data_get($application,'source.name') }}</p>
- <p>Is Public Source: {{ data_get($application,'source.is_public') }}</p>
+ <p>Source Name: {{ data_get($application, 'source.name') }}</p>
+ <p>Is Public Source: {{ data_get($application, 'source.is_public') }}</p>
<div class="flex flex-col w-96">
- <x-form-input id="application.git_repository" label="Git Repository" readonly />
- <x-form-input id="application.git_branch" label="Git Branch" readonly />
- <x-form-input id="application.git_commit_sha" label="Git Commit SHA" readonly />
+ <x-inputs.input id="application.git_repository" label="Git Repository" readonly />
+ <x-inputs.input id="application.git_branch" label="Git Branch" readonly />
+ <x-inputs.input id="application.git_commit_sha" label="Git Commit SHA" readonly />
</div>
</div>
diff --git a/resources/views/livewire/project/new/empty-project.blade.php b/resources/views/livewire/project/new/empty-project.blade.php
index 160b19b5b3..4ad42518d6 100644
--- a/resources/views/livewire/project/new/empty-project.blade.php
+++ b/resources/views/livewire/project/new/empty-project.blade.php
@@ -1 +1 @@
-<button wire:click='createEmptyProject'>Empty Project</button>
+<x-inputs.button wire:click='createEmptyProject'>Empty Project</x-inputs.button>
diff --git a/resources/views/livewire/project/new/public-git-repository.blade.php b/resources/views/livewire/project/new/public-git-repository.blade.php
index f2bffc93d9..ae36b76de6 100644
--- a/resources/views/livewire/project/new/public-git-repository.blade.php
+++ b/resources/views/livewire/project/new/public-git-repository.blade.php
@@ -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
diff --git a/resources/views/livewire/run-command.blade.php b/resources/views/livewire/run-command.blade.php
index 3953f2fa48..81473dd405 100755
--- a/resources/views/livewire/run-command.blade.php
+++ b/resources/views/livewire/run-command.blade.php
@@ -1,16 +1,16 @@
<div>
<div>
<label for="command">
- <input autofocus id="command" wire:model.defer="command" type="text" wire:keydown.enter="runCommand"/>
+ <input autofocus id="command" wire:model.defer="command" type="text" wire:keydown.enter="runCommand" />
<select wire:model.defer="server">
@foreach ($servers as $server)
<option value="{{ $server->uuid }}">{{ $server->name }}</option>
@endforeach
</select>
</label>
- <button wire:click="runCommand">Run command</button>
- <button wire:click="runSleepingBeauty">Run sleeping beauty</button>
- <button wire:click="runDummyProjectBuild">Build DummyProject</button>
+ <x-inputs.button wire:click="runCommand">Run command</x-inputs.button>
+ <x-inputs.button wire:click="runSleepingBeauty">Run sleeping beauty</x-inputs.button>
+ <x-inputs.button wire:click="runDummyProjectBuild">Build DummyProject</x-inputs.button>
</div>
<div>
@@ -21,9 +21,6 @@
@endif
</div>
@isset($activity?->id)
- <pre
- style="width: 100%;overflow-y: scroll;"
- @if ($isKeepAliveOn) wire:poll.750ms="polling" @endif
- >{{ \App\Actions\CoolifyTask\RunRemoteProcess::decodeOutput($activity) }}</pre>
+ <pre style="width: 100%;overflow-y: scroll;" @if ($isKeepAliveOn) wire:poll.750ms="polling" @endif>{{ \App\Actions\CoolifyTask\RunRemoteProcess::decodeOutput($activity) }}</pre>
@endisset
</div>
diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.php
index 12cf4856e8..691349d37f 100644
--- a/resources/views/livewire/server/form.blade.php
+++ b/resources/views/livewire/server/form.blade.php
@@ -2,31 +2,27 @@
<form wire:submit.prevent='submit' class="flex flex-col">
<div class="flex flex-col gap-2 xl:flex-row">
<div class="flex flex-col w-96">
- <x-form-input id="server.name" label="Name" required />
- <x-form-input id="server.description" label="Description" />
+ <x-inputs.input id="server.name" label="Name" required />
+ <x-inputs.input id="server.description" label="Description" />
</div>
<div class="flex flex-col w-96">
@if ($server->id === 0)
- <x-form-input id="server.ip" label="IP Address" readonly />
- <x-form-input id="server.user" label="User" readonly />
- <x-form-input type="number" id="server.port" label="Port" readonly />
+ <x-inputs.input id="server.ip" label="IP Address" readonly />
+ <x-inputs.input id="server.user" label="User" readonly />
+ <x-inputs.input type="number" id="server.port" label="Port" readonly />
@else
- <x-form-input id="server.ip" label="IP Address" required readonly />
- <x-form-input id="server.user" label="User" required />
- <x-form-input type="number" id="server.port" label="Port" required />
+ <x-inputs.input id="server.ip" label="IP Address" required readonly />
+ <x-inputs.input id="server.user" label="User" required />
+ <x-inputs.input type="number" id="server.port" label="Port" required />
@endif
</div>
</div>
<div>
- <button class="w-16 mt-4" type="submit">
- Submit
- </button>
- <button wire:loading.class="text-black bg-green-500" wire:loading.attr="disabled"
- wire:click.prevent='checkServer'>Check Server</button>
- <button class="bg-red-500" @confirm.window="$wire.delete()"
- x-on:click="toggleConfirmModal('Are you sure you would like to delete this application?')">
- Delete</button>
- {{-- <button wire:click.prevent='installDocker'>Install Docker</button> --}}
+ <x-inputs.button type="submit">Submit</x-inputs.button>
+ <x-inputs.button wire:click.prevent='checkServer'>Check Server</x-inputs.button>
+ <x-inputs.button class="bg-red-500" confirm="Are you sure you would like to delete this application?"
+ confirmAction="delete">Delete
+ </x-inputs.button>
</div>
</form>
@isset($uptime)
diff --git a/resources/views/livewire/server/new/by-ip.blade.php b/resources/views/livewire/server/new/by-ip.blade.php
index 9f6827fdbe..bde0a8bcf8 100644
--- a/resources/views/livewire/server/new/by-ip.blade.php
+++ b/resources/views/livewire/server/new/by-ip.blade.php
@@ -1,21 +1,26 @@
<div>
<form class="flex flex-col" wire:submit.prevent='submit'>
- <x-form-input id="name" label="Name" required />
- <x-form-input id="description" label="Description" />
- <x-form-input id="ip" label="IP Address" required />
- <x-form-input id="user" label="User" />
- <x-form-input type="number" id="port" label="Port" />
- <x-form-input id="private_key_id" label="Private Key" required hidden />
- <button class="mt-4" type="submit">
+ <x-inputs.input id="name" label="Name" required />
+ <x-inputs.input id="description" label="Description" />
+ <x-inputs.input id="ip" label="IP Address" required />
+ <x-inputs.input id="user" label="User" />
+ <x-inputs.input type="number" id="port" label="Port" />
+ <x-inputs.input id="private_key_id" label="Private Key" required hidden />
+ <x-inputs.button class="mt-4" type="submit">
Submit
- </button>
+ </x-inputs.button>
</form>
<div class="flex gap-4">
<div>
<h1>Select a private key</h1>
@foreach ($private_keys as $key)
- <button @if ($private_key_id == $key->id) class="bg-green-500" @endif
- wire:click.defer="setPrivateKey('{{ $key->id }}')">{{ $key->name }}</button>
+ @if ($private_key_id == $key->id)
+ <x-inputs.button class="bg-blue-500" wire:click.defer="setPrivateKey('{{ $key->id }}')">
+ {{ $key->name }}</x-inputs.button>
+ @else
+ <x-inputs.button wire:click.defer="setPrivateKey('{{ $key->id }}')">{{ $key->name }}
+ </x-inputs.button>
+ @endif
@endforeach
</div>
<div>
diff --git a/resources/views/livewire/server/private-key.blade.php b/resources/views/livewire/server/private-key.blade.php
index ab5b30036e..473b3054f0 100644
--- a/resources/views/livewire/server/private-key.blade.php
+++ b/resources/views/livewire/server/private-key.blade.php
@@ -1,6 +1,6 @@
<div>
@forelse ($private_keys as $private_key)
- <button wire:click='setPrivateKey({{ $private_key->id }})'>{{ $private_key->name }}</button>
+ <x-inputs.button wire:click='setPrivateKey({{ $private_key->id }})'>{{ $private_key->name }}</x-inputs.button>
@empty
<p>No private keys found</p>
@endforelse
diff --git a/resources/views/livewire/settings/form.blade.php b/resources/views/livewire/settings/form.blade.php
index cc9313f50d..fd8fd04434 100644
--- a/resources/views/livewire/settings/form.blade.php
+++ b/resources/views/livewire/settings/form.blade.php
@@ -2,22 +2,22 @@
<form wire:submit.prevent='submit' class="flex flex-col">
<div class="flex flex-col gap-2 xl:flex-row">
<div class="flex flex-col w-96">
- <x-form-input id="settings.fqdn" label="FQDN" />
- <x-form-input id="settings.wildcard_domain" label="Wildcard Domain" />
+ <x-inputs.input id="settings.fqdn" label="FQDN" />
+ <x-inputs.input id="settings.wildcard_domain" label="Wildcard Domain" />
</div>
<div class="flex flex-col w-96">
- <x-form-input type="number" id="settings.public_port_min" label="Public Port Min" />
- <x-form-input type="number" id="settings.public_port_max" label="Public Port Max" />
+ <x-inputs.input type="number" id="settings.public_port_min" label="Public Port Min" />
+ <x-inputs.input type="number" id="settings.public_port_max" label="Public Port Max" />
</div>
</div>
- <button class="w-16 mt-4" type="submit">
+ <x-inputs.button class="w-16 mt-4" type="submit">
Submit
- </button>
+ </x-inputs.button>
</form>
<div class="flex flex-col pt-4 text-right w-52">
- <x-form-input instantSave type="checkbox" id="do_not_track" label="Do Not Track" />
- <x-form-input instantSave type="checkbox" id="is_auto_update_enabled" label="Auto Update?" />
- <x-form-input instantSave type="checkbox" id="is_registration_enabled" label="Registration Enabled?" />
- <x-form-input instantSave type="checkbox" id="is_https_forced" label="Force https?" />
+ <x-inputs.input instantSave type="checkbox" id="do_not_track" label="Do Not Track" />
+ <x-inputs.input instantSave type="checkbox" id="is_auto_update_enabled" label="Auto Update?" />
+ <x-inputs.input instantSave type="checkbox" id="is_registration_enabled" label="Registration Enabled?" />
+ <x-inputs.input instantSave type="checkbox" id="is_https_forced" label="Force https?" />
</div>
</div>
diff --git a/resources/views/livewire/switch-team.blade.php b/resources/views/livewire/switch-team.blade.php
index ee0055fdb1..09319185ec 100644
--- a/resources/views/livewire/switch-team.blade.php
+++ b/resources/views/livewire/switch-team.blade.php
@@ -1,6 +1,6 @@
<div>
@foreach (auth()->user()->otherTeams() as $team)
- <button wire:key="{{ $team->id }}" wire:click="switch_to('{{ $team->id }}')">Switch to:
- {{ $team->name }}</button>
+ <x-inputs.button wire:key="{{ $team->id }}" wire:click="switch_to('{{ $team->id }}')">Switch to:
+ {{ $team->name }}</x-inputs.button>
@endforeach
</div>
diff --git a/resources/views/private-key/new.blade.php b/resources/views/private-key/new.blade.php
index 631789b861..fca0c042b8 100644
--- a/resources/views/private-key/new.blade.php
+++ b/resources/views/private-key/new.blade.php
@@ -1,4 +1,4 @@
<x-layout>
<h1>New Private Key</h1>
- <livewire:private-key.new.key />
+ <livewire:private-key.create />
</x-layout>
diff --git a/resources/views/project/new.blade.php b/resources/views/project/new.blade.php
index 346e6710be..c490cab069 100644
--- a/resources/views/project/new.blade.php
+++ b/resources/views/project/new.blade.php
@@ -6,8 +6,9 @@
@endif
<div x-data="{ activeTab: 'choose' }">
<div class="flex flex-col w-64 gap-2 mb-10">
- <button @click.prevent="activeTab = 'public-repo'">Public Repository</button>
- <button @click.prevent="activeTab = 'github-private-repo'">Private Repository (GitHub App)</button>
+ <x-inputs.button @click.prevent="activeTab = 'public-repo'">Public Repository</x-inputs.button>
+ <x-inputs.button @click.prevent="activeTab = 'github-private-repo'">Private Repository (GitHub App)
+ </x-inputs.button>
@if ($type === 'project')
<livewire:project.new.empty-project />
@endif
diff --git a/resources/views/project/resources.blade.php b/resources/views/project/resources.blade.php
index d197cd3d8e..113e78dc50 100644
--- a/resources/views/project/resources.blade.php
+++ b/resources/views/project/resources.blade.php
@@ -1,5 +1,7 @@
<x-layout>
- <h1>Resources <a href="{{ route('project.resources.new', Route::current()->parameters()) }}"><button>New</button></a>
+ <h1>Resources <a href="{{ route('project.resources.new', Route::current()->parameters()) }}">
+ <x-inputs.button>New</x-inputs.button>
+ </a>
</h1>
<div>
@foreach ($environment->applications as $application)
diff --git a/resources/views/server/show.blade.php b/resources/views/server/show.blade.php
index 757bf32bb1..4a9646f853 100644
--- a/resources/views/server/show.blade.php
+++ b/resources/views/server/show.blade.php
@@ -1,11 +1,14 @@
<x-layout>
<h1>Server</h1>
<livewire:server.form :server_id="$server->id" />
- <h2>Private Key <a
- href="{{ route('server.private-key', ['server_uuid' => $server->uuid]) }}"><button>Change</button></a>
+ <h2>Private Key <a href="{{ route('server.private-key', ['server_uuid' => $server->uuid]) }}">
+ <x-inputs.button>Change</x-inputs.button>
+ </a>
</h2>
<p>{{ $server->privateKey->name }}</p>
- <h2>Destinations <a href="{{ route('destination.new', ['server_id' => $server->id]) }}"><button>New</button></a></h2>
+ <h2>Destinations <a href="{{ route('destination.new', ['server_id' => $server->id]) }}">
+ <x-inputs.button>New</x-inputs.button>
+ </a></h2>
@if ($server->standaloneDockers)
@foreach ($server->standaloneDockers as $docker)
<p>Network: {{ data_get($docker, 'network') }}</p>