diff --git a/static/index.html b/static/index.html
index 990b8b8..2ea4d01 100644
--- a/static/index.html
+++ b/static/index.html
@@ -363,6 +363,20 @@
align-items: end;
}
+ .wakeSoundPreviewRow {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ flex-wrap: wrap;
+ align-self: end;
+ padding-bottom: 2px;
+ }
+
+ .wakeSoundPreviewStatus {
+ color: var(--muted);
+ font-size: 12px;
+ }
+
.readOnlyValue {
min-height: 43px;
display: flex;
@@ -1419,6 +1433,8 @@
};
let firmwareProfileSaveTimer = null;
let firmwareProfileReloadTimer = null;
+ let wakeSoundPreviewAudio = null;
+ let wakeSoundPreviewButton = null;
function setPill(el, text, cls) {
el.className = "pill " + (cls || "");
@@ -1907,6 +1923,7 @@
}
function renderFirmwareFields() {
+ resetWakeSoundPreview();
const template = selectedFirmwareTemplate();
const fields = Array.isArray(template?.fields) ? template.fields : [];
if (!fields.length) {
@@ -1928,10 +1945,12 @@
${rows.map((field) => renderFirmwareField(field)).join("")}
+ ${section === "Wake Sound" ? renderWakeSoundPreviewControl() : ""}
`).join("");
syncRenderedWakeWordSelection();
+ syncRenderedWakeSoundSelection();
}
function renderFirmwareField(field) {
@@ -1976,6 +1995,28 @@
`;
}
+ if (type === "wake_sound_select") {
+ const optionHtml = options.length
+ ? options.map((option) => {
+ const optionValue = String(option.value || "");
+ const selected = optionValue && optionValue === String(value || "") ? " selected" : "";
+ return `
+
+ `;
+ }).join("")
+ : "";
+ return `
+
+ `;
+ }
if (type === "checkbox") {
return `