mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #1321] Show confirmation page with success or error #1134
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#1134
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bwjohns4 on GitHub (Dec 18, 2021).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1321
How can I show a confirmation page that connection was successful OR what the error was, then allow the user to close WM or the captive portal close automatically after a brief timeout? It looks like handleWifiSave is called when the credentials are submitted and that’s the last page. Then WM tries to connect, so only after then could it know the status but the configPortal is closed immediately and the client has no way to be triggered to reach out to the server after connect for status on the connection.
@bwjohns4 commented on GitHub (Dec 19, 2021):
I ended up modifying processConfigPortal() so that it does connect upon save but does not shutdown the portal immediately but instead flags itself as connected and waits 30s to close while still allowing the server to respond to requests.
Then I added some JavaScript in my response sent to client from handleWifiSave that shows "Loading" until the JavaScript request returns all the .innerHTML describing the success or failure.
@dronecz commented on GitHub (Mar 22, 2022):
@bwjohns4 I would like to implement similar functionality, could you pls share your changes or your changed library/files?
Many thanks