From 98fa879db1eb347b5c1047b34c6a09b86d3700af Mon Sep 17 00:00:00 2001 From: MasterPhooey Date: Fri, 1 May 2026 17:01:15 -0500 Subject: [PATCH] wake sound --- static/index.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/static/index.html b/static/index.html index 2ea4d01..5f272d3 100644 --- a/static/index.html +++ b/static/index.html @@ -1938,7 +1938,16 @@ 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]) => `

${escapeHtml(section)}