Only set name if it is actually set in the settings

This commit is contained in:
Thijmen Stavenuiter 2024-06-24 09:16:47 +00:00
parent c897aaafa7
commit ab3b72bd1f

View File

@ -18,12 +18,16 @@
@use('App\Models\InstanceSettings')
@php
$instanceSettings = InstanceSettings::first();
$name = null;
$instanceSettings = InstanceSettings::first();
$name = null;
if($instanceSettings) {
if($instanceSettings) {
$displayName = $instanceSettings->getTitleDisplayName();
if(strlen($displayName) > 0) {
$name = $instanceSettings->getTitleDisplayName() . ' ';
}
}
@endphp
<title>{{ $name }}{{ $title ?? 'Coolify' }}</title>
@env('local')