mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 00:50:29 +00:00
Refactor to use PluginManager public methods
This commit is contained in:
parent
8021099f49
commit
6b3455345d
1 changed files with 14 additions and 88 deletions
|
@ -1,89 +1,15 @@
|
||||||
<div class="row g-0">
|
<?php
|
||||||
<div class="col-4 ms-2 sidebar-brand-icon">
|
|
||||||
<img src="app/img/raspAP-logo.php" class="navbar-logo" width="60" height="60">
|
use RaspAP\Plugins\PluginManager;
|
||||||
</div>
|
|
||||||
<div class="col ml-2">
|
$pluginManager = PluginManager::getInstance();
|
||||||
<div class="ml-1 sb-status">Status</div>
|
|
||||||
<div class="info-item-xs"><span class="icon">
|
// Display logo and status LEDs
|
||||||
<i class="fas fa-circle <?php echo ($hostapd_led); ?>"></i></span> <?php echo _("Hotspot").' '. _($hostapd_status); ?>
|
renderStatus($hostapd_led, $hostapd_status,
|
||||||
</div>
|
$memused_led, $memused,
|
||||||
<div class="info-item-xs"><span class="icon">
|
$cputemp_led, $cputemp);
|
||||||
<i class="fas fa-circle <?php echo ($memused_led); ?>"></i></span> <?php echo _("Mem Use").': '. htmlspecialchars(strval($memused), ENT_QUOTES); ?>%
|
|
||||||
</div>
|
// Render sidebar via the PluginManager
|
||||||
<div class="info-item-xs"><span class="icon">
|
$sidebar = $pluginManager->getSidebar();
|
||||||
<i class="fas fa-circle <?php echo ($cputemp_led); ?>"></i></span> <?php echo _("CPU").': '. htmlspecialchars($cputemp, ENT_QUOTES); ?>°C
|
$sidebar->render();
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="sb-nav-link-icon px-2">
|
|
||||||
<a class="nav-link" href="wlan0_info"><i class="sb-nav-link-icon fa-solid fa-gauge-high fa-fw mr-2"></i><span class="nav-label"><?php echo _("Dashboard"); ?></span></a>
|
|
||||||
</div>
|
|
||||||
<?php if (RASPI_HOTSPOT_ENABLED) : ?>
|
|
||||||
<div class="sb-nav-link-icon px-2">
|
|
||||||
<a class="nav-link" href="hostapd_conf"><i class="sb-nav-link-icon far fa-dot-circle fa-fw mr-2"></i><span class="nav-label"><?php echo _("Hotspot"); ?></a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if (RASPI_DHCP_ENABLED && !$_SESSION["bridgedEnabled"]) : ?>
|
|
||||||
<div class="sb-nav-link-icon px-2">
|
|
||||||
<a class="nav-link" href="dhcpd_conf"><i class="sb-nav-link-icon fas fa-exchange-alt fa-fw mr-2"></i><span class="nav-label"><?php echo _("DHCP Server"); ?></a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if (RASPI_ADBLOCK_ENABLED && !$_SESSION["bridgedEnabled"]) : ?>
|
|
||||||
<div class="sb-nav-link-icon px-2">
|
|
||||||
<a class="nav-link" href="adblock_conf"><i class="sb-nav-link-icon far fa-hand-paper fa-fw mr-2"></i><span class="nav-label"><?php echo _("Ad Blocking"); ?></a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if (RASPI_NETWORK_ENABLED) : ?>
|
|
||||||
<div class="sb-nav-link-icon px-2">
|
|
||||||
<a class="nav-link" href="network_conf"><i class="sb-nav-link-icon fas fa-network-wired fa-fw mr-2"></i><span class="nav-label"><?php echo _("Networking"); ?></a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if (RASPI_WIFICLIENT_ENABLED && !$_SESSION["bridgedEnabled"]) : ?>
|
|
||||||
<div class="sb-nav-link-icon px-2">
|
|
||||||
<a class="nav-link" href="wpa_conf"><i class="sb-nav-link-icon fas fa-wifi fa-fw mr-2"></i><span class="nav-label"><?php echo _("WiFi client"); ?></span></a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if (RASPI_OPENVPN_ENABLED) : ?>
|
|
||||||
<div class="sb-nav-link-icon px-2">
|
|
||||||
<a class="nav-link" href="openvpn_conf"><i class="sb-nav-link-icon fas fa-key fa-fw mr-2"></i><span class="nav-label"><?php echo _("OpenVPN"); ?></a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if (RASPI_WIREGUARD_ENABLED) : ?>
|
|
||||||
<div class="sb-nav-link-icon px-2">
|
|
||||||
<a class="nav-link" href="wg_conf"><i class="sb-nav-link-icon ra-wireguard mr-2"></i><span class="nav-label"><?php echo _("WireGuard"); ?></a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if (RASPI_VPN_PROVIDER_ENABLED) : ?>
|
|
||||||
<div class="sb-nav-link-icon px-2">
|
|
||||||
<a class="nav-link" href="provider_conf"><i class="sb-nav-link-icon fas fa-shield-alt fa-fw mr-2"></i><span class="nav-label"><?php echo _(getProviderValue($_SESSION["providerID"], "name")); ?></a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if (RASPI_TORPROXY_ENABLED) : ?>
|
|
||||||
<div class="sb-nav-link-icon px-2">
|
|
||||||
<a class="nav-link" href="torproxy_conf"><i class="sb-nav-link-icon fas fa-eye-slash fa-fw mr-2"></i><span class="nav-label"><?php echo _("TOR proxy"); ?></a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if (RASPI_CONFAUTH_ENABLED) : ?>
|
|
||||||
<div class="sb-nav-link-icon px-2">
|
|
||||||
<a class="nav-link" href="auth_conf"><i class="sb-nav-link-icon fas fa-user-lock fa-fw mr-2"></i><span class="nav-label"><?php echo _("Authentication"); ?></a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if (RASPI_VNSTAT_ENABLED) : ?>
|
|
||||||
<div class="sb-nav-link-icon px-2">
|
|
||||||
<a class="nav-link" href="data_use"><i class="sb-nav-link-icon fas fa-chart-area fa-fw mr-2"></i><span class="nav-label"><?php echo _("Data usage"); ?></a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if (RASPI_RESTAPI_ENABLED) : ?>
|
|
||||||
<div class="sb-nav-link-icon px-2">
|
|
||||||
<a class="nav-link" href="restapi_conf"><i class="sb-nav-link-icon fas fa-puzzle-piece mr-2"></i><span class="nav-label"><?php echo _("RestAPI"); ?></a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if (RASPI_SYSTEM_ENABLED) : ?>
|
|
||||||
<div class="sb-nav-link-icon px-2">
|
|
||||||
<a class="nav-link" href="system_info"><i class="sb-nav-link-icon fas fa-cube fa-fw mr-2"></i><span class="nav-label"><?php echo _("System"); ?></a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
<div class="sb-nav-link-icon px-2">
|
|
||||||
<a class="nav-link" href="about"><i class="sb-nav-link-icon fas fa-info-circle fa-fw mr-2"></i><span class="nav-label"><?php echo _("About RaspAP"); ?></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue