wake sound

This commit is contained in:
MasterPhooey
2026-05-01 17:01:15 -05:00
parent dfac549430
commit 98fa879db1

View File

@@ -1938,7 +1938,16 @@
groups.get(section).push(field); groups.get(section).push(field);
}); });
$("firmwareFields").innerHTML = Array.from(groups.entries()).map(([section, rows]) => ` const orderedGroups = Array.from(groups.entries());
const wakeSoundIndex = orderedGroups.findIndex(([section]) => section === "Wake Sound");
const microWakeWordIndex = orderedGroups.findIndex(([section]) => section === "Micro Wake Word");
if (wakeSoundIndex >= 0 && microWakeWordIndex >= 0 && wakeSoundIndex !== microWakeWordIndex + 1) {
const [wakeSoundGroup] = orderedGroups.splice(wakeSoundIndex, 1);
const targetIndex = orderedGroups.findIndex(([section]) => section === "Micro Wake Word");
orderedGroups.splice(targetIndex + 1, 0, wakeSoundGroup);
}
$("firmwareFields").innerHTML = orderedGroups.map(([section, rows]) => `
<section class="firmwareSettingsSection"> <section class="firmwareSettingsSection">
<div class="row space"> <div class="row space">
<h3 style="margin:0;">${escapeHtml(section)}</h3> <h3 style="margin:0;">${escapeHtml(section)}</h3>