From 3d439e030a455d5e897260002040b4b20f70ed70 Mon Sep 17 00:00:00 2001 From: Sergey Krashevich Date: Tue, 3 Feb 2026 12:22:19 +0300 Subject: [PATCH] fix(ui): toggle display of elements on click events in add.html --- www/add.html | 68 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 51 insertions(+), 17 deletions(-) diff --git a/www/add.html b/www/add.html index c68f31f6..48edba81 100644 --- a/www/add.html +++ b/www/add.html @@ -64,7 +64,8 @@ @@ -123,7 +126,9 @@ } document.getElementById('homekit').addEventListener('click', async ev => { - ev.target.nextElementSibling.style.display = 'grid'; + const div = ev.target.nextElementSibling; + if (div.style.display === 'grid') { div.style.display = 'none'; return; } + div.style.display = 'grid'; await reloadHomeKit(); }); @@ -168,7 +173,9 @@ @@ -180,7 +187,9 @@ @@ -192,7 +201,9 @@ @@ -211,7 +222,8 @@ @@ -243,7 +257,9 @@ @@ -259,7 +275,9 @@ @@ -433,7 +457,11 @@