mirror of
https://github.com/pelican-dev/panel.git
synced 2025-11-09 12:39:30 +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')
|
->color('success')
|
||||||
->hidden(fn (Plugin $plugin) => $plugin->isInstalled())
|
->hidden(fn (Plugin $plugin) => $plugin->isInstalled())
|
||||||
->action(function (Plugin $plugin) {
|
->action(function (Plugin $plugin) {
|
||||||
Plugins::installPlugin($plugin);
|
Plugins::installPlugin($plugin, !$plugin->isTheme() || !Plugins::hasThemePluginEnabled());
|
||||||
|
|
||||||
redirect(ListPlugins::getUrl());
|
redirect(ListPlugins::getUrl());
|
||||||
|
|
||||||
|
|||||||
@ -218,6 +218,10 @@ class PluginService
|
|||||||
|
|
||||||
if ($enable) {
|
if ($enable) {
|
||||||
$this->enablePlugin($plugin);
|
$this->enablePlugin($plugin);
|
||||||
|
} else {
|
||||||
|
if (!$plugin->isInstalled()) {
|
||||||
|
$this->disablePlugin($plugin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception $exception) {
|
} catch (Exception $exception) {
|
||||||
if ($this->isDevModeActive()) {
|
if ($this->isDevModeActive()) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user