-
Notifications
You must be signed in to change notification settings - Fork 34
/
updateServerHtml.h
71 lines (68 loc) · 2.72 KB
/
updateServerHtml.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
static const char UpdateServerIndex[] PROGMEM =
R"(<html charset="UTF-8">
<style type='text/css'>
body {background-color: lightblue;}
</style>
<body>
<h1>OTGW firmware Flash utility</h1>
<form method='POST' action='?cmd=0' enctype='multipart/form-data'>
Select a "<b>.ino.bin</b>" file to flash<br/>
<input type='file' accept='ino.bin' name='firmware'>
<input type='submit' value='Flash Firmware'>
</form>
<form method='POST' action='?cmd=100' enctype='multipart/form-data'>
Select a "<b>.littlefs.bin</b>" file to flash<br/>
<input type='file' accept='littlefs.bin' name='filesystem'>
<input type='submit' value='Flash LittleFS'>
</form>
<hr>
<br/><font color='red'>Warning!!!</font>
<br/>You will lose all your files when flashing LittleFS.
<br/>Backup your files first to your local filesystem (using FSexplorer)
and upload them after the flashing of your LittleFS.
<hr>
<br/>
<!--
<br/>Wait <span style='font-size: 1.3em;' id="waitSeconds">120</span> seconds ..
<br>If nothing happend, then wait for count down to zero and then refresh with <span style='font-size:1.3em;'><b><a href="/">this link here</a></b></span>!
</body>
<script>
var seconds = document.getElementById("waitSeconds").textContent;
var countdown = setInterval(function() {
seconds--;
document.getElementById('waitSeconds').textContent = seconds;
if (seconds <= 0) {
clearInterval(countdown);
window.location.assign("/")
}
}, 1000);
</script>-->
</html>)";
static const char UpdateServerSuccess[] PROGMEM =
R"(<html charset="UTF-8">
<style type='text/css'>
body {background-color: lightgray;}
</style>
<body>
<h1>OTGW firmware Flash utility</h1>
<br/>
<h2>Update successful!</h2>
<br/>
<br/>Wait for the OTGW firmware to reboot and start the HTTP server
<br/>
<br>
<br/>Wait <span style='font-size: 1.3em;' id="waitSeconds">120</span> seconds ..
<br>If nothing happend, then wait for count down to zero and then refresh with <span style='font-size:1.3em;'><b><a href="/">this link here</a></b></span>!
</body>
<script>
var seconds = document.getElementById("waitSeconds").textContent;
var countdown = setInterval(function() {
seconds--;
document.getElementById('waitSeconds').textContent = seconds;
if (seconds <= 0) {
clearInterval(countdown);
window.location.assign("/")
}
}, 1000);
</script>
</html>)";