mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Add sidebar item, template stubs + page actions
This commit is contained in:
@@ -45,6 +45,9 @@
|
||||
case "/system_info":
|
||||
DisplaySystem($extraFooterScripts);
|
||||
break;
|
||||
case "/restapi_conf":
|
||||
DisplayRestAPI();
|
||||
break;
|
||||
case "/about":
|
||||
DisplayAbout();
|
||||
break;
|
||||
|
18
includes/restapi.php
Normal file
18
includes/restapi.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
require_once 'includes/functions.php';
|
||||
require_once 'config.php';
|
||||
|
||||
/**
|
||||
* Handler for RaspAP's RestAPI settings
|
||||
*/
|
||||
function DisplayRestAPI()
|
||||
{
|
||||
$status = new \RaspAP\Messages\StatusMessage;
|
||||
|
||||
|
||||
echo renderTemplate("restapi", compact(
|
||||
"status",
|
||||
"apiKey",
|
||||
));
|
||||
}
|
@@ -85,6 +85,12 @@
|
||||
<a class="nav-link" href="system_info"><i class="fas fa-cube fa-fw mr-2"></i><span class="nav-label"><?php echo _("System"); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (RASPI_RESTAPI_ENABLED) : ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="restapi_conf"><i class="fas fa-puzzle-piece mr-2"></i><span class="nav-label"><?php echo _("RestAPI"); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="about"><i class="fas fa-info-circle fa-fw mr-2"></i><span class="nav-label"><?php echo _("About RaspAP"); ?></a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user