added theme support

This commit is contained in:
Mark Gregory
2026-10-20 10:37:13 +01:00
parent 63582531e3
commit c198374d49
14 changed files with 1044 additions and 6 deletions
@@ -28,7 +28,13 @@ final class ThemeManagementController extends Controller
{
$item = $loader->find($theme);
return $views->makeForTheme($item->key(), $item->entryView(), [
abort_unless(
in_array($item->type(), ['frontend', 'backend'], true),
422,
'Only frontend and backend themes can be previewed.'
);
return view('stylist::preview', [
'themePreview' => true,
'previewTheme' => $item,
]);