mirror of
https://github.com/pelican-dev/panel.git
synced 2025-11-08 10:39:27 +01:00
don't enable theme after install if there already is a thema active
This commit is contained in:
parent
1b248ccec2
commit
9898674ecd
@ -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());
|
||||
|
||||
|
||||
@ -218,6 +218,10 @@ class PluginService
|
||||
|
||||
if ($enable) {
|
||||
$this->enablePlugin($plugin);
|
||||
} else {
|
||||
if (!$plugin->isInstalled()) {
|
||||
$this->disablePlugin($plugin);
|
||||
}
|
||||
}
|
||||
} catch (Exception $exception) {
|
||||
if ($this->isDevModeActive()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user