mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-03-14 20:33:40 +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
|
|
@ -184,7 +184,7 @@ class GenerateDefaultImagesCommand extends Command
|
|||
};
|
||||
|
||||
// Determine device properties from DeviceModel
|
||||
$deviceVariant = $deviceModel->name ?? 'og';
|
||||
$deviceVariant = $deviceModel->css_name ?? $deviceModel->name ?? 'og';
|
||||
$colorDepth = $deviceModel->color_depth ?? '1bit'; // Use the accessor method
|
||||
$scaleLevel = $deviceModel->scale_level; // Use the accessor method
|
||||
$darkMode = $imageType === 'sleep'; // Sleep mode uses dark mode, setup uses light mode
|
||||
|
|
@ -196,6 +196,7 @@ class GenerateDefaultImagesCommand extends Command
|
|||
'deviceVariant' => $deviceVariant,
|
||||
'colorDepth' => $colorDepth,
|
||||
'scaleLevel' => $scaleLevel,
|
||||
'cssVariables' => $deviceModel->css_variables,
|
||||
])->render();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue