mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-03-14 12:23:33 +00:00
feat(#149): add css_name and css_variables to DeviceModel and update related views
This commit is contained in:
parent
89a2edfcbb
commit
d884ac0a58
15 changed files with 285 additions and 26 deletions
|
|
@ -514,7 +514,7 @@ class ImageGenerationService
|
|||
};
|
||||
|
||||
// Determine device properties from DeviceModel or device settings
|
||||
$deviceVariant = $device->deviceVariant();
|
||||
$deviceVariant = $device->deviceModel?->css_name ?? $device->deviceVariant();
|
||||
$deviceOrientation = $device->rotate > 0 ? 'portrait' : 'landscape';
|
||||
$colorDepth = $device->colorDepth() ?? '1bit';
|
||||
$scaleLevel = $device->scaleLevel();
|
||||
|
|
@ -528,6 +528,7 @@ class ImageGenerationService
|
|||
'deviceOrientation' => $deviceOrientation,
|
||||
'colorDepth' => $colorDepth,
|
||||
'scaleLevel' => $scaleLevel,
|
||||
'cssVariables' => $device->deviceModel?->css_variables,
|
||||
];
|
||||
|
||||
// Add plugin name for error screens
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue