Skip to content

Commit

Permalink
Use placeholder and not the Coolify logo if no logo is provided.
Browse files Browse the repository at this point in the history
  • Loading branch information
peaklabs-dev committed Nov 25, 2024
1 parent 852db51 commit 33435a1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Console/Commands/ServicesGenerate.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private function processFile(string $file): false|array
'slogan' => $data->get('slogan', str($file)->headline()),
'compose' => $compose,
'tags' => $tags,
'logo' => $data->get('logo', 'svgs/coolify.png'),
'logo' => $data->get('logo', 'svgs/default.webp'),
'minversion' => $data->get('minversion', '0.0.0'),
];

Expand Down
8 changes: 6 additions & 2 deletions app/Livewire/Project/New/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,16 @@ public function loadServices()
{
$services = get_service_templates(true);
$services = collect($services)->map(function ($service, $key) {
$logo = data_get($service, 'logo', 'svgs/coolify.png');
$default_logo = 'images/default.webp';
$logo = data_get($service, 'logo', $default_logo);
$local_logo_path = public_path($logo);

return [
'name' => str($key)->headline(),
'logo' => asset($logo),
'logo_github_url' => 'https://raw.githubusercontent.com/coollabsio/coolify/refs/heads/main/public/a'.$logo,
'logo_github_url' => file_exists($local_logo_path)
? 'https://raw.githubusercontent.com/coollabsio/coolify/refs/heads/main/public/'.$logo
: asset($default_logo),
] + (array) $service;
})->all();
$gitBasedApplications = [
Expand Down
Binary file added public/svgs/default.webp
Binary file not shown.

0 comments on commit 33435a1

Please sign in to comment.