-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
172 lines (161 loc) · 9.48 KB
/
Copy pathindex.html
File metadata and controls
172 lines (161 loc) · 9.48 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Willow Web Flash</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xterm@4.19.0/css/xterm.css">
<link
href="https://fonts.googleapis.com/css?family=Orbitron"
rel="stylesheet"
/>
<link rel="icon" href="assets/willow-logo.svg" type="image/svg+xml">
<script src="https://cdn.jsdelivr.net/npm/xterm@4.19.0/lib/xterm.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/crypto-js@4.1.1/crypto-js.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<link rel="stylesheet" href="willow.css">
</head>
<body>
<dialog id="dialogFlashFailed">
<h3>Flash failed!</h3>
<p>
ESP microcontrollers can be sensitive to low power USB ports (e.g. a laptop), and low quality USB cables.<br>
Please try using a different USB port or another USB cable.
</p>
<form method="dialog">
<button id="dialogFlashFailedConfirmButton">Ok</button>
</form>
</dialog>
<dialog id="dialogPostFlash">
<h3>Flash completed!</h3>
<p>
If this is the first time flashing Willow on this device, a power cycle is recommended.
</p>
<form method="dialog">
<button id="dialogPostFlashConfirmButton">Ok</button>
</form>
</dialog>
<style>body{font-family:"Raleway"}</style>
<h1 align="center"><p><img src="assets/willow-logo.svg" width="42" height="42" style="vertical-align:middle"></img> Willow Web Flash</p></h1>
<h4 align="center">Flash Willow from your browser</h4>
<div id="safariErr" style="display:none"><p align="center" style="color:red">This tool is not supported on Safari browser!</p>
</div>
<div class="container" id="main">
<hr/>
<div id="program">
<h3> Program </h3>
<label for="baudrates" id="lblBaudrate">Baudrate:</label>
<label style="display:none" id="lblConnTo">Connected to device: </label>
<select name="baudrates" id="baudrates">
<option value="2000000">2000000</option>
<option value="921600">921600</option>
<option value="460800">460800</option>
<option value="230400">230400</option>
<option value="115200">115200</option>
</select>
<input class="willow-button" type="button" id="connectButton" value="Connect" />
<input class="btn btn-warning btn-sm" type="button" id="disconnectButton" value="Disconnect" />
<input class="btn btn-danger btn-sm" type="button" id="eraseButton" value="Erase Flash" />
<form role="form" id="willowSettings" style="display: none;"><!--XXX: show this only after connect-->
<div class="form-group" style="margin-top: 10px;">
<label for="wifiName">WiFi Name</label>
<input type="text" required class="form-control" name="wifiName" id="wifiName" pattern="^[\x00-\x7F\u0080-\uFFFF]{1,32}$" "placeholder="Enter name of your wifi network." title="Wi-Fi SSID must be between 1 and 32 ASCII characters.">
</div>
<div class="form-group">
<label for="wifiPass">WiFi Password</label>
<i class="bi bi-eye-slash" id="toggleWifiPass"></i>
<input type="password" required class="form-control" name="wifiPass" id="wifiPass" pattern="^[ -~]{8,63}" placeholder="Enter password for your wifi network." title="Wi-Fi WPA passphrase must be between 8 and 63 ASCII characters">
</div>
<div class="form-group">
<label for="wasUrl">Willow Application Server (WAS) URL</label>
<input type="text" required class="form-control" name="wasUrl" id="wasUrl" pattern="^(ws:\/\/|wss:\/\/).*\/ws$" placeholder="Enter your WAS URL." title="WAS URL must start with ws:// or wss:// and must end on /ws">
</div>
<div class="form-group">
<table>
<tr>
<th>Device type:</th>
</tr>
<tr>
<td width="160">
<img src="https://worker.heywillow.org/api/asset?type=image&asset=ESP32-S3-BOX-3" width="140"></img>
</td>
<td width="160">
<img src="https://worker.heywillow.org/api/asset?type=image&asset=ESP32-S3-BOX" width="140"></img>
</td>
<td width="160">
<img src="https://worker.heywillow.org/api/asset?type=image&asset=ESP32-S3-BOX-LITE" width="140"></img>
</td>
</tr>
<tr>
<td width="160">
<input type="radio" name="deviceType" id="deviceTypeBox3" value="ESP32_S3_BOX_3" checked>
<label for="deviceTypeBox3">ESP32-S3-Box-3</label>
</td>
<td width="160">
<input type="radio" name="deviceType" id="deviceTypeBox" value="ESP32_S3_BOX">
<label for="deviceTypeBox">ESP32-S3-Box</label>
</td>
<td width="160">
<input type="radio" name="deviceType" id="deviceTypeBoxLite" value="ESP32_S3_BOX_LITE">
<label for="deviceTypeBoxLite">ESP32-S3-Box-Lite</label>
</td>
</tr>
</table>
</div>
<div class="form-group">
<label for="useLatest">Flash latest release</label>
<input type="checkbox" name="useLatest" id="useLatest" checked></br>
<label for="release" id="lblRelease" hidden>Release to flash</label>
<select name="release" id="release" hidden></select>
</div>
<input class="willow-button" id="willowFlash" type="submit" value="Flash Willow" />
</form>
<br>
<div class="alert alert-danger alert-dismissible" id="alertDiv" style="display:none; margin-top:10px">
<a href="#" class="close" aria-label="close" onclick="$('.alert').hide()">×</a>
<span id="alertmsg"></span>
</div>
<div id="files">
<table class="table table-striped" id="fileTable">
<thead class="thead-light">
<tr>
<th>Flash Address</th>
<th>File</th>
<th></th>
</tr>
</thead>
<tbody id="tableBody">
</tbody>
</table>
<input class="btn btn-info btn-sm" type="button" id="addFile" value="Add File" />
<input class="btn btn-info btn-sm" type="button" id="programButton" value="Program" />
</div>
<output id="list"></output>
<hr/>
</div>
<div id="console">
<h3>Console </h3>
<label style="display:none" id="lblConsoleFor">Connected to device: </label>
<input class="willow-button" type="button" id="consoleStartButton" value="Start" />
<input class="willow-button" type="button" id="consoleStopButton" value="Stop" />
<input class="willow-button" type="button" id="resetButton" value="Reset" />
<hr/>
</div>
<div id="terminal"></div>
</div>
<script src="index.js" type="module"></script>
<script>
// Safari 3.0+ "[object HTMLElementConstructor]"
var isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || (typeof safari !== 'undefined' && window['safari'].pushNotification));
if(isSafari)
{
document.getElementById("safariErr").style.display = "inline";
document.getElementById("main").style.display = "none";
}
</script>
</body>
</html>