don't enable theme after install if there already is a thema active

This commit is contained in:
Boy132 2025-09-16 14:02:11 +02:00
parent 1b248ccec2
commit 9898674ecd
2 changed files with 5 additions and 1 deletions

View File

@ -101,7 +101,7 @@ class PluginResource extends Resource
->color('success')
->hidden(fn (Plugin $plugin) => $plugin->isInstalled())
->action(function (Plugin $plugin) {
Plugins::installPlugin($plugin);
Plugins::installPlugin($plugin, !$plugin->isTheme() || !Plugins::hasThemePluginEnabled());
redirect(ListPlugins::getUrl());

View File

@ -218,6 +218,10 @@ class PluginService
if ($enable) {
$this->enablePlugin($plugin);
} else {
if (!$plugin->isInstalled()) {
$this->disablePlugin($plugin);
}
}
} catch (Exception $exception) {
if ($this->isDevModeActive()) {