kopia lustrzana https://github.com/tayfunulu/WiFiManager
Add link to next Webui
rodzic
9d3094862a
commit
f83297809b
13
wifimgr.py
13
wifimgr.py
|
@ -6,6 +6,7 @@ import time
|
||||||
ap_ssid = "WifiManager"
|
ap_ssid = "WifiManager"
|
||||||
ap_password = "tayfunulu"
|
ap_password = "tayfunulu"
|
||||||
ap_authmode = 3 # WPA2
|
ap_authmode = 3 # WPA2
|
||||||
|
linkToNextWebinterface = True
|
||||||
|
|
||||||
NETWORK_PROFILES = 'wifi.dat'
|
NETWORK_PROFILES = 'wifi.dat'
|
||||||
|
|
||||||
|
@ -202,11 +203,19 @@ def handle_configure(client, request):
|
||||||
<span style="color: #ff0000;">
|
<span style="color: #ff0000;">
|
||||||
ESP successfully connected to WiFi network %(ssid)s.
|
ESP successfully connected to WiFi network %(ssid)s.
|
||||||
</span>
|
</span>
|
||||||
</h1>
|
</h1>""" % dict(ssid=ssid)
|
||||||
|
if linkToNextWebinterface:
|
||||||
|
response += """\
|
||||||
|
<p style="text-align: center;">
|
||||||
|
<a href="http://%(ip)/">To new Interface</a><br>
|
||||||
|
(You must be connected to the set network to follow this Link)
|
||||||
|
</p>
|
||||||
|
""" % dict(ip=wlan_sta.ifconfig()[0])
|
||||||
|
response += """\
|
||||||
<br><br>
|
<br><br>
|
||||||
</center>
|
</center>
|
||||||
</html>
|
</html>
|
||||||
""" % dict(ssid=ssid)
|
"""
|
||||||
send_response(client, response)
|
send_response(client, response)
|
||||||
try:
|
try:
|
||||||
profiles = read_profiles()
|
profiles = read_profiles()
|
||||||
|
|
Ładowanie…
Reference in New Issue