feat(ui): show the logo and name on the resource creation screen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai
2026-11-06 15:23:07 +01:00
co-authored by Claude Opus 5.5
parent abea0747ed
commit 973cd8684a
2 changed files with 32 additions and 2 deletions
+22 -1
View File
@@ -177,6 +177,27 @@ class Create extends Component
public function render()
{
return view('livewire.project.resource.create');
return view('livewire.project.resource.create', $this->pendingResource());
}
/**
* @return array{pendingName: ?string, pendingLogo: ?string}
*/
private function pendingResource(): array
{
if (! $this->pendingType) {
return ['pendingName' => null, 'pendingLogo' => null];
}
$type = str($this->pendingType);
if (in_array($type->value(), DATABASE_TYPES, true)) {
return ['pendingName' => $type->headline()->value(), 'pendingLogo' => null];
}
$services = get_service_templates();
$key = resolve_service_template_key($type->after('one-click-service-')->value(), $services);
return [
'pendingName' => str($key)->headline()->value(),
'pendingLogo' => service_logo_urls(data_get($services, "$key.logo"))['logo'],
];
}
}
@@ -3,7 +3,16 @@
{{ data_get_str($project, 'name')->limit(10) }} > New | Coolify
</x-slot>
@if ($pendingType)
<div wire:init="createResource">Creating resource...</div>
<div wire:init="createResource" class="mx-auto flex max-w-md flex-col items-center pt-24 text-center">
@if ($pendingLogo)
<img src="{{ $pendingLogo }}" alt="" class="mb-4 size-10 object-contain" />
@else
<x-reicon name="database" class="mb-4 size-8 text-neutral-400 dark:text-fg-faint" />
@endif
<h2 class="empty-state-title">Creating {{ $pendingName }}</h2>
<p class="empty-state-description text-[13px]">Setting up the resource. You will be redirected when it is ready.</p>
<x-loading text="Creating..." class="mt-4" />
</div>
@elseif ($type === 'public')
<livewire:project.new.public-git-repository :type="$type" />
@elseif ($type === 'private-gh-app')