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.

wip

Andras Bacsaic295a3e90b62
diff --git a/app/Http/Livewire/Project/New/PublicGitRepository.php b/app/Http/Livewire/Project/New/PublicGitRepository.php
index b676b463cf..0f00ccf385 100644
--- a/app/Http/Livewire/Project/New/PublicGitRepository.php
+++ b/app/Http/Livewire/Project/New/PublicGitRepository.php
@@ -43,7 +43,11 @@ class PublicGitRepository extends Component
$this->port = 3000;
}
$this->parameters = Route::current()->parameters();
- $this->servers = session('currentTeam')->load(['servers'])->servers;
+ $this->servers = session('currentTeam')->load(['servers'])->servers->reject(function ($server) {
+ if ($server->standaloneDockers->count() === 0 && $server->swarmDockers->count() === 0) {
+ return true;
+ }
+ });
}
public function chooseServer($server_id)
{
diff --git a/app/View/Components/FormInput.php b/app/View/Components/FormInput.php
index efe511b6aa..6030c26811 100644
--- a/app/View/Components/FormInput.php
+++ b/app/View/Components/FormInput.php
@@ -17,6 +17,7 @@ class FormInput extends Component
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
diff --git a/resources/views/components/form-input.blade.php b/resources/views/components/form-input.blade.php
index d4dd79631c..c09365694e 100644
--- a/resources/views/components/form-input.blade.php
+++ b/resources/views/components/form-input.blade.php
@@ -26,12 +26,13 @@
@endif
</label>
@if ($type === 'textarea')
- <textarea type={{ $type }} id={{ $id }} wire:model.defer={{ $id }}
- @if ($required) required @endif @if ($disabled) disabled @endif
- @if ($readonly) readOnly disabled @endif></textarea>
+ <textarea class={{ $class }} type={{ $type }} id={{ $id }}
+ wire:model.defer={{ $id }} @if ($required) required @endif
+ @if ($disabled) disabled @endif @if ($readonly) readOnly disabled @endif></textarea>
@else
- <input type={{ $type }} id={{ $id }} wire:model.defer={{ $id }}
- @if ($required) required @endif @if ($disabled) disabled @endif
+ <input class={{ $class }} type={{ $type }} id={{ $id }}
+ wire:model.defer={{ $id }} @if ($required) required @endif
+ @if ($disabled) disabled @endif
@if ($readonly) readOnly disabled @endif />
@endif
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 b406977274..b1da74fe8b 100644
--- a/resources/views/livewire/project/new/public-git-repository.blade.php
+++ b/resources/views/livewire/project/new/public-git-repository.blade.php
@@ -1,11 +1,17 @@
<div>
+ @if ($servers->count() > 0)
+ <h1>Choose a server</h1>
+ @endif
@forelse ($servers as $server)
<button @if ($chosenServer == $server->id) class="bg-blue-500" @endif
wire:click="chooseServer({{ $server->id }})">{{ $server->name }}</button>
@empty
- No servers
+ No servers found.
+ <p>Did you forget to add a destination on the server?</p>
@endforelse
+
@isset($chosenServer)
+ <h1>Choose a destination</h1>
<div>
@foreach ($standalone_docker as $standalone)
<button @if ($chosenDestination?->uuid == $standalone->uuid) class="bg-blue-500" @endif
@@ -19,8 +25,9 @@
@endisset
@isset($chosenDestination)
- <form wire:submit.prevent='submit'>
- <x-form-input id="public_repository_url" label="Repository URL" />
+ <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?" />
@if ($is_static)
<x-form-input id="publish_directory" label="Publish Directory" />
diff --git a/resources/views/project/new.blade.php b/resources/views/project/new.blade.php
index b39e6bf04c..346e6710be 100644
--- a/resources/views/project/new.blade.php
+++ b/resources/views/project/new.blade.php
@@ -19,8 +19,5 @@
<div x-cloak x-show="activeTab === 'github-private-repo'">
github-private-repo
</div>
- <div x-cloak x-show="activeTab === 'choose'">
- Choose any option
- </div>
</div>
</x-layout>