diff --git a/includes/page_actions.php b/includes/page_actions.php index 2b76355c1..07268e03b 100755 --- a/includes/page_actions.php +++ b/includes/page_actions.php @@ -66,6 +66,9 @@ function handleCorePageAction(string $page, array &$extraFooterScripts): void break; case "/restapi_conf": DisplayRestAPI(); + break; + case "/plugin_conf": + DisplayPlugins(); break; case "/about": DisplayAbout(); diff --git a/includes/plugins.php b/includes/plugins.php new file mode 100644 index 000000000..bbe23d629 --- /dev/null +++ b/includes/plugins.php @@ -0,0 +1,21 @@ +getUserPlugins(); + $pluginsTable = $pluginInstaller->getHTMLPluginsTable($plugins); + + echo renderTemplate("plugins", compact( + "status", + "pluginsTable" + )); + +} diff --git a/index.php b/index.php index 0b88a5f77..6dc0514bc 100755 --- a/index.php +++ b/index.php @@ -52,6 +52,7 @@ require_once 'includes/wireguard.php'; require_once 'includes/provider.php'; require_once 'includes/restapi.php'; +require_once 'includes/plugins.php'; initializeApp(); ?> diff --git a/src/RaspAP/UI/Sidebar.php b/src/RaspAP/UI/Sidebar.php index fe8199877..f765dcb7a 100644 --- a/src/RaspAP/UI/Sidebar.php +++ b/src/RaspAP/UI/Sidebar.php @@ -45,6 +45,9 @@ public function __construct() { ); $this->addItem(_('RestAPI'), 'fas fa-puzzle-piece', 'restapi_conf', 120, fn() => RASPI_RESTAPI_ENABLED + ); + $this->addItem(_('Plugins'), 'fas fa-plug-circle-bolt', 'plugin_conf', 125, + fn() => RASPI_PLUGINS_ENABLED ); $this->addItem(_('System'), 'fas fa-cube', 'system_info', 130, fn() => RASPI_SYSTEM_ENABLED diff --git a/templates/plugins.php b/templates/plugins.php new file mode 100644 index 000000000..3da36d4e5 --- /dev/null +++ b/templates/plugins.php @@ -0,0 +1,117 @@ +