feat(#149): add css_name and css_variables to DeviceModel and update related views

This commit is contained in:
Benjamin Nussbaum 2026-02-17 21:10:54 +01:00
parent 89a2edfcbb
commit d884ac0a58
15 changed files with 285 additions and 26 deletions

View file

@ -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();
}
}