Skip to content

Commit

Permalink
Merge pull request #511 from amarofarinha/main
Browse files Browse the repository at this point in the history
Added confirmation alert for "Pause Charge/Discharge" functionality
  • Loading branch information
dalathegreat authored Oct 4, 2024
2 parents 4913fea + 602c45b commit f7ae4a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Software/src/devboard/webserver/webserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,10 @@ String processor(const String& var) {
if (emulator_pause_request_ON)
content += "<button onclick='PauseBattery(false)'>Resume charge/discharge</button>";
else
content += "<button onclick='PauseBattery(true)'>Pause charge/discharge</button>";
content +=
"<button onclick=\"if(confirm('Are you sure you want to pause charging and discharging? This will set the "
"maximum charge and discharge values to zero, preventing any further power flow.')) { PauseBattery(true); "
"}\">Pause charge/discharge</button>";
content += " ";
content += "<button onclick='OTA()'>Perform OTA update</button>";
content += " ";
Expand Down

0 comments on commit f7ae4a6

Please sign in to comment.