feat: set preferred_renderer when installing from catalog

This commit is contained in:
Benjamin Nussbaum 2025-11-04 22:53:47 +01:00
parent aa80e944f9
commit cf7ea6cd3c
3 changed files with 14 additions and 4 deletions

View file

@ -91,11 +91,16 @@ new class extends Component {
try {
$zipUrl = "https://usetrmnl.com/api/plugin_settings/{$recipeId}/archive";
$plugin = $pluginImportService->importFromUrl($zipUrl, auth()->user());
$plugin = $pluginImportService->importFromUrl(
$zipUrl,
auth()->user(),
preferredRenderer: config('services.trmnl.liquid_enabled') ? 'trmnl-liquid' : null
);
$this->dispatch('plugin-installed');
Flux::modal('import-from-trmnl-catalog')->close();
} catch (\Exception $e) {
Log::error('Plugin installation failed: ' . $e->getMessage());
$this->addError('installation', 'Error installing plugin: ' . $e->getMessage());