2
0
Эх сурвалжийг харах

show connection info in status bar

Christian Herzog 5 жил өмнө
parent
commit
2932b57aea

+ 2 - 0
components/wifi-manager/code.js

@@ -419,6 +419,7 @@ function checkStatus(){
 					$("#netmask").text(data["netmask"]);
 					$("#gw").text(data["gw"]);
 					$("#wifi-status").slideDown( "fast", function() {});
+                    $(".footer").html("connected to SSID "+text(data["ssid"])+" with IP "+text(data["ip"]));
 					
 					//unlock the wait screen if needed
 					$( "#ok-connect" ).prop("disabled",false);
@@ -464,6 +465,7 @@ function checkStatus(){
 					$("#netmask").text(data["netmask"]);
 					$("#gw").text(data["gw"]);
 					$("#wifi-status").slideDown( "fast", function() {});
+                    $(".footer").html("connected to SSID "+data["ssid"]+" with IP "+data["ip"]);
 				}
                 enableAPTimer = false;
                 if (!recovery) enableStatusTimer = false;

+ 2 - 1
components/wifi-manager/index.html

@@ -204,7 +204,7 @@
                             <th scope="col">GPIO pin</th>
                         </tr>
                     </thead>
-                    <tbody id="releaseTable">
+                    <tbody id="gpioTable">
                         <tr>
                             <td><strong>I2S</strong></td><td></td>
                         </tr>
@@ -303,5 +303,6 @@
             </div>
 
         </div>
+        <footer class="footer"></footer>
     </body>
 </html>

+ 11 - 0
components/wifi-manager/style.css

@@ -1,6 +1,7 @@
 body {
     border: 0;
     margin: 0;
+    margin-bottom:50px;
 }
 a {
     color: darkblue;
@@ -305,3 +306,13 @@ input, textarea {
 #mode {
     float: right;
 }
+
+.footer {
+  position: fixed;
+  left: 0;
+  bottom: 0;
+  width: 100%;
+  background-color: #555;
+  color: white;
+  text-align: center;
+}