From 4c350bd5a3962760a662b380bc5263522f883934 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 12 Aug 2024 16:21:58 +0100 Subject: [PATCH 1/3] Remove the regular logo fallback, make image capped by height Signed-off-by: snipe --- .../views/vendor/mail/html/message.blade.php | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/resources/views/vendor/mail/html/message.blade.php b/resources/views/vendor/mail/html/message.blade.php index dc9c4ce3b2..a4de626141 100644 --- a/resources/views/vendor/mail/html/message.blade.php +++ b/resources/views/vendor/mail/html/message.blade.php @@ -14,7 +14,7 @@ @endif {{-- Show images in email! --}} - @if (($snipeSettings->show_images_in_email=='1' ) && (($snipeSettings->brand == '3') || ($snipeSettings->brand == '2'))) + @if (($snipeSettings->show_images_in_email=='1') && ($snipeSettings->email_logo!='')) {{-- $snipeSettings->brand = 1 = Text --}} {{-- $snipeSettings->brand = 2 = Logo --}} @@ -22,32 +22,27 @@ @if ($snipeSettings->brand == '3') @if ($snipeSettings->email_logo!='') - - @elseif ($snipeSettings->logo!='') - + @endif

{{ $snipeSettings->site_name }}

+ {{-- else if branding type is just logo --}} @elseif ($snipeSettings->brand == '2') @if ($snipeSettings->email_logo!='') - - - @elseif ($snipeSettings->logo!='') - + + @else + {{ $snipeSettings->site_name }} @endif @endif + @else - {{ $snipeSettings->site_name }} + {{ $snipeSettings->site_name ?? config('app.name') }} @endif -{{-- Either the $snipeSettings variable isn't set or setup is not complete --}} -@else -{{ config('app.name') }} @endif - @endcomponent @endslot From 225ab47b8e1cdf4f5accbd82a515544cf592aa00 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 12 Aug 2024 16:23:09 +0100 Subject: [PATCH 2/3] Simplified logic Signed-off-by: snipe --- resources/views/vendor/mail/html/message.blade.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/resources/views/vendor/mail/html/message.blade.php b/resources/views/vendor/mail/html/message.blade.php index a4de626141..81fa4a3c2a 100644 --- a/resources/views/vendor/mail/html/message.blade.php +++ b/resources/views/vendor/mail/html/message.blade.php @@ -21,21 +21,14 @@ {{-- $snipeSettings->brand = 3 = Logo + Text --}} @if ($snipeSettings->brand == '3') - @if ($snipeSettings->email_logo!='') - - @endif - +

{{ $snipeSettings->site_name }}

{{-- else if branding type is just logo --}} @elseif ($snipeSettings->brand == '2') - @if ($snipeSettings->email_logo!='') - - @else - {{ $snipeSettings->site_name }} - @endif + @endif @else From 3f2139349ec858ddb3b0c6bd0b935f17815cfc89 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 12 Aug 2024 16:30:21 +0100 Subject: [PATCH 3/3] Allow better fallthrough on image Signed-off-by: snipe --- resources/views/vendor/mail/html/message.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/vendor/mail/html/message.blade.php b/resources/views/vendor/mail/html/message.blade.php index 81fa4a3c2a..aa77c393c1 100644 --- a/resources/views/vendor/mail/html/message.blade.php +++ b/resources/views/vendor/mail/html/message.blade.php @@ -14,7 +14,7 @@ @endif {{-- Show images in email! --}} - @if (($snipeSettings->show_images_in_email=='1') && ($snipeSettings->email_logo!='')) + @if (($snipeSettings->show_images_in_email=='1') && ($snipeSettings->email_logo!='') && $snipeSettings->brand != '1')) {{-- $snipeSettings->brand = 1 = Text --}} {{-- $snipeSettings->brand = 2 = Logo --}}