diff --git a/ajax/networking/wifi_stations.php b/ajax/networking/wifi_stations.php index 37d662ff..aca5bc89 100644 --- a/ajax/networking/wifi_stations.php +++ b/ajax/networking/wifi_stations.php @@ -15,4 +15,8 @@ nearbyWifiStations($networks, !isset($_REQUEST["refresh"])); connectedWifiStations($networks); sortNetworksByRSSI($networks); -echo renderTemplate('wifi_stations', compact('networks'), true); +$connected = array_filter($networks, function($n) { return $n['connected']; } ); +$known = array_filter($networks, function($n) { return !$n['connected'] && $n['configured']; } ); +$nearby = array_filter($networks, function($n) { return !$n['configured']; } ); + +echo renderTemplate('wifi_stations', compact('networks', 'connected', 'known', 'nearby'), true); diff --git a/app/css/custom.php b/app/css/custom.php index 273a9629..167b4473 100644 --- a/app/css/custom.php +++ b/app/css/custom.php @@ -16,6 +16,10 @@ body { color: #212529; } +.h-underlined { + border-bottom: 1px solid #343434; +} + .page-header { margin: 20px 0 20px; } @@ -193,6 +197,13 @@ pre.unstyled { .js-reload-wifi-stations { min-width: 10rem; } +.card-deck--wifi-stations { + justify-content: space-between; +} +.card-deck--wifi-stations .card { + flex: 0 46%; + margin-bottom: .75rem; +} .sidebar.toggled .nav-item .nav-link span { display: none; diff --git a/app/css/hackernews.css b/app/css/hackernews.css index 6d065e80..d7c1695f 100644 --- a/app/css/hackernews.css +++ b/app/css/hackernews.css @@ -8,7 +8,6 @@ License: GNU General Public License v3.0 html * { font-family: Verdana, Geneva, sans-serif; - font-size: 0.9rem; color: #828282; } @@ -34,6 +33,10 @@ h5.card-title { color: #212529; } +.h-underlined { + border-bottom: 1px solid #343434; +} + .card, .modal-dialog { border-radius: 1px; border-color: #ff6600; @@ -226,6 +229,13 @@ pre.unstyled { .js-reload-wifi-stations { min-width: 10rem; } +.card-deck--wifi-stations { + justify-content: space-between; +} +.card-deck--wifi-stations .card { + flex: 0 46%; + margin-bottom: .75rem; +} .sidebar.toggled .nav-item .nav-link { text-align: center; diff --git a/app/css/lightsout.css b/app/css/lightsout.css index 92123da4..ea213711 100644 --- a/app/css/lightsout.css +++ b/app/css/lightsout.css @@ -8,7 +8,6 @@ License: GNU General Public License v3.0 html * { font-family: Helvetica,Arial,sans-serif; - font-size: 1.0rem; color: #afafaf; } @@ -24,6 +23,10 @@ h5.card-title { font-size: 1.2rem; } +.h-underlined { + border-bottom: 1px solid #343434; +} + .page-header { padding: 0 20px; border-left: .01rem solid #d2d2d2; @@ -427,6 +430,14 @@ pre { width: 100%; } +.card-deck--wifi-stations { + justify-content: space-between; +} +.card-deck--wifi-stations .card { + flex: 0 46%; + margin-bottom: .75rem; +} + .toggle-off.btn { padding-left: 1.2rem; font-size: 0.9rem!important; diff --git a/includes/wifi_functions.php b/includes/wifi_functions.php index 411c1cff..b7b543df 100755 --- a/includes/wifi_functions.php +++ b/includes/wifi_functions.php @@ -18,6 +18,7 @@ function knownWifiStations(&$networks) switch (strtolower($lineArr[0])) { case 'ssid': $ssid = trim($lineArr[1], '"'); + $network['ssid'] = $ssid; break; case 'psk': if (array_key_exists('passphrase', $network)) { @@ -83,6 +84,8 @@ function nearbyWifiStations(&$networks, $cached = true) continue; } + $networks[$ssid]['ssid'] = $ssid; + // If network is saved if (array_key_exists($ssid, $networks)) { $networks[$ssid]['visible'] = true; diff --git a/templates/configure_client.php b/templates/configure_client.php index 21a23a75..21a3e2a0 100755 --- a/templates/configure_client.php +++ b/templates/configure_client.php @@ -24,10 +24,10 @@ -
diff --git a/templates/wifi_stations.php b/templates/wifi_stations.php index f12c9f54..56bf0a71 100755 --- a/templates/wifi_stations.php +++ b/templates/wifi_stations.php @@ -1,4 +1,4 @@ - +