Fix empty espressif install (#3228)

* Fix empty espressif install

* Update installer.html
This commit is contained in:
Paulus Schoutsen 2023-10-02 15:09:23 -04:00 committed by GitHub
parent 10612045ff
commit 68eb8a8691
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -593,11 +593,13 @@
<div class="hidden info espressif">
<div class="question-prompt">Start the installation:</div>
<esp-web-install-button></esp-web-install-button>
<esp-web-install-button
manifest="https://firmware.esphome.io/esphome-web/manifest.json"
></esp-web-install-button>
</div>
<div class="hidden info raspberry">
<div class="question-prompt">Start the installation:</div>
<div class="question-prompt">Installation instructions:</div>
<ol>
<li>Disconnect your Raspberry Pi Pico from your computer</li>
@ -684,8 +686,10 @@
radio.addEventListener("change", () => {
const typeRoot = radio.closest(".type");
const manifestRoot = typeRoot.dataset.manifestRoot;
const button = typeRoot.querySelector("esp-web-install-button");
button.manifest = `${manifestRoot}/${radio.value}-manifest.json`;
if (manifestRoot) {
const button = typeRoot.querySelector("esp-web-install-button");
button.manifest = `${manifestRoot}/${radio.value}-manifest.json`;
}
typeRoot.querySelectorAll(".info").forEach((info) => {
info.classList.add("hidden");