mirror of
				https://github.com/billz/raspap-webgui.git
				synced 2025-03-01 10:31:47 +00:00 
			
		
		
		
	Merge branch 'master' of https://github.com/billz/raspap-webgui
This commit is contained in:
		| @@ -80,7 +80,7 @@ By default RaspAP configures a routed AP for your clients to connect to. A bridg | ||||
| More information on Bridged AP mode is provided [on our wiki](https://github.com/billz/raspap-webgui/wiki/Bridged-AP-mode). | ||||
|  | ||||
| ## Simultaneous AP and Wifi client | ||||
| RaspAP lets you create an AP with a Wifi client configuration, often called AP-STA mode. With your system configured in managed mode, enable the AP from the **Advanced** tab of **Configure hotspot** by sliding the **Wifi client AP mode** toggle. Save settings and start the hotspot. The managed mode AP is functional without restart. | ||||
| RaspAP lets you create an AP with a Wifi client configuration, often called [AP-STA mode](https://github.com/billz/raspap-webgui/wiki/RPi-Zero-W-AP-STA-mode). With your system configured in managed mode, enable the AP from the **Advanced** tab of **Configure hotspot** by sliding the **Wifi client AP mode** toggle. Save settings and start the hotspot. The managed mode AP is functional without restart. | ||||
|  | ||||
| **Note:** This option is disabled until you configure your system as a wireless client. For a device operating in [managed mode](https://github.com/billz/raspap-webgui/wiki/FAQs#how-do-i-prepare-the-sd-card-to-connect-to-wifi-in-headless-mode) without an `eth0` connection, this configuration must be enabled [_before_ a reboot](https://github.com/billz/raspap-webgui/wiki/RPi-Zero-W-AP-STA-mode).  | ||||
|  | ||||
|   | ||||
| @@ -1,3 +1,16 @@ | ||||
| <?php | ||||
| $arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini'); | ||||
| if ($arrHostapdConf['WifiAPEnable'] == 1) { | ||||
|     $client_interface = 'uap0'; | ||||
| } else { | ||||
|     $client_interface = $_SESSION['wifi_client_interface']; | ||||
| } | ||||
| exec('ip a show '.$client_interface, $stdoutIp); | ||||
| $stdoutIpAllLinesGlued = implode(" ", $stdoutIp); | ||||
| $stdoutIpWRepeatedSpaces = preg_replace('/\s\s+/', ' ', $stdoutIpAllLinesGlued); | ||||
| preg_match('/state (UP|DOWN)/i', $stdoutIpWRepeatedSpaces, $matchesState) || $matchesState[1] = 'unknown'; | ||||
| $ifaceStatus = strtolower($matchesState[1]) ? "up" : "down"; | ||||
| ?> | ||||
| <div class="row"> | ||||
|   <div class="col-lg-12"> | ||||
|     <div class="card"> | ||||
| @@ -6,6 +19,12 @@ | ||||
|           <div class="col"> | ||||
|             <i class="fas fa-wifi mr-2"></i><?php echo _("WiFi client"); ?> | ||||
|           </div> | ||||
|             <div class="col"> | ||||
|               <button class="btn btn-light btn-icon-split btn-sm service-status float-right"> | ||||
|                 <span class="icon"><i class="fas fa-circle service-status-<?php echo $ifaceStatus ?>"></i></span> | ||||
|                 <span class="text service-status"><?php echo strtolower($client_interface) .' '. _($ifaceStatus) ?></span> | ||||
|               </button> | ||||
|             </div> | ||||
|         </div><!-- /.row --> | ||||
|       </div><!-- /.card-header --> | ||||
|       <div class="card-body"> | ||||
|   | ||||
| @@ -55,6 +55,7 @@ $ifaceStatus = $wlan0up ? "up" : "down"; | ||||
|                 <div class="row justify-content-md-center"> | ||||
|                 <div class="col-md"> | ||||
|                 <div class="info-item"><?php echo _("Connected To"); ?></div><div><?php echo htmlspecialchars($connectedSSID, ENT_QUOTES); ?></div> | ||||
|                 <div class="info-item"><?php echo _("Interface"); ?></div><div><?php echo htmlspecialchars($_SESSION['wifi_client_interface']); ?></div> | ||||
|                 <div class="info-item"><?php echo _("AP Mac Address"); ?></div><div><?php echo htmlspecialchars($connectedBSSID, ENT_QUOTES); ?></div> | ||||
|                 <div class="info-item"><?php echo _("Bitrate"); ?></div><div><?php echo htmlspecialchars($bitrate, ENT_QUOTES); ?></div> | ||||
|                 <div class="info-item"><?php echo _("Signal Level"); ?></div><div><?php echo htmlspecialchars($signalLevel, ENT_QUOTES); ?></div> | ||||
|   | ||||
| @@ -1,12 +1,7 @@ | ||||
| <?php if (empty($networks)) : ?> | ||||
| <?php if (empty($networks)) { ?> | ||||
|   <p class="lead text-center"><?php echo _('No Wifi stations found') ?></p> | ||||
|   <p class="text-center"><?php echo _('Click "Rescan" to search for nearby Wifi stations.') ?></p> | ||||
| <?php endif ?> | ||||
| <?php $index = 0; ?> | ||||
| <div class="row ml-1 mr-1 w-100"> | ||||
| <?php $networks = array_slice($networks, 1,1); ?> | ||||
| <?php | ||||
| if (count($networks) == 1) { | ||||
| <?php } elseif (count($networks) == 1) {  | ||||
|     $prop_col = "col-sm-12"; | ||||
|     $prop_w = "w-50"; | ||||
| } else { | ||||
| @@ -14,7 +9,9 @@ if (count($networks) == 1) { | ||||
|     $prop_w = "w-100"; | ||||
| } | ||||
| ?> | ||||
|   <?php foreach ($networks as $ssid => $network) : ?> | ||||
| <?php $index = 0; ?> | ||||
| <div class="row ml-1 mr-1 w-100"> | ||||
|  <?php foreach ($networks as $ssid => $network) : ?> | ||||
|     <div class="<?php echo $prop_col; ?> align-items-stretch mb-3"> | ||||
|     <div class="card h-100 <?php echo $prop_w; ?>"> | ||||
|       <div class="card-body"> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user