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 @@ +
+
+
+
+
+
+ +
+
+
+
+ showMessages(); ?> +

+ +
+
+ + +
+ Details for more information and to install a plugin."); ?> +
+ + +
+
+
+ + + + + + + diff --git a/templates/system.php b/templates/system.php index c54c778d1..0023e13d9 100755 --- a/templates/system.php +++ b/templates/system.php @@ -18,9 +18,6 @@ - - -
@@ -29,9 +26,6 @@ - - -
@@ -111,91 +105,3 @@
- - - - - - diff --git a/templates/system/plugins.php b/templates/system/plugins.php deleted file mode 100644 index 481d222bb..000000000 --- a/templates/system/plugins.php +++ /dev/null @@ -1,19 +0,0 @@ - -
-

- -
-
- - -
- Details for more information and to install a plugin."); ?> -
- - -
-
-
-