Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add link to next Webui #11

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions wifimgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
ap_ssid = "WifiManager"
ap_password = "tayfunulu"
ap_authmode = 3 # WPA2
linkToNextWebinterface = True
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style, see my comment in other PR.


NETWORK_PROFILES = 'wifi.dat'

Expand Down Expand Up @@ -202,11 +203,19 @@ def handle_configure(client, request):
<span style="color: #ff0000;">
ESP successfully connected to WiFi network %(ssid)s.
</span>
</h1>
</h1>""" % dict(ssid=ssid)
if linkToNextWebinterface:
response += """\
<p style="text-align: center;">
<a href="http://%(ip)/">To new Interface</a><br>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you mean %(ip)s here?

(You must be connected to the set network to follow this Link)
</p>
""" % dict(ip=wlan_sta.ifconfig()[0])
response += """\
<br><br>
</center>
</html>
""" % dict(ssid=ssid)
"""
send_response(client, response)
try:
profiles = read_profiles()
Expand Down