mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
feat: set upscaling strategy back as default
Some checks are pending
tests / ci (push) Waiting to run
Some checks are pending
tests / ci (push) Waiting to run
This commit is contained in:
parent
85e887f8a5
commit
b7bcaf6feb
3 changed files with 16 additions and 16 deletions
|
|
@ -43,13 +43,13 @@ class ImageGenerationService
|
||||||
$browserStage = new BrowserStage($browsershotInstance);
|
$browserStage = new BrowserStage($browsershotInstance);
|
||||||
$browserStage->html($markup);
|
$browserStage->html($markup);
|
||||||
|
|
||||||
if (config('app.puppeteer_window_size_strategy') === 'v1') {
|
if (config('app.puppeteer_window_size_strategy') === 'v2') {
|
||||||
// default behaviour for Framework v1
|
|
||||||
$browserStage->useDefaultDimensions();
|
|
||||||
} else {
|
|
||||||
$browserStage
|
$browserStage
|
||||||
->width($imageSettings['width'])
|
->width($imageSettings['width'])
|
||||||
->height($imageSettings['height']);
|
->height($imageSettings['height']);
|
||||||
|
} else {
|
||||||
|
// default behaviour for Framework v1
|
||||||
|
$browserStage->useDefaultDimensions();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config('app.puppeteer_wait_for_network_idle')) {
|
if (config('app.puppeteer_wait_for_network_idle')) {
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,7 @@
|
||||||
'scaleLevel' => null,
|
'scaleLevel' => null,
|
||||||
])
|
])
|
||||||
|
|
||||||
@if(config('app.puppeteer_window_size_strategy') === 'v1')
|
@if(config('app.puppeteer_window_size_strategy') === 'v2')
|
||||||
<x-trmnl::screen colorDepth="{{$colorDepth}}">
|
|
||||||
<x-trmnl::mashup mashup-layout="{{ $mashupLayout }}">
|
|
||||||
{!! $slot !!}
|
|
||||||
</x-trmnl::mashup>
|
|
||||||
</x-trmnl::screen>
|
|
||||||
@else
|
|
||||||
<x-trmnl::screen colorDepth="{{$colorDepth}}" no-bleed="{{$noBleed}}" dark-mode="{{$darkMode}}"
|
<x-trmnl::screen colorDepth="{{$colorDepth}}" no-bleed="{{$noBleed}}" dark-mode="{{$darkMode}}"
|
||||||
device-variant="{{$deviceVariant}}" device-orientation="{{$deviceOrientation}}"
|
device-variant="{{$deviceVariant}}" device-orientation="{{$deviceOrientation}}"
|
||||||
scale-level="{{$scaleLevel}}">
|
scale-level="{{$scaleLevel}}">
|
||||||
|
|
@ -22,4 +16,10 @@
|
||||||
{!! $slot !!}
|
{!! $slot !!}
|
||||||
</x-trmnl::mashup>
|
</x-trmnl::mashup>
|
||||||
</x-trmnl::screen>
|
</x-trmnl::screen>
|
||||||
|
@else
|
||||||
|
<x-trmnl::screen colorDepth="{{$colorDepth}}">
|
||||||
|
<x-trmnl::mashup mashup-layout="{{ $mashupLayout }}">
|
||||||
|
{!! $slot !!}
|
||||||
|
</x-trmnl::mashup>
|
||||||
|
</x-trmnl::screen>
|
||||||
@endif
|
@endif
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,14 @@
|
||||||
'scaleLevel' => null,
|
'scaleLevel' => null,
|
||||||
])
|
])
|
||||||
|
|
||||||
@if(config('app.puppeteer_window_size_strategy') === 'v1')
|
@if(config('app.puppeteer_window_size_strategy') === 'v2')
|
||||||
<x-trmnl::screen colorDepth="{{$colorDepth}}">
|
|
||||||
{!! $slot !!}
|
|
||||||
</x-trmnl::screen>
|
|
||||||
@else
|
|
||||||
<x-trmnl::screen colorDepth="{{$colorDepth}}" no-bleed="{{$noBleed}}" dark-mode="{{$darkMode}}"
|
<x-trmnl::screen colorDepth="{{$colorDepth}}" no-bleed="{{$noBleed}}" dark-mode="{{$darkMode}}"
|
||||||
device-variant="{{$deviceVariant}}" device-orientation="{{$deviceOrientation}}"
|
device-variant="{{$deviceVariant}}" device-orientation="{{$deviceOrientation}}"
|
||||||
scale-level="{{$scaleLevel}}">
|
scale-level="{{$scaleLevel}}">
|
||||||
{!! $slot !!}
|
{!! $slot !!}
|
||||||
</x-trmnl::screen>
|
</x-trmnl::screen>
|
||||||
|
@else
|
||||||
|
<x-trmnl::screen colorDepth="{{$colorDepth}}">
|
||||||
|
{!! $slot !!}
|
||||||
|
</x-trmnl::screen>
|
||||||
@endif
|
@endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue