-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathv2.htm
214 lines (192 loc) · 7.19 KB
/
v2.htm
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content='width=device-width' name='viewport'>
<meta name="theme-color" content="#222222">
<link rel="shortcut icon" href="favicon.png">
<title>Install WLED</title>
<script
type="module"
src="installer/install-button.js"
></script>
<style>
body {
font-family: Verdana, Helvetica, sans-serif;
text-align: center;
background-color: #222;
margin: 0;
color: #fff;
}
select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='white'><polygon points='0,0 100,0 50,50'/></svg>") no-repeat;
background-size: 12px;
background-position: 206px 17px;
padding-left: 12px !important;
background-repeat: no-repeat;
outline: none;
}
select:-moz-focusring {
transition-duration: 0s;
color: transparent;
text-shadow: 0 0 0 #fff;
}
option {
background-color: var(--c-3);
color: var(--c-f);
}
.btn {
outline: none;
cursor: pointer;
padding: 8px;
margin: 10px;
width: 230px;
font-family: Verdana, Helvetica, sans-serif;
font-size: 19px;
background-color: #333;
color: white;
border: 0px solid white;
border-radius: 25px;
}
img {
width: 770px;
max-width: 80%;
image-rendering: pixelated;
image-rendering: crisp-edges;
margin: 3vh 0 5px 0;
animation: fi 1s;
}
@keyframes fi {
from { opacity: 0; }
to { opacity: 1; }
}
.main {
animation: fi 1.5s .7s both;
}
a {
color: #fff;
cursor: pointer;
text-decoration: underline;
}
ol {
margin: auto;
text-align: left;
display: inline-block;
}
li::marker {
text-decoration: bold;
color: #09f;
}
li {
margin: 5px;
}
.container {
width: 80%;
max-width: 510px;
margin: auto;
border-radius: 5px;
box-sizing: border-box;
background-color: #222;
overflow: hidden;
}
.inst-button {
padding: 5px 0;
}
@media (prefers-color-scheme: dark) {
ewt-install-dialog {
/*--mdc-theme-primary: #ffa000; /*buttons*/
--mdc-theme-surface: #333;
--mdc-dialog-heading-ink-color: #fff;
--mdc-dialog-content-ink-color: #ddd;
--mdc-text-field-fill-color: #ddd;
}
}
</style>
</head>
<body onload="checkSupported()">
<img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAG0AAAAfCAMAAADazLOuAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABLUExURQAAAAB81gCU/zKq///mo7sWMN8bO+ZIYtZaAP9rAP+HMsCiG+TAIOnMS0KqNU7KPnLUZOrq6v///4CAgGhoaL+/v6CgoExMTAAAAAlm4O8AAAAZdFJOU////////////////////////////////wABNAq3AAAACXBIWXMAAA7DAAAOwwHHb6hkAAACN0lEQVRIS73VjVLCMBAEYIr8CYKkrdj3f1J37zaXFCpTO+piaDgbPq9px9VQ0qyrvKj4q6m0Zr1h+M7xF1zRmnWzqV9/0d2jttGotO1uv9dUObwej5oqp7fzWVPl8n69aprzoOUUbbvdIbV3OLwitXc6vSG1d7m8I3feSEN0j2CeNbOY4MxigjOLCc4sZsTV2l1cCyy4wIILLLjAxtykltq2rbTU+qi01N5rXNO2leaFORoija2l5MM5a02ac9Ya16Sk5tgaPrUpjZub0BL6YqSxKwbH77XUUmSkJXSl8QtaMuyJhq5maL5nTKVpZC13VmtMpTFT2g4vJjTuGfMzzXftiUZnhdtgb1xofvypRon5TjNnxYN9zJo6K5ruSIzQtGuVZn0x91rKvdHBvm39E7SyZ4y06Gz8BDBFKzsXmhcwyfsGZ9VpbhoiCinaxPNmGWmWWrNU2jB0q6HvOhN1JUtCixQtp2g51ZVUXIPS2RMAD++T2nY/DrDjOMDO4wC7jmNYj3d73nrXug8Yt9uNB8xNU1cKNXWlUFNXCjV1pZhGTE83m2vWfYf/NGj4Bg1zu5JD3/MnH5ZWfLOksbmGWGjgXMN5/C2GXYGFFW9Nmtle6Xut0Gm+JsayCj8z0nhjGvYJzVf4aSzmNYsr+u7Q2JIdoX3YOQjOslmsW1jJ3120nE9gfo79hTaNdcsqVR610lvO47pllae9ReZ805zKo2a3iaY5c75pTmVCA6dJ5H7N0sr/asPwBehb7ifEhusRAAAAAElFTkSuQmCC">
<div class="main">
<h2>Welcome to the WLED web installer!</h2>
<div id="flasher">
<ol>
<li>Plug in your ESP to a USB port. We will install WLED <span id="verstr">0.12.0</span> to it.</li>
<li id="coms">Hit "Install" and select the correct COM port. <a onclick="showSerialHelp()">No device found?</a></li>
<li>Get WLED installed and connected in less than 3 minutes!</li>
</ol><br><br>
<div class="container inst-button">
<esp-web-install-button
id="inst"
manifest=""
>
<button class="btn" slot="activate">Install</button>
</esp-web-install-button><br>
<!-- add new builds here -->
<select id="ver" class="btn" onchange="setManifest()">
<optgroup label="Beta">
<option data-manifest="bin/beta_0_14_0-b4/manifest.json"
data-ethernet="bin/beta_0_14_0-b4/manifest_e.json"
>0.14.0-b4</option>
<option data-manifest="bin-v2/beta_0_14_0-b3/manifest.json"
data-ethernet="bin-v2/beta_0_14_0-b3/manifest_e.json"
>0.14.0-b3</option>
<option data-manifest="bin-v2/beta_0_14_0-b1/manifest.json"
data-ethernet="bin-v2/beta_0_14_0-b1/manifest_e.json"
>0.14.0-b1</option>
</optgroup>
<optgroup label="Release">
<option data-manifest="bin-v2/release_0_13_3/manifest.json"
data-ethernet="bin-v2/release_0_13_3/manifest_e.json"
>0.13.3</option>
<option data-manifest="bin-v2/release_0_13_1/manifest.json"
data-ethernet="bin-v2/release_0_13_1/manifest_e.json"
>0.13.1</option>
</optgroup>
<optgroup label="Sound Reactive">
<option data-manifest="bin-v2/sr_0_13_4/manifest.json"
data-ethernet="bin-v2/sr_0_13_4/manifest_e.json"
>0.13.4</option>
</optgroup>
</select><br><br>
<div id="eth">
<input type="checkbox" id="ethernet" name="ethernet" onchange="setManifest()">
<label for="ethernet"> My board has Ethernet</label><br>
</div>
</div>
</div>
<br>Powered by <a href="https://esphome.github.io/esp-web-tools/" target="_blank">ESP Web Tools</a><br>
<br><a href="https://github.com/Aircoookie/WLED" target="_blank">GitHub</a> <a href="https://kno.wled.ge" target="_blank">kno.wled.ge</a>
<script>
function setManifest() {
var sel = document.getElementById('ver');
var opt = sel.options[sel.selectedIndex];
var m = opt.dataset.manifest;
var me = opt.dataset.ethernet;
document.getElementById('eth').style.display = me ? "block":"none";
if (me && document.getElementById('ethernet').checked) {
m = me;
}
document.getElementById('inst').setAttribute('manifest',m);
document.getElementById('verstr').textContent = opt.text;
}
function checkSupported() {
if (document.getElementById('inst').hasAttribute('install-unsupported')) unsupported();
else setManifest();
}
function unsupported() {
document.getElementById('flasher').innerHTML = "Sorry, your browser is not yet supported!<br>Please try on Desktop Chrome or Edge.<br>"
}
function showSerialHelp() {
document.getElementById('coms').innerHTML = `Hit "Install" and select the correct COM port.<br><br>
You might be missing the drivers for your board.<br>
Here are drivers for chips commonly used in ESP boards:<br>
<a href="https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers" target="_blank">CP2102 (square chip)</a><br>
<a href="https://github.com/nodemcu/nodemcu-devkit/tree/master/Drivers" target="_blank">CH34x (rectangular chip)</a><br><br>
Make sure your USB cable supports data transfer.<br><br>
`;
}
</script>
</body>
</html>