added theme support

This commit is contained in:
Mark Gregory
2026-10-20 10:19:18 +01:00
parent c5f6871e8d
commit 42c074d966
56 changed files with 2671 additions and 11 deletions
@@ -61,6 +61,9 @@ final class ThemePackageManager
public function uninstall(Theme $theme): void
{
if (in_array($theme->key(), ['sonardesk', 'sonardesk-admin'], true)) {
throw new RuntimeException('Bundled SonarDesk themes cannot be uninstalled.');
}
$active = $theme->type() === 'frontend'
? $this->settings->get('frontend_theme', config('stylist.default_frontend_theme'), 'site')
: $this->settings->get('backend_theme', config('stylist.default_backend_theme'), 'site');